Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
PLC and HMI Development with Siemens TIA Portal

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

Product type Book
Published in Apr 2022
Publisher Packt
ISBN-13 9781801817226
Pages 436 pages
Edition 1st Edition
Languages
Author (1):
Liam Bee Liam Bee
Profile icon Liam Bee

Table of Contents (21) Chapters

Preface 1. Section 1 – The TIA Portal – Project Environment
2. Chapter 1: Starting a New Project with TIA Portal 3. Chapter 2: Creating Objects and How They Fit Together 4. Chapter 3: Structures and User-Defined Types 5. Section 2 – TIA Portal – Languages, Structures, and Configurations
6. Chapter 4: PLC Programming and Languages 7. Chapter 5: Working with Languages in TIA Portal 8. Chapter 6: Creating Standard Control Objects 9. Chapter 7: Simulating Signals in the PLC 10. Chapter 8: Options to Consider When Creating PLC Blocks 11. Section 3 – TIA Portal – HMI Development
12. Chapter 9: TIA Portal HMI Development Environment 13. Chapter 10: Placing Objects, Settings Properties, and Events 14. Chapter 11: Structures and HMI Faceplates 15. Chapter 12: Managing Navigation and Alarms 16. Section 4 – TIA Portal – Deployment and Best Practices
17. Chapter 13: Downloading to the PLC 18. Chapter 14: Downloading to the HMI 19. Chapter 15: Programming Tips and Additional Support 20. Other Books You May Enjoy

Online testing environment

The Testing tab on the right-hand side of the TIA Portal application contains tools that are used only when a device is connected via the Go online function.

If no device is connected to, the Testing tab will simply display No online connection in the central processing unit (CPU) operator panel, and other functions are not available.

The Go online function can be found on the top menu bar—it looks like this:

Figure 1.26 – Go online function

Figure 1.26 – Go online function

Once clicked, a connection dialog will open that allows CPUs and other devices to be searched for and connected to, as illustrated in the following screenshot:

Figure 1.27 – Go online dialog that allows connection to devices

Figure 1.27 – Go online dialog that allows connection to devices

In the Go online dialog (Figure 1.27), devices can be searched for and connected to. Different interfaces can be selected from drop-down lists, and different subnets can be specified if required. Once the desired device is found, highlight it and click GoOnline. This will then connect the development environment to the device.

CPU operator panel

Once online, the Testing tab—specifically, the CPU operator panel—now contains data (if connected to a CPU in the project), as illustrated in the following screenshot:

Figure 1.28 – CPU operator panel once online and connected to a CPU

Figure 1.28 – CPU operator panel once online and connected to a CPU

These controls allow the CPU (PLC) to be stopped via the STOP button, memory reset via the MRES button, and placed back in to run via the RUN button.

The status of the CPU can also be read in this panel via the RUN/STOP, ERROR, and MAINT status LEDs. This is useful if the CPU is not local to the programming device running TIA Portal (connected via a virtual private network (VPN) connection, for example).

Call environment

The call environment is an important part of viewing and monitoring online code. In TIA Portal, a program block may be called more than once and via a different call environment (called by a different parent or instance). The Call environment panel in the Testing tab allows the call path to be defined, as illustrated in the following screenshot:

Figure 1.29 – Call environment panel

Figure 1.29 – Call environment panel

Figure 1.29 demonstrates a call path to a program block. When the Change … button is pressed, a list of available call paths is displayed. A call path can be selected, and TIA Portal will then monitor the selected call path.

Note – SIMATIC Manager

Programmers who have worked with Siemens SIMATIC Manager may remember that multiple calls to the same function block on the same call path mean that only the first instance is available to be monitored. TIA Portal rectifies this behavior by also allowing instances to be selected.

Breakpoints

Breakpoints are used to pause the execution of the CPU in order to help debug programming logic. They are only available in Structured Control Language (SCL) and Statement List (STL) languages and are not available on all CPUs.

Warning – Outputs

If a breakpoint halts the execution of the CPU, outputs may remain in their current state until the breakpoint is released! This could cause damage to assets or personnel. It is important to understand the risks associated with using breakpoints in a live equipment environment.

Breakpoints and their usage are advanced topics that relate only to textual languages. Using breakpoints effectively is covered in more detail in Chapter 5, Working with Languages in TIA Portal.

Call hierarchy

When in offline mode (not online with a CPU), the Call hierarchy pane always displays No call path available.

When in online mode with a CPU and actively monitoring a program block via the Monitor function , the Call hierarchy pane displays the relative call path to the block being monitored, as illustrated in the following screenshot:

Figure 1.30 – Example of an object called by OB1

Figure 1.30 – Example of an object called by OB1

Figure 1.30 shows an example of a function block that is called by Main [OB1]. Should the block being monitored have multiple parents, the entire call hierarchy will be displayed.

You have been reading a chapter from
PLC and HMI Development with Siemens TIA Portal
Published in: Apr 2022 Publisher: Packt ISBN-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.
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 AU $19.99/month. Cancel anytime}