E-Book, Englisch, 388 Seiten
White, M. T. Mastering PLC Programming
1. Auflage 2024
ISBN: 978-1-80461-912-4
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection
The software engineering survival guide to automation programming
E-Book, Englisch, 388 Seiten
ISBN: 978-1-80461-912-4
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection
Object-oriented programming (OOP) is a new feature of PLC programming that has taken the automation world by storm. This book provides you with the necessary skills to succeed in the modern automation programming environment.
The book is designed in a way to take you through advanced topics such as OOP design, SOLID programming, the software development lifecycle (SDLC), library design, HMI development, general software engineering practices, and more. To hone your programming skills, each chapter has a simulated real-world project that'll enable you to apply the skills you've learned. In all, this book not only covers complex PLC programming topics, but it also removes the financial barrier that comes with most books as all examples utilize free software. This means that to follow along, you DO NOT need to purchase any PLC hardware or software.
By the end of this PLC book, you will have what it takes to create long-lasting codebases for any modern automation project.
Autoren/Hrsg.
Fachgebiete
Weitere Infos & Material
Table of Contents - Software Engineering for PLCs
- Advanced Structured Text
- Debugging
- Complex Variable Declaration
- Functions
- OOP
- OOP
- Libraries
- The SDLC
- Advanced Coding
- HMIs
- Industrial Controls
- Layouts
- Alarms
- Putting It All Together
- Distributed Control Systems, PLCs, and Networking
Preface
Object-oriented programming and the principles that govern the concept rule the modern IT world and automation programming is no different. Though modern technology is progressing rapidly in the automation realm, software development practices are not. As such, this book is meant to be a bridge between automation programmers and modern software engineer practices.
Who this book is for
This book is for automaton programmers with a background in software engineering topics such as object-oriented programming and general software engineering knowledge. Automation engineers, software engineers, electrical engineers, PLC technicians, hobbyists, and upper-level university students with an interest in automation or robotics will also find this book useful and interesting.
To get the most out of this book, you should have a basic knowledge of PLCs, PLC programming, and modern structured text. Though not totally necessary, a rough idea about object-oriented programming would also be beneficial.
What this book covers
, , establishes the basics of software engineering and why it is important for PLC programmers. The chapter also walks you through installing CODESYS and creating a sample project to ensure the setup is working.
, , explores some of the lesser-used concepts of structured text, such as error handling and pointers. This chapter also covers the basics of state machines and proper code documentation.
, , introduces troubleshooting PLC code. The chapter covers concepts such as print debugging, using built-in debugging tools, and more.
, , is about complex variables. Topics covered include variable lists, auto-declaring variables, structs, and much more.
, , introduces code modularity. To do this, the concept of functions is covered, along with arguments, return types, and more.
, , introduces the power of objects and how they can be used. The chapter explores basic object-oriented programming (OOP) principles such as function blocks, methods, and getter and setter methods.
, , is a continuation of and covers more complex object-oriented principles such as the pillars of OOP, composition, access specifiers, interfaces, and more.
, , explores the whole process of creating a library from scratch to consuming the library. This chapter essentially is applied OOP.
, , introduces the full software development life cycle (SDLC). The goal of this chapter is to teach you how to navigate the full SDLC process to properly build and implement PLC code.
, , shows you how to create SOLID PLC code. The goal of this chapter is to teach you how to create well-engineered code that can be adapted and will age well. In short, this chapter explains how to properly implement OOP.
, , introduces the concept of Human Machine Interface (HMIs). The goal of this chapter is to introduce the core idea behind HMIs, wireframing, setting up a basic HMI project, and why HMIs are used.
, , covers some of the commonly used CODESYS HMI widgets. The goal of the chapter is to introduce the widgets, what they do, and how they work.
, , explores how to make functional HMIs. In other words, the goal of this chapter is to lay down principles that can be used to create high-functioning and user-friendly HMIs in CODESYS.
, , covers one of the most important aspects of automation programming – alarms. This chapter introduces the concept of alarms and how to set up an alarm, its layout, and even how to trigger them.
, , is the last hands-on chapter. This chapter cherry-picks concepts from the whole book and incorporates them into a final project.
, , is theoretical in nature, unlike all the previous chapters. This chapter covers the basics of networking, as well as introducing the basics of common networking protocols for automation.
To get the most out of this book
This book covers some advanced PLC programming topics. As such, it is recommended that you read the book from cover to cover. It is also recommended that you have some knowledge of PLC programming and at least a basic grasp of structured text.
| Software/hardware covered in the book | Operating system requirements |
| CODESYS | Windows |
If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
Download the example code files
You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Mastering-PLC-programming. If there’s an update to the code, it will be updated in the GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/bqJiM.
Conventions used
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “As can be seen in the code, the keyword EXTENDS Felion is added to the function block code.”
A block of code is set as follows:
//turn on motor IF turnOnMotor = FALSE THEN turnOnMotor := TRUE; END_IFWhen we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
//turn on motor IF turnOnMotor = FALSE THEN turnOnMotor := TRUE; END_IFAny command-line input or output is written as follows:
$ mkdir css $ cd cssBold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Select System info from the Administration panel.”
Tips or important notes
Appear like this.
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.
If you are interested in becoming an author: If...




