From time to time it is necessary to set the HMI System time. The System time is for the HMI is the same as the time and date on your PC and it drifts over time. When this happens, the Time and Date tools in Xpress will be "off" from the actual time of day. It is also used by alarms for their activation and deactivation time. If this data is being compared to the PLC time and the times are not synchronized it makes it hard to correlate issues.
The system time can be set by exiting the application and getting into the hardware settings from the Xpress Home screen if the users have a Admin level password and an Exit button to get to the Home screen. If not, there are System Tags that can be used to monitor the local HMI hardware system time and Device tags that can be linked to registers in the PLC or to Local Tags.
When you look at the tags in the tag list the description tells what they are but not exactly how they work or are related to each other.
The _HMI_System time and date tags are READ ONLY tags that contain the HMI hardware System clock time and date information.(System)
These are commonly used on tools to display the Current Time and Date of the XPR Hardware System Clock. When not triggering the TimeSync automatically, users will make a display that has the system time and date and the device time and date values in tools and a button to trigger the time sync when they see the values have diverged excessively.
The _HMI_Device tags only contain values when they are assigned to addresses in the PLC or assigned to Local Tags to make a page to set time in your application. (Device)
They are in no way intrinsically linked to one another.
The TimeSync tag triggers Xpress to take the values being read from the PLC in the Device tags and writes those values directly to the XPR Hardware system clock. It is just like going to the shell and changing the date and time there, or in Windows opening the date and time dialog and changing it. It is all written directly to the mother board system clock registers.
If the devices they are talking to do not have clocks but they want the user to be able to set the time and date on the HMI without being able to exit back to the shell, they can set the _Device tags to local variables and assign them to numeric input tools and manually enter date and time values to be written to the HMI system clock.
The tags below are used in an example application with a panel the shows the current System time and entry tools to set the values of the device tags and a push button that triggers Xpress to Write the values from the user input local tags assigned to the Device tags to the HMI Hardware Clock.
Demo Application to Sync time to Local tags set to user tools. To attach to PLC just change the Local Tags to PLC Addresses.
Download and unzip into your Xpress Projects Folder. The Extracted file has an extension of .lrp
edited dom 02/13/2019