SNTP Client

The AC500 can receive time information from NTP server(s) in the network and adjust its local clock accordingly. The configuration of the SNTP protocol: SNTP Client Configuration

When the main server cannot be reached for 5 consecutive times, an Error class 4 is raised and the backup server will be used. If the backup server also cannot be reached for 5 consecutive times, an Error class 3 is raised.

According to the RFC specification, the SNTP client will wait a random amount of time between 1 and 5 minutes before performing the first time request after starting up the user program (PLC in RUN).

To avoid this behavior, the configuration option Wait for sync before RUN can be set, so that the user program is not allowed to run before the time was synchronized at least once.

The PLC will try to sync for a configurable amount of time (Time to wait for sync) before either allowing the user program to switch to RUN or raising an error class 4 and keeping the PLC is STOP.

The clock in the AC500 is prone to drift just like any clock based on an oscillating quartz.

Any adjustments of the clock will be attempted by speeding up or slowing down the internal clock.

But there may be situations where the difference becomes too large to adjust the clock this way and the clock needs to be set to the new time without gradual adjustments. This is called a time jump and may not be wanted in some applications. To mitigate this, another set of configuration options exist: Allow time jumps and allowed threshold for time jumps”.

These parameters can be used to either completely disallow jumps or keep them in an acceptable range. By default time jumps are allowed with a maximum of 60 seconds difference. Any jumps higher than the configured threshold will not be allowed and raise an error class 4.

Note

The first synchronization is always allowed to jump any value because the default date in the PLC is 01.01.1970 00:00 and thus needs to jump several years to reach current date.