industrial 951
Member
Hello all and Happy New Year... almost
I need to get the 24 hr time in a compactlogix PLC (Version 33). I am having a hard time with the data conversion of GSV and Wall Clock time. Here is what I have so far...
DTOS - Convert Hour (INT) to String
DTOS - Convert Minute (INT) to String
CONCAT- Concatenate Hour and Minute String
STOD - Convert from String to DINT
Seems to work however it is truncating the zeros, for example, 0702 = 72, 1001 = 101.
Does anyone have a better solution for this? Would this be easier in Structured Text?
I need to get the 24 hr time in a compactlogix PLC (Version 33). I am having a hard time with the data conversion of GSV and Wall Clock time. Here is what I have so far...
DTOS - Convert Hour (INT) to String
DTOS - Convert Minute (INT) to String
CONCAT- Concatenate Hour and Minute String
STOD - Convert from String to DINT
Seems to work however it is truncating the zeros, for example, 0702 = 72, 1001 = 101.
Does anyone have a better solution for this? Would this be easier in Structured Text?