Back to tutorials

HMI / PLC Fundamentals - Syncing & Sending PLC Time to HMI Terminal

Vladimir Romanov
December 1, 2018
Table of Contents


Time synchronization is an important step for displaying the right information to the machine operators, SCADA based data logging and for general accessibility. Creating this link between an HMI and PLC system is not as straightforward as one might think. That being said, time synchronization becomes quite simple after you’ve done it once.

We will be exploring this process between a CompactLogix L24ER processor programmed in v30 Studio 5000 and an HMI running v5.10 FactoryTalk View ME application. Through this process, we will also create a UDT for our structure and send it over as a regular tag in order to use it independently from the time logged by the HMI terminal.

UDT Time Structure in Studio RSLogix 5000

The UDT structure will support all of the registers which will store the current time on the Programmable Logic Controller (PLC). This structure can be used inside the Studio 5000 program as well as through the HMI application. It’s also labeled intuitively, so the registers are self-explanatory.

Note: it’s important to place the registers in this exact order as the copy instruction will populate the UDT in this same order. If this order isn’t followed, the data will not match the info placed inside.

Here’s a snapshot of the finalized UDT:

UDT Time Synchronization PLC HMI Studio 5000 FactoryTalk View ME

In the UDT above, we have 7 distinct members all of the type DINT:

  • Year
  • Month
  • Day
  • Hour
  • Minute
  • Second
  • Microsecond

GSV – Get System Value Instruction

The Get system Value, or the GSV, instruction is used to retrieve the data from our PLC registers. This instruction is similar to what a MOV instruction accomplishes but will be primarily applied to hardware-based registers which you can’t get otherwise.

To retrieve the current time settings from the PLC, we need to specify a class name of “WallClockTime” as well as a destination register which is based upon the UDT we created before. In this program, this register is labeled as “PLCTime”. Furthermore, a starting register must be specified to load our data. In this case, it’s the “.Year” designation. All of the registers will be loaded.

GSV Get System Value Instruction

Setting HMI Time through Global Connections

Now that we have our structure and the controller is in Run Mode, we can create the link from the HMI. This process requires us to add the PLC to the Communications tree of the HMI. This process is covered in one of the earlier tutorials: HMI to PLC Tag Based Link Tutorial.

Once the link is created, we need to open the “Global Connections” menu and add the appropriate tags from the PLC UDT structure to the HMI cells. Here’s what the outcome looks like:

FactoryTalk View ME Time Tags

Displaying PLC Based Time directly on HMI Screens

Although the method above will synchronize the time on the HMI terminal, it’s preferable to skip this procedure altogether and format the time based on what it’s set to on the PLC. This practice allows the engineer to keep the time in one place and display it exactly as it is on the main system. Furthermore, in most cases, you will be relying on the PLC time for your SCADA system thus making it the most important asset.

This is accomplished simply by creating a numeric display tag sequence which retrieves the same tags we’ve defined above. Although the sequence of numeric displays requires some tweaking, it allows one to use it all over the place once it’s properly implemented. Here’s a quick design of the said system. Each numeric display is properly formatted and links back to the PLC tags we’ve described above.

FactoryTalk View Time Display Design


Synchronizing the time between the PLC and the HMI can be tricky, but is very important for anyone working with control systems. The steps outlined above will synchronize the time between a PLC system running RSLogix or Studio 5000 and an HMI which is designed through FactoryTalk View Studio ME.

Video Tutorial

Back to tutorials

Got a question or comment?

Related Tutorials


Opto 22 groov RIO Getting Started

The groov RIO module from Opto 22 has been released only a few months ago. The groov RIO is a feature packed piece of hardware that is easy to install, configure and deploy for many different field applications. The module comes pre-loaded with an array of software tools used across the industry and is ready to hit the floor running out of the box. Furthermore, the module is equipped with user configurable input and output nodes that have the capability unlike anything else on the market.

August 2, 2020
Vladimir Romanov

Micro800 PLC Programming Getting Started

The Micro800 Control Systems by Rockwell Automation provide a cost effective solution for small to medium automation systems. The controllers within this family are typically used on stand alone machines or small process applications. The family offers five distinct controller types that are further customizable through add-on modules: Micro810, Micro820, Micro830, Micro850 and Micro870.Micro800 Programmable Logic Controllers Getting StartedUnlike the other Rockwell Automation controllers, this line of PLCs is programmed through a dedicated software: Connected Components Workbench. From within this tool, the programmer can flash the firmware, load the program and monitor the state of the controller. Furthermore, Connected Components Workbench (CCW) is often used to program other non-PLC Rockwell Automation devices such as Variable Frequency Drives (VFDs) and certain Safety Relays.

July 26, 2020
Vladimir Romanov

An Introduction to DeviceNet Industrial Networks

In this tutorial you will learn about the DeviceNet industrial network, go over a basic offline configuration, and explore some advanced features.

July 24, 2020
Jacques Venter