Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PLCs for Beginners
  • Table Of Contents Toc
  • Feedback & Rating feedback
PLCs for Beginners

PLCs for Beginners

By : M. T. White
5 (4)
close
close
PLCs for Beginners

PLCs for Beginners

5 (4)
By: M. T. White

Overview of this book

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.
Table of Contents (25 chapters)
close
close
Free Chapter
1
Part 1: Basics of Computer Science for PLC Programmers
8
Part 2: Introduction to Structured Text Programming
16
Part 3: Algorithms, AI, Security, and More

Exploring the different types of loops

The IEC 61131-3 standard governs three different types of loops. The three types of governed loops are as follows:

  • Counter loops
  • Precheck loops
  • Postcheck loops

If you’ve programmed in a language such as C++, Java, or C# before, you’re probably already familiar with these types of loops. In practice, the loops will behave the same as in ST. Regardless, we’re going to explore what they are and how they work.

Counter loop

A counter loop is straightforward. A counter loop will loop over a block of code a certain number of times. This means that a counter loop will start with a specific number, increment, and then terminate when a numerical condition is met. For example, a counter loop may use a counter variable that starts at 1 and will loop for as long as the counter variable is less than, say, 20.

Most programming languages use what’s called a FOR loop to implement a counter loop, and ST...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY