Date and time instructions
288
Part II IEC Instructions
CONCAT_TOD_INT
Concatenate INT values to form the time of day
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
Inverse instruction: SPLIT_TOD_INT (see page 298)
PLC types Availability of CONCAT_TOD_INT (see page 1318)
Data type I/O Function
INT
1st input
2nd input
3rd input
4th input
hour
minute
second
millisecond
TIME_OF_DAY output result
BOOL output The Boolean output ERROR is set if the input values
are invalid date or time values.
TOD_value := CONCAT_TOD_INT(HOUR := HOUR_value,
MINUTE := MINUTE_value,
SECOND := SECOND_value,
MILLISECOND := MILLISECOND_value,
ERROR => ERROR);
Description
CONCAT_TOD_INT concatenates the INTEGER values for hour, minute, second, and millisecond.
The result is stored in the output variable of the data type TIME_OF_DAY. The Boolean output
ERROR is set if the input values are invalid date or time values.
Data types
Example
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
POU header
All input and output variables used for programming this function have been declared in the POU
header.
LD
ST
When programming with structured text, enter the following: