RS Logix500 - Astronomical clock - part II

nasps

Member
Join Date
Sep 2007
Location
Aveiro
Posts
11
Hello everybody!

I've managed to get the astronomical clock algorithm so I've implemented it in RSLogix 500, but I have a "math" problem:
I have some floating points, ex. 17,66694 and I need to get out only the integer part (in this case 17) because I need the decimal part to another operation. I've tried to move this float to a integer and I get 18 (the rounding up). Also tried the ABS instruction, the same...

How can I get from a float, the integer part and the decimal part? In this example 17,66694 -> 17 and 0,66694 without rounding.

Thank in advance.
 
See Pic below

Convert1.jpg
 

Similar Topics

Hello everybody! Here's an odd request. I need to make an astronomical clock to control an outside ilumination but I don't want to have to every...
Replies
20
Views
7,733
I've got a Micrologix 1100 with ethernet and I'm trying to configure communications to a Fanuc R30iB controller. I'm pretty sure you have to set...
Replies
0
Views
95
So here's my situation, I have been tasked with modifying the logic to mimic a button press in the PLC. I have two identical machines however one...
Replies
6
Views
534
Hello, I'm new to programming. I'm using RSLogix500 to modify an existing program for a SLC500. My plan was to use one of the existing inputs...
Replies
26
Views
1,958
Hi Newbie here :yeah: Can one of you experts help me with setting up a simple BTR and BTW to just test 4 analogue inputs 4-20ma (1974-if4i)...
Replies
11
Views
989
Back
Top Bottom