Date and time instructions
292
Part II IEC Instructions
IS_VALID_DT_INT
Check whether DATE_AND_TIME is valid
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.
PLC types Availability of IS_VALID_DT_INT (see page 1327)
Data type I/O Function
INT
1st input
2nd input
3rd input
4th input
5th input
6th input
7th input
year
month
day
hour
minute
second
millisecond
BOOL output set to TRUE if the resulting date and time value is valid
Description
IS_VALID_DT checks whether the combination of INT values for year, month, day, hour, minute,
second, and millisecond is a valid date and time value. The Boolean output flag is set if the date
and time value is valid.
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