TOD_TO conversions
Converting from the variable type TIME_OF_DAY to a different type: The time will be stored internally in a DWORD in milliseconds (beginning with 12:00 A.M. for the TIME_OF_DAY variable). This value will then be converted. When you perform a type conversion from a larger to a smaller type, you risk losing some information. For the STRING type variable, the result is a time constant.
Examples in ST:
si:=TOD_TO_SINT(TOD#00:00:00.012); (* Result
is 12 *)
str:=TOD_TO_STRING(TOD#14:01:05.123); (* Result is
'TOD#14:01:05.123' *)
tm:= TOD_TO_TIME(TOD#14:01:05.123); (* Result is T#841m5s123ms
*)
udi:= TOD_TO_UDINT(TOD#14:01:05.123); (* Result is 16#03020963
*)