Book Image

PLC and HMI Development with Siemens TIA Portal

By : Liam Bee
Book Image

PLC and HMI Development with Siemens TIA Portal

By: Liam Bee

Overview of this book

With automation requirements on the rise, Siemens’ TIA Portal development environment is almost a necessity for any automation engineer. The Totally Integrated Automation (TIA) environment helps seamlessly integrate all things automation, from PLC hardware and software design to HMI development. This book helps you understand the tools available in the TIA toolbox and shows you how to write code effectively. The book begins by introducing you to the TIA environment, covering the layout and tools available. Once you’ve got to grips with the environment, you’ll find out how to create hardware to write programs against, including adding IO modules and assigning memory for input and output. Next, you'll develop logic in all of the languages that TIA Portal offers, such as Ladder, Function Block Diagram, and Structured Text (SCL) (note that Statement List is not covered as a deprecated language), as well as the newest language, Cause and Effect (CEM). You’ll also discover how to store standard code in libraries, creating a version control system that is easy to manage and aids standard design. Finally, following the PLC design chapters, you’ll learn how to develop HMI applications in TIA Portal’s latest unified hardware. By the end of the book, you'll be well equipped to use all of the features that TIA Portal V17 offers.
Table of Contents (21 chapters)
1
Section 1 – The TIA Portal – Project Environment
5
Section 2 – TIA Portal – Languages, Structures, and Configurations
11
Section 3 – TIA Portal – HMI Development
16
Section 4 – TIA Portal – Deployment and Best Practices

The Reference and Details views – tools to aid development

TIA portal has some handy views that aren't immediately obvious as to their usefulness. Two views are particularly useful, as outlined here:

  • Reference project view
    • Allows TIA to open a second project in Read-Only mode, to be used as a reference or guide to the current project
    • Blocks and other objects can be copied from the reference project
  • Details view
    • Offers a quick-peek-style view of the selected object in the project tree
    • Allows the selection of internal object data for dragging and dropping into the programming view

Both of these views appear as panels on the left-hand side of the TIA Portal view.

Note

By default, TIA Portal has the Reference projects panel disabled. Both panels can be enabled (or disabled) by clicking View from the top menu and then checking the panels to be made visible.

Reference projects

Making use of a previous project as a template is a great way to maintain consistency between projects. Loading two instances of TIA Portal should be avoided if possible as TIA Portal can be resource-hungry; lighter development machines may lack the resources to maintain two or more instances of TIA Portal. You can see the Reference projects panel in the following screenshot:

Figure 1.12 – Reference projects panel

Figure 1.12 – Reference projects panel

With reference projects, multiple projects can be open at the same time in Read-Only mode.

Reference projects can be opened and closed via the buttons immediately below the title banner.

Once the project is expanded in the reference project view, it resembles exactly the same view as the project tree, with all objects available as they would be if the project were to be opened normally.

Once a reference project is open and expanded, items within it (such as program blocks) can be opened and read as normal; however, a gray hue will appear on the object icon to indicate it is a reference object, as illustrated in the following screenshot:

Figure 1.13 – Reference object indication example

Figure 1.13 – Reference object indication example

The difference is very subtle—ensure that the correct blocks are being worked with (although it is not possible to write to a reference block).

Uses of reference projects

There are many different reasons why a reference project may be used to aid development. In most cases, a reference project is used to serve as a guide; however, the following functionalities are also available:

  • Copying information between the reference project and main project: Objects from the reference view can be copied and pasted into the main project tree or dragged and dropped. This is a useful way to move blocks quickly between two projects.
  • Comparison of objects: Objects can be compared between the reference project and the main project.mp file. This is a useful feature that allows programmers to quickly check the differences between two offline projects.

    Note

    To compare the reference project with the main project, right-click on an object and select Quick compare | Select as left object. Then, select the object to compare with and right-click, and then select Quick compare | Compare with <previously selected left object>.

    TIA Portal will then compare the objects and display any differences.

Details view

The Details view pane is best described as a mini-project tree that shows only the child objects of the currently selected object in the project tree.

This is particularly useful when programmers want to drag and drop objects into the main activity area, as in the following screenshot example:

Figure 1.14 – Example of Project tree and Details view displaying the same child objects

Figure 1.14 – Example of Project tree and Details view displaying the same child objects

Note

Not all options are available for an object when selected in the Details view. For example, an object can be opened, but cannot be renamed from the Details view pane.

Right-click options are also unavailable.

Uses of the Details view

The Details view pane is only capable of showing child objects and will not show any information when there are no child objects available.

The Details view pane would typically be used to do the following:

  • Preview child objects in a selected parent object.
  • Directly open child objects in a selected parent object.
  • Check basic details such as the block number or comments assigned to objects.

Overview view mode

The Details view pane also works in the Overview view mode, behaving in the same manner as if the object had been selected from the project tree directly.

The Overview view mode is similar to the Details view but uses the main activity area to display the results and shows all objects within the previously opened object.

The Overview view mode is entered by clicking the persistent Overview button at the bottom left of TIA Portal.

Note

Users of SIMATIC Manager (Siemens older development software) may find the Overview mode familiar when in the Details view (using the tabs at the top of the view). This displays blocks in a familiar way to how SIMATIC Manager displays blocks in the Details view.