Mastering PLC programming the software engineering survival guide to automation programming

Learn PLC programming from the software perspective to understand advanced concepts such as OOP and HMI development and design reusable, portable, and robust code Purchase of the print or Kindle book includes a free PDF eBook Key Features Take a deep dive into object-oriented PLC programming to gain...

Descripción completa

Detalles Bibliográficos
Otros Autores: White, M. T., author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England ; Mumbai : Packt Publishing Ltd [2023]
Edición:1st ed
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009730928706719
Tabla de Contenidos:
  • Cover
  • Title Page
  • Copyright and Credits
  • Contributors
  • About the reviewers
  • Table of Contents
  • Preface
  • Part 1 - An Introduction to Advanced PLC Programming
  • Chapter 1: Software Engineering for PLCs
  • Technical requirements
  • Software engineering for PLCs
  • Understanding the IEC 61131-3 standard
  • What does the IEC 61131-3 standardize?
  • Programming a PLC - The five IEC languages
  • Introducing CODESYS
  • Testing CODESYS
  • Creating the program
  • Summary
  • Questions
  • Chapter 2: Advanced Structured Text -Programming a PLC in Easy-to-Read English
  • Technical requirements
  • Understanding error handling
  • Variables
  • The main program
  • The division by 0 error
  • Checking for 0 code
  • TRY-CATCH blocks
  • FINALLY statements
  • Identifying and handling errors
  • Understanding pointers
  • Representing PLC memory
  • General syntax for pointers
  • The ADR operator
  • Dereferencing pointers
  • Handling invalid pointers
  • Understanding references
  • Declaring a reference variable
  • Example program
  • Checking for invalid references
  • Understanding documentation
  • Self-documenting code
  • Code to variables
  • Code commenting
  • Understanding state machines
  • Variables for the state machine
  • Exploring state machine logic
  • Summary
  • Questions
  • Further reading
  • Chapter 3: Debugging - Making Your Code Work
  • Technical requirements
  • What is debugging?
  • Types of bugs
  • Testing versus debugging
  • Breaking down the debugging process
  • Understanding debugging tools and techniques
  • Print debugging
  • The CODESYS debugger tool
  • Forcing variables
  • Troubleshooting - a practical example
  • Case 4 - a while loop
  • Summary
  • Questions
  • Further reading
  • Chapter 4: Complex Variable Declaration - Using Variables to Their Fullest
  • Technical requirements
  • Auto declaring variables
  • Understanding constants.
  • Investigating arrays
  • Initialized arrays
  • Multidimensional arrays
  • Exploring global variable lists
  • Creating a GVL
  • Understanding structs
  • Declaring a struct
  • Getting to know enums
  • Exploring persistent variables
  • Persistent variable list
  • Final project - motor control program
  • Summary
  • Questions
  • Further reading
  • Part 2 - Modularity and Objects
  • Chapter 5: Functions - Making Code Modular and Maintainable
  • Technical requirements
  • What is modular code?
  • Why use modular code?
  • Exploring functions
  • What goes into a function?
  • Creating a function
  • The PLC_PRG file
  • Examining return types
  • The RETURN statement
  • Understanding arguments
  • Named parameters
  • Default arguments
  • Final project - temperature unit converter
  • Summary
  • Questions
  • Further reading
  • Chapter 6: Object-Oriented Programming - Reducing, Reusing, and Recycling Code
  • Technical requirements
  • What is OOP?
  • Why use OOP?
  • The four pillars - A preview
  • Understanding function blocks
  • Getting to know objects
  • Getting to know methods
  • Adding a method
  • Getting to know properties
  • Adding a property
  • Understanding the purpose of a getter and setter
  • Getter method
  • Setter method
  • Understanding recursion and the THIS keyword
  • THIS keyword
  • Recursion in action
  • Final project - creating a unit converter
  • Summary
  • Questions
  • Further reading
  • Chapter 7: OOP - The Power of Objects
  • Technical requirements
  • Understanding access specifiers
  • Calculation program
  • Exploring the pillars of OOP
  • Encapsulation versus abstraction
  • Inheritance
  • Polymorphism
  • Inheritance versus composition
  • When to use composition
  • Composition in practice
  • Examining interfaces
  • Getting to know design patterns
  • Final project - creating a simulated assembly line
  • Summary
  • Questions
  • Further reading.
  • Part 3 - Software Engineering for PLCs
  • Chapter 8: Libraries - Write Once, Use Anywhere
  • Technical requirements
  • Investigating libraries
  • Why do we need libraries?
  • Libraries versus frameworks
  • Distribution
  • Third-party libraries
  • Installing a library
  • Guiding principles for library development
  • Rule 1 - Keep it simple, stupid (KISS)
  • Rule 2 - Abstraction and encapsulation
  • Rule 3 - Patterns make for perfection
  • Rule 4 - Documentation
  • Building custom libraries
  • Requirements
  • Implementation
  • Final project - part computation library
  • Requirements
  • Implementation
  • Summary
  • Questions
  • Further reading
  • Chapter 9: The SDLC - Navigating the SDLC to Create Great Code
  • Technical requirements
  • Understanding the SDLC
  • Why care about the SDLC?
  • How is the SDLC implemented?
  • Investigating the general steps of the SDLC
  • Requirements/planning
  • Design
  • Build
  • Test
  • Deployment
  • Maintenance
  • Final project - creating a simple library
  • Gathering requirements for the library
  • Designing the library
  • Building the library
  • Testing the library
  • Deploying the library
  • Maintaining the library
  • Summary
  • Questions
  • Further reading
  • Chapter 10: Advanced Coding - Using SOLID to Make Solid Code
  • Technical requirements
  • Introducing SOLID programming
  • Benefits of SOLID programming
  • The governing principles of SOLID programming
  • The single-responsibility principle
  • The open-closed principle
  • The Liskov substitution principle
  • The interface segregation principle
  • The Dependency inversion principle
  • Final project - a painting machine
  • Summary
  • Questions
  • Further reading
  • Part 4 - HMIs and Alarms
  • Chapter 11: HMIs - UIs for PLCs
  • Technical requirements
  • Understanding HMIs
  • Why create and use an HMI?
  • How are HMIs created?.
  • Programming languages to develop HMIs
  • What should an HMI do?
  • HMIs versus SCADA
  • How the SDLC applies to HMIs
  • Exploring wireframing
  • Final project - creating an HMI
  • Summary
  • Questions
  • Further reading
  • Chapter 12: Industrial Controls - User Inputs and Outputs
  • Technical requirements
  • Exploring common HMI controls
  • Flip switches
  • Push switches
  • Buttons
  • LEDs
  • Potentiometers
  • Sliders
  • Spinners
  • Measurement controls
  • Histogram
  • Text field
  • Control properties
  • Final project - creating a simple HMI
  • Requirements for the HMI
  • Design of the HMI
  • Building the HMI
  • Summary
  • Questions
  • Further reading
  • Chapter 13: Layouts - Making HMIs User-Friendly
  • Technical requirements
  • The importance of colors
  • Backgrounds
  • Red, yellow, and green
  • Control colors
  • Labeling colors
  • Understanding grouping/position
  • Best practices for blinking
  • Blinking a component
  • Animation
  • Organizing the screen into multiple layouts
  • Creating visualizations screens
  • Changing the default screen
  • Navigating between screens
  • Final project - creating a user-friendly HMI
  • Summary
  • Questions
  • Further reading
  • Chapter 14: Alarms - Avoiding Catastrophic Issues with Alarms
  • Technical requirements
  • What are alarms?
  • When should you use an alarm?
  • What should an alarm say?
  • Alarm configuration - I, Warning, and Error setup
  • Alarm groups
  • Alarm HMI components
  • Setting up an alarm banner
  • Setting up an alarm table
  • PLC alarm logic
  • Alarm acknowledgment
  • Final project - motor alarm system
  • Requirements
  • Design/implementation of the HMI
  • Summary
  • Questions
  • Further reading
  • Part 5 - Final Project and Thoughts
  • Chapter 15: Putting It All Together - The Final Project
  • Technical requirements
  • Project overview
  • Getting the requirements
  • HMI design.
  • HMI implementation
  • LED variables
  • Acknowledgment variable
  • Spinner variables/setup
  • Gauge variable/setup
  • Alarm table variables/configuration
  • PLC code design
  • Implementing the PLC code
  • PLC_PRG file
  • Alarms function block
  • Door function block
  • Oven function block
  • Testing the application
  • Testing the door lock
  • Testing the gauge
  • Summary
  • Questions
  • Chapter 16: Distributed Control Systems, PLCs, and Networking
  • Technical requirements
  • What are computer networks?
  • Network topology
  • Common IT protocols
  • TCP/IP
  • UDP
  • PLC/automation device communication
  • Modbus
  • Profibus
  • Profinet
  • EtherCAT
  • DeviceNet
  • Protocol conversion
  • Other communication topics to explore
  • Understanding distributed control systems
  • The differences between DCSs and PLCs
  • Summary
  • Questions
  • Further reading
  • Index
  • Other Books You May Enjoy.