PLC and HMI Development with Siemens TIA Portal

Book description

Become well-versed with the tools available in the Siemens TIA toolbox and write PLC and HMI code effectively

Key Features

  • Find out how to use TIA Portal effectively to boost your productivity
  • Learn about a structured design pattern and understand why it is so powerful when implemented correctly
  • Discover efficient project management and design practices

Book Description

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.

What you will learn

  • Set up a Siemens Environment with TIA Portal
  • Find out how to structure a project
  • Carry out the simulation of a project, enhancing this further with structure
  • Develop HMI screens that interact with PLC data
  • Make the best use of all available languages
  • Leverage TIA Portal's tools to manage the deployment and modification of projects

Who this book is for

This TIA Portal book is for anybody looking to learn PLC/HMI development using the latest Siemens development platform. Industrial software engineers, PLC engineers, automation engineers, and electricians will be able to advance their skill set with this guide. A basic understanding of PLC principles such as PLC data types and basic objects such as function blocks and functions is necessary to get started.

Table of contents

  1. PLC and HMI Development with Siemens TIA Portal
  2. Contributors
  3. About the author
  4. About the reviewer
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the color images
    5. Conventions used
    6. Get in touch
    7. Share Your Thoughts
  6. Section 1 – The TIA Portal – Project Environment
  7. Chapter 1: Starting a New Project with TIA Portal
    1. Windows and panes – layout of the development environment
      1. Portal view – windows and panes
      2. Project view – windows and panes
    2. Getting started with a new project in the Project view
      1. Starting a new project
      2. Changes to the project tree
      3. Adding devices
      4. Configuration of devices
    3. The Reference and Details views – tools to aid development
      1. Reference projects
      2. Details view
      3. Overview view mode
    4. Instructions and libraries
      1. Instructions
      2. Libraries
      3. Project library
      4. Global library
    5. Online testing environment
      1. CPU operator panel
      2. Call environment
      3. Breakpoints
      4. Call hierarchy
    6. Summary
  8. Chapter 2: Creating Objects and How They Fit Together
    1. Creating a project's structure
      1. Data management
    2. Hierarchy in TIA Portal
      1. Call structure
      2. Dependency structure
      3. Parent/child relationships
    3. Instance and global data
      1. Using instance and global data
      2. Accessing data
      3. Configuration options
    4. Interfaces and the effects on running PLCs
      1. Optimized data/non-optimized data
      2. Mixing optimized and non-optimized data
      3. Passing data through interfaces
    5. Summary
  9. Chapter 3: Structures and User-Defined Types
    1. What are structs and UDTs?
      1. Structs
      2. UDTs
    2. Creating struct/UDTs – best practices
      1. Understanding what is required
      2. Defining structure variables
      3. Finding commonalities between assets
      4. Naming conventions
    3. Simplifying interfaces with structs/UDTs
      1. Passing inputs as a single struct
      2. Passing outputs as a single struct
      3. Passing InOut data as a single struct
      4. Structures in static and temporary memory
      5. Creating static declarations of UDTs or structs
      6. Creating temporary instances of UDTs or structs
    4. Drawbacks of structs and UDTs
      1. Libraries
      2. Lack of open protocol support
      3. Cross-referencing
      4. Overusing UDTs/structs
    5. Summary
  10. Section 2 – TIA Portal – Languages, Structures, and Configurations
  11. Chapter 4: PLC Programming and Languages
    1. Getting started with languages
      1. Available languages
      2. Languages in program blocks
      3. Different language types
    2. Selecting the best language
      1. Understanding the use case
      2. Memory management
    3. Differences between Siemens and other PLCs
      1. Timers
      2. Valid networks in ladder logic
      3. GRAPH is not SFC
      4. Bit access in the byte, Word, and Dword variables
    4. Summary
  12. Chapter 5: Working with Languages in TIA Portal
    1. The control scenario
      1. Control overview
      2. Using the HMI
    2. Languages used in TIA Portal
      1. Ladder logic
      2. Function Block Diagram
      3. Structured Control Language
      4. GRAPH
      5. Cause and effect matrix
    3. Summary
  13. Chapter 6: Creating Standard Control Objects
    1. Planning standard interfaces
      1. Defining variables in an interface
      2. Large variables in the interface
      3. Planning standard control interfaces
    2. Creating control data
      1. Improving control data accessibility with UDTs
      2. Example
    3. Creating HMI data
      1. Setpoints/parameters
    4. Structuring logic
      1. General layout
      2. Supportive methods
    5. Considerations that have an impact on usability
      1. How flexible does the control object need to be?
      2. How likely is it that the control object will need to be modified?
      3. What does the control object interact with?
    6. Summary
  14. Chapter 7: Simulating Signals in the PLC
    1. Running PLC/HMI in simulate mode
      1. Starting a PLC simulation
    2. Managing simulated inputs
      1. Using watch tables to change inputs
      2. Using an input mapping layer to change inputs
    3. Creating a simulation interface
    4. Safeguarding outputs when in simulation mode
    5. Summary
  15. Chapter 8: Options to Consider When Creating PLC Blocks
    1. Extending standard functions
    2. Extending standard data
    3. Managing data through instance parameters
      1. Principle to this approach
      2. TIA Portal example
    4. Asynchronous data access considerations
      1. The correct method
    5. Summary
  16. Section 3 – TIA Portal – HMI Development
  17. Chapter 9: TIA Portal HMI Development Environment
    1. TIA Portal Comfort Panel
    2. Adding an HMI to a project
    3. HMI development environment overview
      1. Runtime settings
      2. Screens
    4. Screen objects
    5. Special objects
      1. Elements
      2. Controls
      3. Graphics and Dynamic widgets
    6. Summary
  18. Chapter 10: Placing Objects, Settings Properties, and Events
    1. Setting static properties
      1. Types of static values
      2. Key properties
    2. Setting dynamic properties
      1. Assigning tags to dynamization properties
    3. Using scripts
    4. Raising events
      1. Event scripts
    5. Summary
  19. Chapter 11: Structures and HMI Faceplates
    1. What are faceplates?
      1. TIA Portal V17 faceplates
    2. Creating a faceplate
      1. Available objects and controls
    3. Creating interfaces
      1. Tag interface
      2. Property interface
    4. Creating and handling events in faceplates
      1. Accessing tags
    5. Summary
  20. Chapter 12: Managing Navigation and Alarms
    1. HMI navigation
      1. Managing page changes
    2. HMI alarm controls
      1. Configuration of HMI alarms
      2. The configuration of classes
      3. Configuration of alarm controls
      4. Setting filters on alarm controls
    3. Alarm tags
    4. PLC-driven alarming
      1. Supervision categories
      2. Types of supervision
      3. Alarm texts
      4. Setting global alarm class colors
    5. Summary
  21. Section 4 – TIA Portal – Deployment and Best Practices
  22. Chapter 13: Downloading to the PLC
    1. Downloading to a PLC
      1. Initiating a download
      2. Setting load actions
      3. Downloads requiring the PLC to be stopped
    2. Retaining data in optimized and non-optimized blocks
      1. Retaining data in instance data
      2. Downloads without reinitialization
      3. Snapshots
    3. Uploading from a PLC
    4. Considerations
      1. Data segregation
      2. Using functions
    5. Summary
  23. Chapter 14: Downloading to the HMI
    1. Connection parameters
      1. Creating connections
      2. Devices and networks
    2. Downloading to an HMI
    3. Simulating a unified HMI
      1. Accessing a unified HMI simulation
    4. Security considerations
    5. Summary
  24. Chapter 15: Programming Tips and Additional Support
    1. Simplifying logic tips
      1. Delay timers
      2. AT constructor
      3. IF statements
      4. Serializing
      5. Refactoring
      6. Consolidating blocks
    2. Sequences – best practices
      1. Using constants instead of numerical values
      2. Managed transitions
      3. Managing output requests
    3. Naming conventions and commenting
      1. Comments in SCL
    4. Additional Siemens support
      1. Using TIA Portal's help system
      2. Siemens forum
      3. Siemens documentation archive
    5. Further support – Liam Bee
    6. Summary
    7. Why subscribe?
  25. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts

Product information

  • Title: PLC and HMI Development with Siemens TIA Portal
  • Author(s): Liam Bee
  • Release date: April 2022
  • Publisher(s): Packt Publishing
  • ISBN: 9781801817226