E-Book, Englisch, 380 Seiten
White PLCs for Beginners
1. Auflage 2024
ISBN: 978-1-80181-434-8
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection
An introductory guide to building robust PLC programs with the Structured Text language
E-Book, Englisch, 380 Seiten
ISBN: 978-1-80181-434-8
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection
With the rise of smart factories and advanced technology, the demand for PLC programmers with expertise beyond ladder logic is surging. Written by M.T. White, a seasoned DevOps engineer and adjunct CIS instructor, this guide offers insights from the author's extensive experience in PLC and HMI programming across industries. This book introduces a fresh approach to PLC programming, preparing you for future automation challenges through computer science and text-based programming.
Starting with the basic components of PLCs and their integration with other modules, this book gives you a clear understanding of system functionality and helps you master PLC program execution by learning about flow and essential components for effective programming. You'll understand program design with pseudocode and flowcharts, vital for planning programs, and cover Boolean logic intricacies, harnessing logical functions and truth tables for precise control statements. The book gives you a comprehensive grasp of Structured Text, its syntax and features crucial for efficient programming. The book also focuses on advanced topics like cybersecurity in PLC systems and leveraging generative AI (GenAI), such as ChatGPT, to enhance productivity.
By the end of this book, you'll be able to design real-world projects using pseudocode and flowcharts, and implement those designs in Structured Text.
Autoren/Hrsg.
Fachgebiete
Weitere Infos & Material
Table of Contents - Computer Science Versus Automation Programming
- PLC Components – Integrating PLCs with Other Modules
- The Basics of Programming
- Unleashing Computer Memory
- Designing Programs – Unleashing Pseudocode and Flowcharts
- Boolean Algebra
- Unlocking the Power of ST
- Exploring Variables and Tags
- Performing Calculations in Structured Text
- Unleashing Built-In Function Blocks
- Unlocking the Power of Flow Control
- Unlocking Advanced Control Statements
- Implementing Tight Loops
- Sorting with Loops
- Secure PLC Programming – Stopping Cyberthreats
- Troubleshooting PLCs – Fixing Issues
- Leveraging Artificial Intelligence (AI)
- The Final Project – Programming a Simulated Robot
Preface
Until recently, automation programming has been, for the most part, unchanging. However, with the recent boom in computing power, that is rapidly changing. New technologies are being introduced at a rapid pace, and these are drastically altering the automation landscape. These new, disruptive technologies are rendering the days of only programming in Ladder Logic a relic of the past. In today’s automation landscape, to get the most out of a PLC, one must use Structured Text. This book is an in-depth look at writing very robust and well-written programs in Structured Text while also providing a general education for programming logic and design as well as other core tenets that will be required to future-proof projects.
Who this book is for
This book is for anyone who is interested in learning Structured Text programming. It is designed for beginners who have never programmed before and for those who wish to transition from Ladder Logic to Structured Text.
What this book covers
, , introduces you to computer science and contrasts it with automation programming. This chapter will explore the various types of controllers, emerging technologies, and more.
, , focuses on introducing the various components that make up a traditional PLC. This chapter will introduce you to analog and digital principles as well as all the needed components that a PLC will need to operate.
, , lays the foundation for programming. This chapter will introduce you to what programs are, how they work, and much more.
, , lays the foundation for more advanced chapters by introducing you to the basics of memory. Topics explored will include what memory is, how memory works, and common storage devices.
, , teaches you how to create a design for a program. Concepts explored will be designing a program in pseudocode and with a flowchart.
, , covers the basics of Boolean algebra. The core principles will be to learn how to compute logical equations, understand logical operators, and create truth tables.
, , explores what Structured Text truly is and why it is important. The key takeaways from this chapter are understanding why Structured Text is important, why it should be used, and how to set up the programming environment.
, , expands on and applies the material presented in to implement what are called variables or tags. This chapter will cover concepts such as data types, naming conventions, and much more.
, , covers one of the most pivotal skills any PLC programmer can have: programming mathematical calculations. Topics will include how to program math equations and common math functions.
, , explores the built-in function blocks. The main takeaway will be for you to understand what a built-in function block is and how to use common function blocks such as timers and counters.
, , introduces flow control with conditionals. This chapter will explore how the flow of a program can be altered and basic intelligence can be introduced to a program.
, , expands on concepts that were explored in the previous chapter, and examines topics such as embedded conditional statements, complex logical expressions, and much more.
, , provides an in-depth exploration of loops. This chapter will explore various types of loops in Structured Text as well as their applications.
, , introduces you to the basics of sorting algorithms. The key takeaway from this chapter is to introduce you to concepts such as algorithms, Big O notation, the basics of arrays, common sorting algorithms, and more.
, , provides an overview of the cybersecurity landscape in relation to PLC-based systems. This chapter will present a lot of theoretical knowledge that can be applied to the design of PLC-based systems, networks, and more.
, , provides the necessary steps to troubleshoot a malfunctioning PLC-based machine. Topics will include common issues, necessary tools, IT diagnostics, and more.
, , explores how generative AI (ChatGPT) can be used to help automatically write software. This chapter will explore what generative AI is, how to use it, reasonable expectations, and how to write prompts.
, , draws on material explored throughout the book. This chapter will focus on programming a theoretical robot that sorts parts and sends lots down the proper production line.
To get the most out of this book
This book assumes no prior knowledge of PLC programming or programming in general. To get the most out of this book, only a basic understanding of mathematics is required. Ideally, you should be familiar with basic algebra and maybe trigonometry.
Software/hardware covered in the book | Operating system requirements |
CODESYS | Windows |
ChatGPT | N/A |
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/PLCs-for-Beginners. 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!
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: “We had a CASE conditional with an IF statement inside it .”
A block of code is set as follows:
PROGRAM PLC_PRG VAR currentHopperWeight : REAL := 250; bag1Weight : REAL; bag2Weight : REAL; END_VARWhen we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
PROGRAM PLC_PRG VAR password : STRING(255) := 'password'; length : UINT; acceptPass : bool; END_VARBold: Indicates a new term, an important word, or words that you see onscreen. For instance: "Air gapped systems are simply systems that are not connected to the internet.”
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,...