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

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
565
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,080
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,285
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,366
I have been working on an existing project for some time now and restructured the whole program into POUs instead of a singular main. Everything...
Replies
18
Views
3,225
Back
Top Bottom