Using the R_NTPC Block for Time Synchronization
Original instructions
R_NTPC Representation
The block reads the Ethernet network system time and transfers it into specified parameters. The additional parameter EN should be configured.
R_NTPC block has a 16-bit status word.
R_NTPC Parameter Description
Description of parameters:
Parameter
Data Type
Description
Display_NTPC
(OUT1)
DT + INT
NTP clock value displayed in:
  • year, month, day, hours, minutes, and seconds using the DT format
  • milliseconds as an INT
Calc_NTPC
(OUT2)
UDINT+INT
NTP clock value displayed in:
  • seconds as an UDINT
  • fractions of a second as an INT
Status
INT
Low Byte
High Byte
Description
0
0
un-initialized state
1
0
illegal
0
1
The CPU is out of synchronization with the NTP server, but the clock has been updated at least once by an external server.
1
1
normal operation
The low byte is managed by the controller
  • Set = 0
    • The clock value is NOT available.
    • The date/time is NOT updated within last two minutes.
  • Set = 1
    • The date/time is updated within the last two minutes.
    • The date/time is acceptable.
The high byte is managed by the NOE.
  • Set = 0
    • The NTP server clock value is not available.
  • Set = 1
    The updated date/time is received from server and sent to the module (at least once).
    • within two-minute time interval
    • acceptable (10 ms or less error)
For a valid time in the CPU, the low and high bytes of the STATUS parameter must be set to 1.