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

Related Tutorials


HMI Software - Different Tools, Applications and Solutions to Meet Your Needs

HMI Software is commonly referred to as the development application that will be used to create the runtime application for an HMI terminal. It’s important to understand this distinction as we will be going over the HMI development environments used by PLC and HMI programmers to create the screens rather than the end-user applications you will see at the plant level.Numerous HMI programming software solutions are found on the market. Although they aim to achieve the same result, different packages have a distinct advantage over others in terms of price, reliability, ease-of-use and technical capability. It is therefore possible to find the right solution that will fit your specific application if you spend the time to research all options.

September 25, 2020
Vladimir Romanov

PLC Programming Example Project - Batching Tank Ladder Logic PLC and HMI Tutorial

Generally speaking, there are two types of processes in manufacturing: discrete and analog. A discrete process is a manufacturing methodology that will produce separate widgets. In other words, a production line may output one item, two items, three items, etc. An analog production process is where the plant will create a quantity of product that is quantifiable by weight. Examples include the production of beverages, sauces, raw ingredients, etc. Although it is possible to design a flow that will continuously output the product, such production is often managed in batches. It is important to note that although batches are considered to be analog or continuous flow, most of them end up being packaged for consumption which converts them into a discrete manufacturing process.

September 14, 2020
Vladimir Romanov
PLC Programming Career

PLC Programming Certification - Complete Guide

You may choose to pursue a traditional college degree, learn through online tutorials, or take a course that will issue a plc programming certification upon completion. However, what is the best option, and what are the best PLC programming certifications?

August 6, 2020
Vladimir Romanov