Access the WallClockTime object

The WallClockTime object provides a timestamp that the controller can use for scheduling.
TIP:
Setting the WALLCLOCKTIME object is limited to no more than one update every 15 seconds.
IMPORTANT:
To ensure proper time is read using the GSV instruction, include the WALLCLOCKTIME GSV in only one user task.
IMPORTANT:
To ensure proper time is read using the GSV instruction, place the UID/UIE instruction pair around the WALLCLOCKTIME GSV instances in user tasks that can be interrupted by WALLCLOCKTIME GSV instances in other tasks. No UID/UIE pair is required when the WALLCLOCKTIME GSV exists in only one user task.
IMPORTANT:
When disabling PTP on a controller, to give the controller time to process the disable, use a two-second delay before setting the WallClockTime (WCT) in the controller. Otherwise, there is a risk of the grandmaster clock overwriting the WCT.
Attribute
Data Type
Instruction
Description
ApplyDST
SINT
GSV SSV
Identifies whether to enable daylight savings time. Each value has a specific meaning:
  • 0. Do not adjust for daylight savings time.
  • Non zero. Adjust for daylight savings time.
CSTOffset
DINT[2]
TIME32[2]
TIME
GSV SSV
Positive offset from the CurrentValue of the CST object (coordinated system time). Value in microseconds. The default is 0.
CurrentValue
DINT[2]
DT
LINT
GSV SSV
Current value of the wall clock time. The number of microseconds elapsed since 0000 hours 1 January 1970.
Note:
You can set this value to no later than 12/29/2068.
The CST and WALLCLOCKTIME objects are mathematically related in the controller. For example, if adding the CST CurrentValue and the WALLCLOCKTIME CSTOffset, the result is the WALLCLOCKTIME CurrentValue.
DateTime
DINT[7]
DATETIMESTRUCT
GSV SSV
The date and time. Each value has a specific meaning:
  • DINT[0]. Year
  • DINT[1]. Month (1...12)
  • DINT[2]. Day (1...31)
  • DINT[3]. Hour (0...23)
  • DINT[4]. Minute (0...59)
  • DINT[5]. Seconds (0...59)
  • DINT[6]. Microseconds (0...999,999)
DSTAdjustment
INT
GSV SSV
The number of minutes to adjust for daylight saving time.
LocalDateTime
DINT[7]
DATETIMESTRUCT
GSV SSV
Current adjusted local time. Each value has a specific meaning:
  • DINT[0]. Year
  • DINT[1]. Month (1...12)
  • DINT[2]. Day (1...31)
  • DINT[3]. Hour (0...23)
  • DINT[4]. Minute (0...59)
  • DINT[5]. Seconds (0...59)
  • DINT[6]. Microseconds (0...999,999)
TimeZoneString
INT
GSV SSV
Time zone for the time value.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.