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

Understanding what a program is

The first step in understanding how to write a program is to understand what a program is. The technical term for a program is algorithm. For the inexperienced, the term algorithm is ambiguous and, for some, scary. However, an algorithm is simply a set of steps. This means the most literal way to think of a program is as a series of steps that a computer or other programmable device will carry out to accomplish a task.

To demonstrate what an algorithm is, consider the steps it takes to withdraw money from an ATM:

  1. Enter the debit card into the machine.
  2. Enter the PIN.
  3. Enter the amount to withdraw.
  4. Remove the debit card from the machine.
  5. Take cash and go.

The steps it takes to withdraw money from an ATM is a prime example of an algorithm. Now that we know what an algorithm/program is, what purpose does it serve?

What is the purpose of a program?

The purpose of a program starts with a problem to solve. For our purposes...

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