Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PLCs for Beginners

You're reading from   PLCs for Beginners An introductory guide to building robust PLC programs with structured text

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781803230931
Length 380 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
M. T. White M. T. White
Author Profile Icon M. T. White
M. T. White
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

Preface 1. Part 1: Basics of Computer Science for PLC Programmers FREE CHAPTER
2. Chapter 1: Computer Science Versus Automation Programming 3. Chapter 2: PLC Components – Integrating PLCs with Other Modules 4. Chapter 3: The Basics of Programming 5. Chapter 4: Unleashing Computer Memory 6. Chapter 5: Designing Programs – Unleashing Pseudocode and Flowcharts 7. Chapter 6: Boolean Algebra 8. Part 2: Introduction to Structured Text Programming
9. Chapter 7: Unlocking the Power of ST 10. Chapter 8: Exploring Variables and Tags 11. Chapter 9: Performing Calculations in Structured Text 12. Chapter 10: Unleashing Built-In Function Blocks 13. Chapter 11: Unlocking the Power of Flow Control 14. Chapter 12: Unlocking Advanced Control Statements 15. Chapter 13: Implementing Tight Loops 16. Part 3: Algorithms, AI, Security, and More
17. Chapter 14: Sorting with Loops 18. Chapter 15: Secure PLC Programming – Stopping Cyberthreats 19. Chapter 16: Troubleshooting PLCs – Fixing Issues 20. Chapter 17: Leveraging Artificial Intelligence (AI) 21. Chapter 18: The Final Project – Programming a Simulated Robot 22. Assessments 23. Index 24. Other Books You May Enjoy

Exploring why flow control is important

As stated before, a program will rarely take a straight path from top to bottom. The necessary logic that needs to run will often vary based on a given input. Think about the motor example at the beginning of the chapter. For different VDFs to operate properly, they need certain logic such as special startup commands, startup sequences, and so on. Flow control is vital for applications such as this. The motor type can be considered the input, and the specialized logic is the varying output.

A more conceptual application for flow control is the aforementioned beer-buying example. In short, that program determines if a person can buy beer or not. A user is inputting an age, and the program determines if a person can drink. This program may seem trivial, but applications such as this are very common in the PLC realm. It is very common to have to take an input value such as a motor’s voltage, current, or temperature and adjust the VDF&...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime