TIME_OF_DAY into unsigned DOUBLE INTEGER
TOD_TO_UDINT converts a value of the data type TIME_OF_DAY into a value of the data type Unsigned DOUBLE INTEGER according to its internal format, which is seconds elapsed since "00:00:00".
Input
input data type
Output
Conversion result
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
UDINT_value: UDINT:=0;
TOD_value: TOD:=TOD#21:56:38;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_F,TOD_TO_UDINT!,Instance,14,1,23,3,,?D?C);
B(B_VARIN,,TOD_value,12,1,14,3,);
B(B_VAROUT,,UDINT_value,23,1,25,3,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
UDINT_value := TOD_TO_UDINT(TOD_value);