PLCs for Beginners An Introductory Guide to Building Robust PLC Programs with the Structured Text Language

Unleash the power of PLCs by understanding and applying essential programming concepts such as structured text, programming logic, and technologies like ChatGPT Key Features Unleash the power of structured text by understanding its syntax, features, and applications Harness the power of programming...

Full description

Bibliographic Details
Other Authors: White, M. T., author (author)
Format: eBook
Language:Inglés
Published: Birmingham, England : Packt Publishing [2024]
Edition:First edition
Subjects:
See on Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009826135006719
Table of Contents:
  • Cover
  • Title Page
  • Copyright and Credits
  • Contributors
  • Table of Contents
  • Preface
  • Part 1: Basics of Computer Science for PLC Programmers
  • Chapter 1: Computer Science Versus Automation Programming
  • Technical requirements
  • What is computer science?
  • Why study computer science?
  • What is automation programming?
  • What is a PLC?
  • Exploring automation through computer science
  • How does computer science help automation programmers?
  • Why should automation programmers care?
  • Cloud technologies
  • The internet of things
  • Machine learning
  • What does this mean for automation engineering?
  • PLCs versus microcontrollers
  • What are microcontrollers?
  • Surface-level differences
  • PLC and microcontroller programming languages
  • Use cases
  • PLC versus computers
  • What is a computer?
  • PLC versus computers
  • Summary
  • Questions
  • Chapter 2: PLC Components - Integrating PLCs with Other Modules
  • Technical requirements
  • PLC types
  • Common PLC modules
  • Power supply
  • Chassis
  • CPU modules
  • I/O modules
  • Safety modules
  • Sinking versus sourcing
  • NPN versus PNP
  • Sensors
  • Motors and motor controls
  • What is a motor?
  • Open and closed-loop control systems
  • Stepper motors
  • Servo motors
  • Encoders
  • Motor drives
  • Communication protocols
  • What is a communication protocol, and what is it used for?
  • Wiring diagrams
  • Final project
  • Specs
  • BOM
  • Summary
  • Questions
  • Further reading
  • Chapter 3: The Basics of Programming
  • Technical requirements
  • Understanding what a program is
  • What is the purpose of a program?
  • Why use software over hardware?
  • How to view software and hardware in a system
  • Software is not a cure-all solution
  • Understanding programming languages
  • Syntax
  • Translators
  • Machine instruction
  • Language paradigms
  • Keywords.
  • Dos and don'ts of learning keywords and syntax
  • Program flow
  • Program iteration
  • Exploring the IEC 61131-3 standard
  • IEC 61131-3 pitfalls
  • Final project
  • Strategy
  • Summary
  • Further reading
  • Questions
  • Chapter 4: Unleashing Computer Memory
  • Technical requirements
  • What is memory?
  • Memory
  • Storage
  • How computer/PLC memory and storage work
  • HDDs
  • SSDs
  • Volatile versus non-volatile memory
  • Volatile memory
  • Non-volatile memory
  • Memory addresses
  • How memory works
  • Computer memory - an analogy
  • Common storage devices
  • USB drives
  • External hard-drives
  • SD cards
  • Cloud storage
  • Obsolete storage devices
  • Floppy drives
  • Summary
  • Questions
  • Further reading
  • Chapter 5: Designing Programs - Unleashing Pseudocode and Flowcharts
  • Technical requirements
  • What are pseudocode programs and flowcharts?
  • Pseudocode
  • What does pseudocode look like?
  • Flowcharting
  • What do flowcharts look like?
  • Why use pseudocode and flowcharts in PLC programming?
  • Why use pseudocode?
  • Why use flowcharting?
  • When to use one over the other?
  • Tools needed for flowcharts and pseudocode
  • Pseudocode tools
  • Flowchart tools
  • Whiteboarding
  • Design exercises
  • The quadradic equation
  • The beer program
  • Final project - Robot startup system
  • Design requirements
  • Design logic
  • Wait sequence
  • Pseudocode
  • Flowchart
  • Summary
  • Questions
  • Chapter 6: Boolean Algebra
  • Technical requirements
  • What is Boolean algebra?
  • Boolean operators
  • The basic operators
  • The OR operator
  • The NOT operator
  • Boolean expressions
  • Exploring NOT
  • The OR operator
  • The AND operator
  • Operator laws
  • Idempotent law
  • Solving Boolean equations
  • Examples
  • Getting to know truth tables
  • Basic operators
  • Final project: Creating custom truth tables from scratch
  • Row 1
  • Row 2
  • Row 3.
  • Row 4
  • Final truth table
  • Summary
  • Questions
  • Further reading
  • Part 2: Introduction to Structured Text Programming
  • Chapter 7: Unlocking the Power of ST
  • Technical requirements
  • What is ST?
  • Area of a circle program in ST
  • Why is ST important?
  • ST versus LL
  • Example 1 - The area of a circle program - LL
  • Example 2 - Toggling a light
  • What is CODESYS?
  • Installing CODESYS
  • A CODESYS exploration
  • Exploring the PLC_PRG file
  • The final project - Hello World
  • Step 1 - Creating a new project!
  • Step 2 - Code implementation
  • Step 3 - Running the program!
  • Chapter challenge
  • Summary
  • Further reading
  • Questions
  • Chapter 8: Exploring Variables and Tags
  • Technical requirements
  • What are variables/tags?
  • Applications of variables
  • Variables/tags under the hood
  • Why use variables?
  • Data types
  • What is a data type?
  • The IEC 61131-3 data types
  • Bits and bytes
  • Common data types
  • How to declare variables
  • Variable section of a file
  • Declaring a variable
  • Initializing a variable
  • Variable naming
  • Rules to naming a variable
  • Naming conventions
  • Final project - declare the variables of a triangle
  • Code implementation
  • Challenge - declare the variable for a rectangle's perimeter
  • Summary
  • Further reading
  • Questions
  • Chapter 9: Performing Calculations in Structured Text
  • Technical requirements
  • Math in ST
  • Assigning numbers
  • Basic calculations
  • Solution variable
  • The four basic functions
  • Basic operation demonstration
  • Complex mathematical functions
  • Square root function
  • Exponent function
  • ABS function
  • Trigonometric functions
  • Arc functions
  • Order of operations for math calculations
  • Computing complex equations
  • Distance between two points
  • Final projects
  • Final project 1 - programming the perimeter of a rectangle.
  • Final project 2 - Pythagorean theorem
  • Summary
  • Questions
  • Further reading
  • Chapter 10: Unleashing Built-In Function Blocks
  • Technical requirements
  • What are prebuilt function blocks?
  • Functions, function blocks, and keywords
  • Function blocks under the hood
  • What is a function block?
  • Rising and falling edges
  • Common PLC function blocks
  • Counter function blocks
  • Timer function blocks
  • Final project
  • Variables
  • Summary
  • Questions
  • Further reading
  • Chapter 11: Unlocking the Power of Flow Control
  • Technical requirements
  • Exploring what flow control is
  • Exploring why flow control is important
  • Exploring logical expressions
  • Exploring the IF statement
  • IF statement syntax
  • Checking if two values are the same!
  • Exploring the not equals operator
  • Designing control statements
  • Overdraft program
  • Exploring the CASE statement
  • State machines and CASE statements
  • Implementing the state machine
  • Flowcharting and CASE statements
  • Real-world applications for the CASE statement
  • Final project
  • Requirements
  • Program design
  • Code implementation
  • Final challenge
  • Summary
  • Questions
  • Chapter 12: Unlocking Advanced Control Statements
  • Technical requirements
  • Nested control statements
  • ELSE statements
  • ELSIF statements
  • Challenge
  • Logical operators
  • Exploring the OR operator
  • Exploring the XOR operator
  • Exploring the NOT operator
  • Final project
  • Requirements
  • Variables
  • Color and shape sorter logic
  • Testing conditions
  • Summary
  • Further reading
  • Questions
  • Chapter 13: Implementing Tight Loops
  • Technical requirements
  • Exploring the different types of loops
  • Counter loop
  • Precheck loops
  • Post check loops
  • Infinite loops
  • Exploring loops in pseudocode and flowcharts
  • Exploring loops with pseudocode
  • Representing a loop in a flowchart.
  • Implementing a FOR loop
  • Implementing the WHILE loop
  • Exploring the REPEAT loop
  • Exporting the EXIT keyword
  • Understanding nested loops
  • Challenge - creating a behavior report
  • Final project
  • Design
  • Code implementation
  • Testing the program
  • Summary
  • Questions
  • Further reading
  • Part 3: Algorithms, AI, Security, and More
  • Chapter 14: Sorting with Loops
  • Technical requirements
  • How to use this chapter
  • What is sorting?
  • Exploring what arrays are and how to use them!
  • What is an array?
  • Array elements
  • Initializing an array
  • Retrieving the number of elements in an array
  • Why are arrays important for sorting algorithms?
  • Exploring sorting algorithms
  • What is an algorithm?
  • What is a sorting algorithm?
  • Algorithm efficiency metrics
  • Exploring the Big O notation
  • Exploring the Big Ω notation
  • Common sorting algorithms
  • Exploring bubble sort
  • Exploring insertion sort
  • Challenge - Merge sort
  • Final project - cement bag sorter
  • Requirements
  • Analysis
  • Implementation
  • Summary
  • Questions
  • Further reading
  • Chapter 15: Secure PLC Programming - Stopping Cyberthreats
  • Technical requirements
  • What cybersecurity is and why it's important
  • The basics of cybersecurity
  • Vulnerabilities, threats, and risk
  • Threat actors
  • Exploring AAA
  • Air-gapped systems
  • Common cyberattacks
  • Exploring information gathering
  • Exploring social engineering
  • Exploring password hacking
  • Malware
  • Attack prevention methods
  • Stopping social engineering
  • Defending against password crackers
  • Password length
  • Malware defense
  • Final project - a PLC-based activation system
  • Design
  • Certifications
  • Summary
  • Questions
  • Further reading
  • Chapter 16: Troubleshooting PLCs - Fixing Issues
  • Technical requirements
  • Common causes of PLC issues
  • Broken software.
  • Exploring environmental issues.