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,759
So basically i have 2 queries : 1. I have a program file of S7-300 PLC which i want to migrate in RSLogix500.In short i want to convert my simatic...
Replies
15
Views
252
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
112
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
550
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
2,016
Back
Top Bottom