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.
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.