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 |
FALSE, TRUE |
N/A |
No default |
Reset command. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
QAt |
BOOL |
FALSE, TRUE |
N/A |
Pulse signal. |
QPast |
BOOL |
FALSE, TRUE |
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 (zero).
- 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 Example
FFLD Language Example
- In the FFLD Language, the block is activated only if the input rung is TRUE.
- Called only if EN if TRUE.
IL Language Example
(* MyDTAT is a declared instance of DTAT function block. *)
Op1: CAL MyDTAT (YEAR, MONTH, DAY, TMOFDAY, RST)
FFLD MyDTAT.QAT
ST QAT
FFLD MyDTATA.QPAST
ST QPAST
ST Language Example
(* MyDTAT is a declared instance of DTAT function block. *)
MyDTAT (YEAR, MONTH, DAY, TMOFDAY, RST);
QAT := MyDTAT.QAT;
QPAST := MyDTATA.QPAST;
See Also