clockNow (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


This function to read the current time - expressed as seconds since 1980-1-1 00:00:00 (Also called LINSEC).

 

Input:

None

 

Returns: DINT

The current time as seconds since 1980-1-1 00:00:00 (LINSEC).

 

Declaration:

FUNCTION clockNow : DINT;

 

 

Example:

INCLUDE rtcu.inc
 
VAR
  a : DINT;
END_VAR;
 
PROGRAM test;
 
BEGIN
  a := clockNow();
// 'a' contains the current time as number of seconds since 1980-1-1 00:00:00
  ...
END;
 
END_PROGRAM;