Concatenate date and time of day
CONCAT_DATE_TOD concatenates a value of the data type DATE with a value of the data type TIME_OF_DAY.The result is stored in the output variable of the data type DATE_AND_TIME.
Input
date
time of day
Output
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
DT_value: DATE_AND_TIME:=DT#2001-01-01-00:00:00;
DATE_value: DATE:=D#2011-12-24;
TOD_value: TOD:=TOD#18:29:59;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 3 ;
NETWORK_BODY
B(B_VARIN,,DATE_value,15,0,17,2,);
B(B_VARIN,,TOD_value,15,1,17,3,);
B(B_VAROUT,,DT_value,28,0,30,2,);
B(B_F,CONCAT_DATE_TOD!,Instance,17,0,28,3,,?D?D?C);
L(1,0,1,3);
END_NETWORK_BODY
END_NET_WORK
END_BODY
DT_value := CONCAT_DATE_TOD(DATE_value, TOD_value);