Time to INT conversion Codesys Ladder Logic

DCollis

Member
Join Date
Jan 2023
Location
Canada
Posts
9
Hello,

I am having some trouble converting my Elapsed Time from TIME data type to INT data type so that I can display it on my HMI. While I can do this with structured text, I can't seem to figure it out in ladder logic. I have tried both the Move and Conversion function to do this. Any insight would be awesome!

Screenshot (18).jpg
 
UDINT gives the same error for some reason. I think I'm using the functions wrong somehow even though they seem quite straightforward.
 
Thanks! I was able to get it by creating my own TO_INT conversion function block with the "Box" function instead of the pre-existing conversion function.
 

Similar Topics

I'm stumped by something seemingly simple. I want to move the numerical value of an ASCII style SINT into a REAL tag in Studio 5000. What's the...
Replies
3
Views
77
Im trying to use a MSG instruction to get the serial numbers of all addon cards and display the serials on a HMI interface. I have the logic done...
Replies
2
Views
594
Long time viewer, first time poster. First I want to start, yes I know, PLC-2 and PLC-5 do not belong in manufacturing plants anymore, but...
Replies
5
Views
2,098
Hello, I'm taking in two 16 bit ints from the field via modbus, one low order and one high order to combine into their proper 32-bit form. I've...
Replies
1
Views
1,307
I have a Controllogix program that the programmer used modbus to send scale data to the PLC. We recently replaced a piece of equipment on this and...
Replies
18
Views
6,454
Back
Top Bottom