8-5
8 CPU Unit Functions
NJ-series CPU Unit Software User’s Manual (W501)
8-1 Data Management, Clock, and Operating Functions
8
8-1-2 Clock
Application
In a network system, the clock data must be shared by the entire system. NTP is supported to
enable easy time synchronization.
Specifications
An NTP client is provided.
Refer to the NJ-series Built-in EtherNet/IP User’s Manual (Cat. No. W506) for details.
If the clock data is incorrect, the incorrect value is read.
Reading the Clock Data from Instructions
You can use the GetTime instruction to read the clock data from the user program.
Reading the Clock from System-defined Variables (Writing Is Not Possible)
You can use the following system-defined variable to read the clock data.
_CurrentTime (System Time)
Sysmac Studio Procedure
You can select Controller Clock from the Controller Menu of the Sysmac Studio to display the clock
data.
When you change the clock data, an event is recorded in the event log. However, nothing is recorded in
the event log if the time is corrected for the NTP.
Correcting the Clock from an NTP Server
Reading the Clock Data
Logging
Related System-defined Variables
Variable name Meaning Description Data type R/W
_CurrentTime System Time This variable contains the CPU Unit’s inter-
nal clock data.
DATE_AND_TIME R