Unsigned DOUBLE INTEGER into DATE_AND_TIME
UDINT_TO_DT converts a value of the data type Unsigned DOUBLE INTEGER into a value of the data type DATE_AND_TIME.
Input
Output
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:=489342630;
DT_value: DATE_AND_TIME:=DT#2001-01-01-00:00:00;
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,UDINT_TO_DT!,Instance,15,2,23,4,,?D?C);
B(B_VARIN,,UDINT_value,13,2,15,4,);
B(B_VAROUT,,DT_value,23,2,25,4,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
DT_value := UDINT_TO_DT(UDINT_value);