Share E-Book

PLCs for Beginners (M. T. White)(Z-Library)

Author

C
Language English

An introductory guide to building robust PLC programs with the Structured Text language

Format PDF
Size 7.8 MB
12
Views
0
Downloads
0.00
Total Donations
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
(This page has no text content)
Page 2
PLCs for Beginners Copyright © 2024 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Group Product Manager: Preet Ahuja Publishing Product Manager: Suwarna Rajput Book Project Manager: Uma Devi
Page 3
Senior Editor: Isha Singh Technical Editor: Yash Bhanushali Copy Editor: Safis Editing Proofreader: Isha Singh Indexer: Subalakshmi Govindhan Production Designer: Vijay Kamble DevRel Marketing Coordinators: Linda Pearlson and Rohan Dobhal First published: May 2024 Production reference: 1100524 Published by Packt Publishing Ltd. Grosvenor House 11 St Paul’s Square Birmingham B3 1RB, UK ISBN 978-1-80323-093-1 www.packtpub.com
Page 4
To mom and dad. Contributors About the author M. T. White has been programming since the age of 12. His fascination with robotics flourished when he was a child programming microcontrollers. He holds an undergraduate degree in mathematics, a master’s degree in software engineering, and an MBA in IT management. He is currently working as a software developer for a major US defense contractor and is an adjunct CIS instructor, where he teaches Python, C, and an array of other courses. His background mostly stems from the automation industry where he programmed PLCs and HMIs for many different types of applications. He has programmed many different brands of PLCs over the years and has developed HMIs using many different tools. Other technologies that he is fluent in include Linux, Ansible, Docker, AWS, C#, Java, and Python. Be sure to check out his channel AlchemicalComputing on YouTube. About the reviewers Keith Lyding is an electrical engineer for a manufacturing company in Columbus, Ohio. He has over 15 years of experience in the electrical field, as well as more than 9 years of experience in automation. He graduated from Thomas Edison State University in 2019. He served in the US Navy for six years and has also worked for Nucor Steel. He currently works for
Page 5
Sonoco Products Company, where he works primarily with Allen Bradley PLCs, Inductive Automation’s Ignition platform, EXOR and Panelview HMIs, and many other platforms. He enjoys troubleshooting, as well as automating complex operations. In his spare time, he loves to serve in his church, coach his son’s baseball team, and spend time with his family. I extend my deepest gratitude to my wife, Katie, for her unending support. I am grateful to my colleagues and mentors for their guidance throughout my journey: Kyle Ahrendt, William Carleton, and K. Andy Steinacker. I am also appreciative of the men in my life for continuing to sharpen, push, and encourage me to become more like Jesus: Paul Cassidy, Brian Babin, Ken Lyding, K. Andy Steinacker, Jon Krull, David Bout, Isaac Dye, and many, many others. Ninad Deshpande is an author, storyteller, international speaker, and technology evangelist known in the industrial automation fraternity. He has over 15 years of extensive hands-on experience in varied fields of the automation industry, such as application development, testing, R&D, marketing, corporate communication, and global product management. He is the co-author of the Packt book The Art of Manufacturing. Today, as a co- founder and director of Passion Minds Private Limited, he helps organizations across the globe in various industries with services focusing primarily on technologically and strategically driven content generation. I thank my family and friends for teaching me life lessons and consistently inspiring me. I admire my mother’s and my wife’s fighting spirit; their constant support and motivation enable me to achieve my dreams.
Page 6
Table of Contents Preface
Page 7
Part 1: Basics of Computer Science for PLC Programmers 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
Page 8
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 2
Page 9
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
Page 10
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 3
Page 11
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
Page 12
Program iteration Exploring the IEC 61131-3 standard IEC 61131-3 pitfalls Final project Strategy Summary Further reading Questions 4 Unleashing Computer Memory Technical requirements What is memory? Memory Storage How computer/PLC memory and storage work
Page 13
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
Page 14
Summary Questions Further reading 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?
Page 15
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
Page 16
Questions 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
Page 17
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
Page 18
Part 2: Introduction to Structured Text Programming 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
Page 19
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 8 Exploring Variables and Tags Technical requirements What are variables/tags? Applications of variables Variables/tags under the hood
Page 20
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 fi le 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
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
Back to List