Using the R_NTPC Block for Time Synchronization
Original instructions
R_NTPC Representation
The R_NTPC block reads Ethernet network system time and transfers it into specified parameters. The additional parameter EN should be configured.
The 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
    • clock value NOT available
    • date/time NOT updated within last two minutes
  • Set = 1
    • date/time updated within the last two minutes
    • date/time acceptable
The high byte is managed by the ETY
  • Set = 0
    • the NTP server clock value is not available
  • Set = 1
    updated date/time received from server and sent to module (at least once)
    • within two minute time interval
    • acceptable (10 ms or less error)