DTAt

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Generate a pulseClosed When the step gets activated, the action is activated for a single execution, and possibly once again when the step is deactivated. at designated time stamp (date and time).

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

ResetClosed New start of the microprocessor. command.

Outputs

Output

Data Type

Range

Unit

Description

QAt

BOOL

TRUE, FALSE

N/A

Pulse signal.

QPast

BOOL

TRUE, FALSE

N/A

True if elapsed.

Remarks


  • The real-time clockClosed Clock signal. 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).
  • 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 functionClosed A function calculates a result according to the current value of its inputs. 
A function has no internal data and is not linked to declared instances. block. *)
Op1: CAL MyDTAT (YEAR, MONTH, DAY, TMOFDAY, RST)
FFLD  MyDTAT.QAT
STClosed Structured text - A high-level language that is block structured and syntactically resembles Pascal.  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