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

Getting started with a new project in the Project view

The Project view is the view that most programmers will spend their time in. While the Portal view has its advantages in simplicity, the Project view is a necessity and offers methods to do almost everything that the Portal view can do.

With this in mind, creating a brand-new project in the Project view may be easier for people new to TIA Portal as it follows similar steps to other development platforms.

Note

Remember, on a clean install with default options, TIA Portal will open in the Portal view. In order to get into the Project view, click the text (Project view) in the bottom left of the screen to change modes.

This shows the view that will be switched to when clicked, not the current view.

Starting a new project

When in the Project view, TIA expects a project to be available in order to show anything project-related. At this point, though, no project is available, as none has been created.

A new project can be started by clicking the New project icon in the toolbar at the top of the window, as illustrated in the following screenshot:

Figure 1.5 – New project in the Project view

Figure 1.5 – New project in the Project view

Once the New project icon has been clicked, the following dialog box is presented:

Figure 1.6 – Create a new project dialog box

Figure 1.6 – Create a new project dialog box

This allows the setting of the project name, save path, and author, as well as some comments about the project.

Once the Create button has been clicked, TIA Portal will create (and save) the new project.

Changes to the project tree

Now that a project has been loaded into TIA (the one just created), the project tree is updated with additional objects that relate to the project, as shown in the following screenshot:

Figure 1.7 – Project tree differences when a device is added (left) compared to no device added (right)

Figure 1.7 – Project tree differences when a device is added (left) compared to no device added (right)

These objects relate only to this project and may affect any devices or further objects that are added to the project (Security Settings, for example).

Adding devices

In the Project view (once a project has been opened), a device such as a PLC can be added by double-clicking the Add new device option in the project tree.

By double-clicking the Add new device option, a new dialog box will open, allowing the selection of supported devices. This is illustrated in the following screenshot:

Figure 1.8 – Add new device

Figure 1.8 – Add new device

Once a suitable device has been selected and a name assigned, the OK button can be clicked, and the new PLC (or other hardware) will appear in the project tree, as illustrated in the following screenshot:

Figure 1.9 – Project tree with new device expanded

Figure 1.9 – Project tree with new device expanded

If the new device is expanded, all of the available child objects that are relative to the device are displayed.

Note

This is a necessary step to complete before software programming takes place.

The Programming Blocks object (where software such as ladder logic is written) is not available until a device has been added.

Configuration of devices

Every device that is added in TIA Portal will require some basic level of configuration, such as setting the network Internet Protocol (IP) address or adding slave modules.

This can be accessed by right-clicking the new device in the project tree. The Properties item will be available at the bottom of the context menu.

The Properties dialog will open—this is where the configuration of the device can take place, as illustrated in the following screenshot:

Figure 1.10 – Configuration dialog

Figure 1.10 – Configuration dialog

The same configuration settings can also be accessed by opening the device configuration from the project tree. Once the Device view opens, the properties are displayed in the Properties, Info, and Diagnostics pane, as illustrated in the following screenshot:

Figure 1.11 – Configuration dialog via the Device view

Figure 1.11 – Configuration dialog via the Device view

This pane then allows for the configuration of the device's properties and options.