Reader small image

You're reading from  PLC and HMI Development with Siemens TIA Portal

Product typeBook
Published inApr 2022
PublisherPackt
ISBN-139781801817226
Edition1st Edition
Right arrow
Author (1)
Liam Bee
Liam Bee
author image
Liam Bee

Liam Bee has worked in automation for over 16 years, after starting his career at 16 years old as an instrument technician in the water industry. He began his automation journey by maintaining PLCs and the instruments connected to them. He found very early on that he had an interest in PLCs and automation, taking the time to learn PLC programming in his own time, as well as exposing himself as much as possible to automation while working. After 8 years of working in maintenance, Liam started his own side business, providing bespoke controls using lower-range PLC solutions. This experience proved invaluable to his progression; he learned quickly, often through failure, and his knowledge of control design improved significantly. 12 years into his career, he moved roles again; this time, he was looking for something to fill knowledge gaps and target Siemens as he was yet to use Siemens extensively. Liam started at Aquabio Ltd and quickly found himself immersed in Siemens SIMATIC Manager and TIA Portal. Over the next 3 years, he worked hard to understand Siemens' tools and development environments, calling on knowledge from other PLC environments that he had previously worked with. Over his years working with automation, he has learned many different languages and development environments. He has worked with Siemens, Allen Bradley, Schneider, Mitsubishi, and a host of other PLC platforms, all of which have helped shape the design concepts that he uses today. Liam has also taught himself computer programming languages such as VBA, VBS, VB.NET, C#, Java, and more. Closing the space between IT and industrial automation is important as time moves forwards and he has always tried his hardest to be at the forefront of innovation.
Read more about Liam Bee

Right arrow

Chapter 11: Structures and HMI Faceplates

This chapter expands further on the benefits of using structured data and faceplates in the Unified Human Machine Interface (HMI) environment. By utilizing faceplates, programmers can standardize graphical objects that use standard structures, completing the structured development approach.

In this chapter, we'll learn how to enhance projects even further using structured approaches and how to pass single tags as structures to an HMI faceplate. This approach enables HMI interfaces to stay updated with programmable logic controller (PLC) interfaces, leading to fast and effective programming.

In this chapter, we'll cover the following topics:

  • What are faceplates?
  • Creating a faceplate
  • Creating interfaces
  • Creating and handling events in faceplates

What are faceplates?

Just as with a function block in a PLC, a faceplate is a reusable object that can be instantiated with its own parameters. This allows an HMI to reuse objects with interface properties populated with different values. You can see an example of a faceplate instantiation in the following screenshot:

Figure 11.1 – Example of faceplate instantiation

Faceplates are very useful for common object controls due to their reusable nature. They also offer a method by which we can update multiple instances by modifying one library version. In Totally Integrated Automation Portal (TIA Portal), faceplates must be created at the Project library level and then instantiated in the project. This ensures the paradigm shown in Figure 11.1 is followed at all times.

TIA Portal V17 faceplates

In TIA Portal Version 17 (V17), there are two types of faceplates: one for Panels / WinCC Runtime Advanced and another for Unified Comfort Panel / WinCC Unified...

Creating a faceplate

Creating a faceplate starts in the Libraries window on the right-hand side of TIA Portal, as illustrated in the following screenshot:

Figure 11.3 – Libraries window

By double-clicking the Add new type object, a new window is opened where a faceplate can be named and the type of faceplate can be selected, as illustrated in the following screenshot:

Figure 11.4 – Adding a new faceplate

After clicking OK, Library view will open and display version 0.0.1 of the new faceplate. The new faceplate will be in the in work status. When a faceplate is in work, it is unavailable to be instantiated.

Note

In work is the equivalent of in test when editing library objects in a PLC.

Available objects and controls

Not all screen objects and controls are available in faceplates. In the Toolbox window on the right-hand side of TIA Portal, the Controls and My Controls tabs are empty when editing a faceplate...

Creating interfaces

Just as with function blocks in the PLC environment, faceplates also have an interface, by which information is passed into the faceplate.

There are two types of interfaces in faceplates, as outlined here:

  • Tag interface: Connectss HMI tags to the faceplate
  • Property interface: Sets properties of objects and elements in the faceplate

By using these two types of interfaces, faceplates can be customized both in the data that the faceplate has access to and the behavior of internal screen objects via their properties.

Tag interface

Tag interface is accessed by clicking the tab in the top right of the main window, as illustrated in the following screenshot:

Figure 11.6 – Tag interface tab

This tab contains interface elements that allow the parent screen to pass data types and associated values to the faceplate.

When passing information to the faceplate from the parent screen, the Faceplate instance must be...

Creating and handling events in faceplates

Some faceplates may require end users to interact with objects within the faceplate, such as a button or an input field. Unlike normal screen objects, faceplates require events to be handled in scripts. This means that programmers will need to write scripts in order to process user events.

You can see an example of an event script in the following screenshot:

Figure 11.12 – Example of an event script

Events can be configured against a selected object by clicking the Properties tab at the bottom of the TIA Portal application and then the Events tab.

On the left side of the Events tab, event triggers are listed. When an event trigger is selected and the Converts the function list to a script button is pressed, as illustrated in the following screenshot, an area will appear in which a script can be written:

Figure 11.13 – Converts the function list to a script button

In faceplates...

Summary

This chapter has explored faceplates and how to create an interface and use a faceplate. By building frameworks and standard objects that use faceplates, UDTs, and standard program blocks, the ease with which projects can be developed increases significantly.

When working with faceplates, it is important to remember that they are encapsulated and have no access to HMI tags or global scripts. In order to use a faceplate, the interface needs to be set up appropriately. It's also worth noting that faceplates must be created in the Project library, and only released faceplates can actually be used in a screen. Similarly, in order to modify a faceplate, the typed version must be edited in the Project library.

The next chapter covers navigation and alarms in the Unified environment. This includes how to raise, accept, and clear alarms, and the differences between PLC-driven alarming and conventional alarming.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
PLC and HMI Development with Siemens TIA Portal
Published in: Apr 2022Publisher: PacktISBN-13: 9781801817226
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Liam Bee

Liam Bee has worked in automation for over 16 years, after starting his career at 16 years old as an instrument technician in the water industry. He began his automation journey by maintaining PLCs and the instruments connected to them. He found very early on that he had an interest in PLCs and automation, taking the time to learn PLC programming in his own time, as well as exposing himself as much as possible to automation while working. After 8 years of working in maintenance, Liam started his own side business, providing bespoke controls using lower-range PLC solutions. This experience proved invaluable to his progression; he learned quickly, often through failure, and his knowledge of control design improved significantly. 12 years into his career, he moved roles again; this time, he was looking for something to fill knowledge gaps and target Siemens as he was yet to use Siemens extensively. Liam started at Aquabio Ltd and quickly found himself immersed in Siemens SIMATIC Manager and TIA Portal. Over the next 3 years, he worked hard to understand Siemens' tools and development environments, calling on knowledge from other PLC environments that he had previously worked with. Over his years working with automation, he has learned many different languages and development environments. He has worked with Siemens, Allen Bradley, Schneider, Mitsubishi, and a host of other PLC platforms, all of which have helped shape the design concepts that he uses today. Liam has also taught himself computer programming languages such as VBA, VBS, VB.NET, C#, Java, and more. Closing the space between IT and industrial automation is important as time moves forwards and he has always tried his hardest to be at the forefront of innovation.
Read more about Liam Bee