DTAt
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Year |
DINT |
1900 to 2200 |
Years |
No default |
Year of the time stamp (e.g., 2006). |
Month |
DINT |
1 to 12 |
Months |
No default |
Month of the time stamp (1 = January). |
Day |
DINT |
1 to 31 |
Days |
No default |
Day of the time stamp . |
TmOfDay |
TIME |
0 to 86,399,999 |
Milliseconds |
No default |
Time of day of the time stamp. |
RST |
BOOL |
TRUE, FALSE |
n/a |
No default |
Reset command. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
QAt |
BOOL |
TRUE, FALSE |
N/A |
|
QPast |
BOOL |
TRUE, FALSE |
N/A |
True if elapsed. |
Remarks
-
-
The real-time clock may not be available on all controller hardware models.
See the controller hardware specifications for real-time clock availability.
- Parameters are not updated constantly.
They are taken into account when only:- The first time the block is called.
- When the reset input (RST) is TRUE.
- In these two situations, the outputs are reset to FALSE.
- The first time the block is called with RST=FALSE and the specified date/stamp is passed:
- The output QPAST is set to TRUE.
- The output QAT is set to TRUE for one cycle only (pulse signal).
- The first time the block is called with RST=FALSE and the specified date/stamp is passed:
- Highest units are ignored if set to 0.
- Example: If arguments are year=0, month=0, day = 3, tmofday=t#10h, the block triggers on the next 3rd day of the month at 10h.
FBD Language
FFLD Language
In the FFLD language, the block is activated only if the input rung is TRUE.
(* Called only if EN is TRUE. *)
IL Language
(* MyDTAT is a declared instance of DTAT function block. *)
Op1: CAL MyDTAT (YEAR, MONTH, DAY, TMOFDAY, RST)
FFLD MyDTAT.QAT
ST "Structured text" A high-level language that is block structured and syntactically resembles Pascal QAT
FFLD MyDTATA.QPAST
ST QPAST
ST Language
(* MyDTAT is a declared instance of DTAT function block. *)
MyDTAT (YEAR, MONTH, DAY, TMOFDAY, RST);
QAT := MyDTAT.QAT;
QPAST := MyDTATA.QPAST;
See Also