The RTC (Real-Time Clock) of the controller is considered as UTC (Coordinated Universal Time). The biases for the selected timezone and the current period (standard time or daylight saving time) are added in the application program.
In this application example, three timezones have been pre-defined:
oCentral European time (UTC+1)
oNorth American Central time (UTC-6)
oAustralian Eastern time (UTC+10)
The pre-defined timezones can be adapted to your application needs or you can configure one or more additional timezones. The desired timezone can be selected from the controller application.
The timezone configurations and the selection of the timezone are stored as persistent variables, in the non-volatile memory of the controller. Therefore, they are retained when an application download is performed.
The application example implements a visualization with the Logic Builder within the EcoStruxure Machine Expert software which provides:
oStatus controller tab to monitor the current settings
oSwitchable control tab to set up the timezone configuration, set the RTC manually or to synchronize the RTC with a time server
The main features of this application example include:
oVisualization for monitoring and control the RTC of the controller
oSelection between three pre-defined timezones
oConversion of the local time to UTC based on the selected timezone
oSet the RTC of the controller based on the local time
oSynchronize the RTC of the controller with a time server over the network using the SNTP (Simple Network Time Protocol) client
oCyclic reading of the RTC of the controller
oConversion of UTC to the local time based on the selected timezone
oOutput of current time and date in UNIX time format
oOutput of current time and date in a structured and ergonomic format
oOutput of the calculated switching limits for the daylight saving time
oAdjusting a weekly drift for the RTC of the controller
oMonitoring the status of the controller backup battery