FUNCTION_BLOCK DT_NOW

Hover on a highlighted element
to pop up its description (if any).

Upon the occurrence of an event at the REQ input, an instance of this Function Block type sets the underlying value of OUT to the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. In the FBRT, this function is performed by the following algorithm:

ALGORITHM REQ IN Java : (* Samples the current date and time *)
  OUT.value.setTime(java.lang.System.currentTimeMillis());
END_ALGORITHM

NOTE - The computed value corresponds to the ASN.1 encoded value of DATE_AND_TIME specified in Note (5) of Table E.1 of IEC 61499-1, with the additional constraint that the base reference time is expressed in UTC.