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:
|
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:
|
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:
|
TimeZoneString | INT | GSV SSV | Time zone for the time value. |
Provide Feedback