DTAt

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Generate a pulse 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

Reset command.

Outputs

Output

Data Type

Range

Unit

Description

QAt

BOOL

TRUE, FALSE

N/A

PulseClosed When the step gets activated, the action is activated for a single execution, and possibly once again when the step is deactivated signal.

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).
  • 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
STClosed "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