The PLC has a real time clock which, among other things, is used to control weekly and exception schedules.
The Real Time Clock, RTC is backed up by a battery. Time setting is not influenced by power outages. However, it is advised to check the correct time when servicing the device. The correction may also follow automatically over NTP if the PLC is connected to the Internet, or if there is a NTP server available in the network.
Manual time setup is executed as follows: Right click to PLC - PLC Operation - PLC Setup - Time setup:
Or: System status - Right click on UTC time - Time setup:
Computer time: The PLC clock will be set to the current time of the PC from which the setting is done. The fastest and easiest correction, mostly with sufficient accuracy.
Custom time: It is possible to set any time and write it to the PLC by clicking OK.
Note: The PLC real time clock are working with UTC time (central world time). In the PLC Runtime, this UTC time is recalculated to local PLC time, which depends on the time zone setting in the PLC.. When the time is set using the dialogue above, the time entered in the Idekit Studio dialogue (be it the PC time or Custom time) is recalculated to the UTC time according to the time zone set in the PC, and this UTC time is written to the PLC. The time displayed in the PLC is the UTC time set in the PLC, recalculated to local PLC time according to the time zone which is set in the PLC. Therefore, it may happen that if the PC and PLC have different setting of time zones, the PLC time will not be the same as the PC local time. If the PLC and PC are located in different time zones, this may not be an error.
If the PLC is in a network with Internet access, a NTP server can be used for time synchronization. Some technology networks even operate their own internal time servers, so the NTP time synchronization is possible even without Internet access. Consult the network administrator for more details.
The NTP server synchronization is configured in the PLC properties. Click the PLC and in the Property grid select Date/Time Settings:
UTC offset: how big (in hours) is the difference between the World time (UTC, Universal Time Coordinated, "London time") and the current zone time. For Central Europe this is +1 hour.
NTP server URL: address of NTP server to synchronize time with. The URL must be entered inclusive protocol name and port: "ntp://...:123". Check also the general network settings below (Networking) - the PLC must have access to the Internet (or to the network the NTP server is in).
NTP request period: how frequently the PLC has to contact the NTP server and synchronize time; entered in hh:mm:ss. Normally, once per 24 hours is OK. This item is used only in PLCs with FreeRTOS operating system.
NTP client functionality:
- PLC with FreeRTOS : If the time difference between PLC and NTP server is greater than 1 hour, the synchronisation takes place immediately. If the difference is lower than 1 hour, the synchronisation follows in small steps at a speed of 2 s / min.
- PLC with Linux : uses standard cron Linux service, launched every 3 hours
Daylight offsets: table of transitions between normal time and daylight saving time. Select a profile for your time zone to set the UTC offset and transition dates for next 20 years.
Check the time zone settings and transition settings when commissioning especially if the PLC is installed in another time zone than Central Europe. When the time is set in the PLC on a remote basis, the Universal time (UTC) is set, hence if the PLC is in a time zone different from the zone of the PC, the time is set correctly according to the zone the PLC is installed in.