Search icon CANCEL
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

Chapter 14

  1. What is an algorithm?

    A predefined set of computer instructions that complete a specific task.

  2. How is pseudocode used with algorithms?

    Pseudocode is often used to present an algorithm in a language agnostic manner.

  3. What does O(1) mean?

    Constant time complexity.

  4. What is a more efficient time complexity: O(n*log(n)) or O(n^2)?

    O(n*log(n))

  5. How does merge sort work?

    Merge sort uses a divide and conquer methodology.

  6. Which is more efficient: bubble sort or merge sort?

    Merge sort.

  7. For an array (0..238), how do you retrieve the first element in the array?

    Access element 0.

  8. For an array (1..299), how do you retrieve the last element in the array?

    Access element 299.

  9. How do you calculate the number of elements in an array?

    SIZEOF(Array)/SIZEOF(Array[1])

  10. Name three sorting algorithms.
    • Bubble sort
    • Merge sort
    • Insertion sort
  11. Name three areas where an algorithm can be used.
    • AI/Machine Learning
    • Security
    • Sorting
    • Encryption/decryption
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