PLCs for Beginners (eBook)
380 Seiten
Packt Publishing Limited (Verlag)
978-1-80181-434-8 (ISBN)
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.
No detailed description available for "e;PLCs for Beginners"e;.
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
Chapter 1, Computer Science Versus Automation Programming, introduces you to computer science and contrasts it with automation programming. This chapter will explore the various types of controllers, emerging technologies, and more.
Chapter 2, PLC Components – Integrating PLCs with Other Modules, 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.
Chapter 3, The Basics of Programming, lays the foundation for programming. This chapter will introduce you to what programs are, how they work, and much more.
Chapter 4, Unleashing Computer Memory, 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.
Chapter 5, Designing Programs – Unleashing Pseudocode and Flowcharts, teaches you how to create a design for a program. Concepts explored will be designing a program in pseudocode and with a flowchart.
Chapter 6, Boolean Algebra, 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.
Chapter 7, Unlocking the Power of ST, 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.
Chapter 8, Exploring Variables and Tags, expands on and applies the material presented in Chapter 4 to implement what are called variables or tags. This chapter will cover concepts such as data types, naming conventions, and much more.
Chapter 9, Performing Calculations in Structured Text, 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.
Chapter 10, Unleashing Built-In Function Blocks, 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.
Chapter 11, Unlocking the Power of Flow Control, 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.
Chapter 12, Unlocking Advanced Control Statements, expands on concepts that were explored in the previous chapter, and examines topics such as embedded conditional statements, complex logical expressions, and much more.
Chapter 13, Implementing Tight Loops, provides an in-depth exploration of loops. This chapter will explore various types of loops in Structured Text as well as their applications.
Chapter 14, Sorting with Loops, 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.
Chapter 15, Secure PLC Programming – Stopping Cyberthreats, 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.
Chapter 16, Troubleshooting PLCs – Fixing Issues, provides the necessary steps to troubleshoot a malfunctioning PLC-based machine. Topics will include common issues, necessary tools, IT diagnostics, and more.
Chapter 17, Leveraging Artificial Intelligence (AI), 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.
Chapter 18, The Final Project – Programming a Simulated Robot, 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,...
| Erscheint lt. Verlag | 14.6.2024 |
|---|---|
| Sprache | englisch |
| Themenwelt | Informatik ► Theorie / Studium ► Künstliche Intelligenz / Robotik |
| Technik ► Elektrotechnik / Energietechnik | |
| ISBN-10 | 1-80181-434-1 / 1801814341 |
| ISBN-13 | 978-1-80181-434-8 / 9781801814348 |
| Informationen gemäß Produktsicherheitsverordnung (GPSR) | |
| Haben Sie eine Frage zum Produkt? |
Digital Rights Management: ohne DRM
Dieses eBook enthält kein DRM oder Kopierschutz. Eine Weitergabe an Dritte ist jedoch rechtlich nicht zulässig, weil Sie beim Kauf nur die Rechte an der persönlichen Nutzung erwerben.
Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belletristik und Sachbüchern. Der Fließtext wird dynamisch an die Display- und Schriftgröße angepasst. Auch für mobile Lesegeräte ist EPUB daher gut geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür die kostenlose Software Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür eine kostenlose App.
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich