Programmable Controllers: Lý thuyết và Triển khai (Tái bản lần 2) bởi L. Bryan

Người đăng

Ẩn danh

Thể loại

Sách kỹ thuật

1997

1K
0
0

Phí lưu trữ

0 Point

Tóm tắt

I. Tổng quan về bộ điều khiển lập trình được PLC

Bộ điều khiển lập trình được PLC là thiết bị điện tử công nghiệp chuyên dụng. PLC được thiết kế để điều khiển quy trình sản xuất và máy móc tự động. Thiết bị này thay thế hệ thống relay cơ khí truyền thống. PLC hoạt động dựa trên nguyên lý quét chương trình liên tục. Bộ xử lý trung tâm CPU thực thi lệnh theo chu kỳ cố định. Đầu vào cảm biến được đọc và xử lý logic. Kết quả điều khiển gửi đến đầu ra chấp hành. PLC có khả năng mở rộng linh hoạt theo nhu cầu ứng dụng. Thiết kế module hóa giúp dễ dàng bảo trì và nâng cấp. Cuốn sách Programmable Controllers của L. Bryan trình bày chi tiết nguyên lý hoạt động. Nội dung bao gồm từ khái niệm cơ bản đến ứng dụng nâng cao. Hệ thống số và mã hóa là nền tảng quan trọng. Đại số Boolean cung cấp công cụ thiết kế mạch logic. PLC hiện đại tích hợp khả năng giao tiếp mạng mạnh mẽ.

1.1. Định nghĩa và nguyên lý hoạt động của PLC

PLC là máy tính công nghiệp được lập trình để điều khiển quy trình tự động. Nguyên lý hoạt động dựa trên chu kỳ quét ba bước chính. Bước đầu tiên là đọc trạng thái tất cả đầu vào số và tương tự. Bước thứ hai là thực thi chương trình logic người dùng đã viết. Bước thứ ba là cập nhật trạng thái đầu ra tương ứng kết quả xử lý. Chu kỳ này lặp lại liên tục với tốc độ tính bằng mili giây. Bộ nhớ lưu trữ chương trình và dữ liệu quá trình hoạt động. CPU xử lý tất cả phép tính logic và số học cần thiết.

1.2. Vị trí của PLC trong hệ thống điều khiển công nghiệp

PLC đóng vai trò trung tâm trong hệ thống điều khiển tự động hóa. Thiết bị kết nối trực tiếp với cảm biến và cơ cấu chấp hành. PLC giao tiếp với máy tính cá nhân để giám sát và thu thập dữ liệu. Máy tính hoạt động như giao diện đồ họa GUI hiển thị thông tin quá trình. PLC cũng kết nối mạng với hệ thống máy tính lớn mainframe. Chuẩn IEC 1131-3 định nghĩa ngôn ngữ lập trình tiêu chuẩn quốc tế. Các ngôn ngữ bao gồm sơ đồ thang, khối chức năng và văn bản cấu trúc. Phần mềm điều khiển dựa trên PC mở rộng khả năng xử lý của hệ thống.

II. Phân tích hệ thống số và logic trong PLC

Hệ thống số là nền tảng toán học thiết yếu cho lập trình PLC. Hệ nhị phân sử dụng hai ký hiệu zero và một để biểu diễn dữ liệu. Mỗi chữ số nhị phân gọi là một bit chứa giá trị logic duy nhất. Nhóm bốn bit tạo thành nibble và nhóm tám bit tạo thành byte. Một hoặc nhiều byte kết hợp tạo thành word dùng để xử lý dữ liệu. Giá trị trọng số của mỗi vị trí tính bằng lũy thừa cơ số hai. Ví dụ số nhị phân 10110110 tương đương 182 trong hệ thập phân. Bit có trọng số thấp nhất LSB nằm ở vị trí bên phải nhất. Bit có trọng số cao nhất MSB nằm ở vị trí bên trái nhất. Đại số Boolean cung cấp các phép toán logic cơ bản cho PLC. Phép toán AND OR NOT là nền tảng xây dựng mạch điều khiển. Biểu diễn liên hệ logic trong sơ đồ thang trực quan và dễ hiểu. Hệ thống bù một và bù hai xử lý số âm hiệu quả. Định dạng từ thanh ghi quyết định cách lưu trữ dữ liệu trong bộ nhớ.

2.1. Hệ nhị phân và cách chuyển đổi số trong PLC

Hệ nhị phân là ngôn ngữ gốc của mọi thiết bị kỹ thuật số bao gồm PLC. Việc tính giá trị thập phân tương đương số nhị phân rất đơn giản. Mỗi vị trí nhân với lũy thừa tương ứng của cơ số hai rồi cộng lại. Quá trình chuyển đổi ngược từ thập phân sang nhị phân dùng phép chia liên tiếp. PLC sử dụng hệ nhị phân để xử lý tất cả phép tính nội bộ. Cảm biến số cung cấp tín hiệu đầu vào dạng nhị phân cho PLC. Bộ nhớ PLC lưu trữ dữ liệu dưới dạng các word nhị phân có độ dài cố định. Hiểu hệ nhị phân là điều kiện tiên quyết để lập trình PLC hiệu quả.

2.2. Đại số Boolean và biểu diễn logic trong sơ đồ thang

Đại số Boolean là công cụ toán học dùng để thiết kế mạch logic PLC. Phép toán AND yêu cầu tất cả điều kiện đều đúng thì kết quả mới đúng. Phép toán OR chỉ cần một điều kiện đúng thì kết quả đã đúng. Phép toán NOT đảo ngược trạng thái logic của đầu vào. Sơ đồ thang ladder diagram biểu diễn trực quan các phép toán Boolean. Đường ray nguồn bên trái và bên phải tạo khung cho mạch logic. Liên hệ thường mở và thường đóng thể hiện điều kiện đầu vào. Cuộn dây đầu ra biểu thị kết quả điều khiển cần thực hiện. PLC quét sơ đồ thang từ trái sang phải và từ trên xuống dưới.

III. Giải pháp triển khai và lập trình PLC hiệu quả

Triển khai PLC đòi hỏi hiểu biết toàn diện về phần cứng và phần mềm. Hệ thống PLC bao gồm bộ xử lý nguồn cấp và thiết bị lập trình. Module bộ nhớ quyết định dung lượng lưu trữ chương trình và dữ liệu. Kiểm tra lỗi và chẩn đoán giúp đảm bảo độ tin cậy hệ thống. Nguồn cấp hệ thống cung cấp điện áp ổn định cho tất cả module. Thiết kế hệ thống đầu vào đầu vào ra phù hợp với yêu cầu ứng dụng. Giao tiếp mạng kết nối PLC với các thiết bị khác trong nhà máy. Phần mềm lập trình dựa trên chuẩn IEC 1131-3 đảm bảo tính tương thích. Sơ đồ tuần tự chức năng SFC mô tả luồng điều khiển phức tạp. Khối chức năng FBD đơn giản hóa thiết kế mạch điều khiển nâng cao. Danh sách lệnh IL và văn bản cấu trúc ST phù hợp lập trình viên có kinh nghiệm. Tài liệu hóa chương trình đầy đủ giúp bảo trì hệ thống dễ dàng hơn.

3.1. Cấu hình phần cứng và lựa chọn thiết bị PLC

Lựa chọn PLC phù hợp là bước quan trọng đầu tiên trong dự án tự động hóa. Cần xác định số lượng đầu vào số và tương tự cần thiết cho ứng dụng. Công suất đầu ra phải đáp ứng yêu cầu điều khiển cơ cấu chấp hành. Tốc độ xử lý CPU ảnh hưởng trực tiếp đến thời gian phản hồi hệ thống. Dung lượng bộ nhớ phải đủ cho chương trình và dữ liệu quá trình. Khả năng mở rộng module cho phép nâng cấp khi nhu cầu tăng trưởng. Nguồn cấp hệ thống phải ổn định và có dự phòng khi cần thiết. Kiểm tra chẩn đoán lỗi tích hợp giúp phát hiện sự cố nhanh chóng.

3.2. Kỹ thuật lập trình và tối ưu hóa chương trình PLC

Lập trình PLC bắt đầu bằng phân tích kỹ lưỡng yêu cầu điều khiển. Sơ đồ thang ladder là ngôn ngữ phổ biến nhất cho người mới bắt đầu. Chương trình nên được cấu trúc module hóa để dễ bảo trì và sửa đổi. Sử dụng hàm con và khối chức năng giúp giảm trùng lặp mã lệnh. Kiểm tra lỗi và xử lý ngoại lệ đảm bảo hệ thống hoạt động ổn định. Mô phỏng chương trình trước khi tải vào PLC giúp phát hiện lỗi sớm. Tài liệu hóa đầy đủ mỗi bước logic giúp đội ngũ bảo trì hiểu chương trình. Tối ưu hóa thời gian quét cải thiện hiệu suất tổng thể của hệ thống điều khiển.

IV. Kết luận và ứng dụng thực tế của PLC công nghiệp

PLC đã trở thành thiết bị không thể thiếu trong công nghiệp tự động hóa hiện đại. Ứng dụng trải rộng từ dây chuyền sản xuất đến hệ thống xử lý nước. Ngành ô tô sử dụng PLC để điều khiển robot hàn và lắp ráp. Ngành thực phẩm ứng dụng PLC trong đóng gói và kiểm soát chất lượng. Ngành hóa chất sử dụng PLC để giám sát quy trình phản ứng liên tục. Hệ thống HVAC trong tòa nhà được điều khiển bằng PLC tiết kiệm năng lượng. Giao thông công nghiệp như băng chuyền và hệ thống xếp dỡ tự động. PLC kết hợp với giao diện đồ họa GUI nâng cao khả năng giám sát. Thu thập dữ liệu quá trình giúp tối ưu hóa hiệu suất sản xuất. PLC đóng vai trò cầu nối giữa hệ thống điều khiển và máy tính lớn. Chuẩn IEC 1131-3 đảm bảo tính tương thích giữa các nhà sản xuất. Tương lai PLC hướng đến tích hợp sâu hơn với Internet vạn vật công nghiệp. Đào tạo nhân lực hiểu biết PLC là yêu cầu cấp thiết cho ngành sản xuất.

4.1. Ứng dụng PLC trong các ngành công nghiệp cụ thể

Ngành sản xuất ô tô ứng dụng PLC rộng rãi trong mọi công đoạn lắp ráp. Robot hàn và sơn được điều khiển chính xác bằng hệ thống PLC. Dây chuyền đóng gói thực phẩm sử dụng PLC đảm bảo tốc độ và vệ sinh. Nhà máy hóa chất dựa vào PLC giám sát áp suất nhiệt độ và lưu lượng. Hệ thống xử lý nước thải sử dụng PLC tự động hóa quy trình lọc và xử lý. Ngành dược phẩm yêu cầu PLC đạt tiêu chuẩn nghiêm ngặt về độ chính xác. Nhà máy điện sử dụng PLC điều khiển turbine và hệ thống phân phối điện. Mỗi ngành đều có yêu cầu đặc thù đòi hỏi giải pháp PLC tùy chỉnh.

4.2. Xu hướng phát triển và tương lai của công nghệ PLC

Công nghệ PLC liên tục phát triển đáp ứng nhu cầu tự động hóa ngày càng cao. Tích hợp giao thức mạng công nghiệp mở rộng khả năng kết nối thiết bị. Internet vạn vật công nghiệp IIoT tạo cơ hội thu thập dữ liệu thời gian thực. Điện toán đám mây hỗ trợ lưu trữ và phân tích dữ liệu sản xuất quy mô lớn. Trí tuệ nhân tạo AI tích hợp PLC giúp dự đoán bảo trì và tối ưu hóa quy trình. Kích thước PLC ngày càng nhỏ gọn nhưng công suất xử lý tăng mạnh. Bảo mật mạng trở thành ưu tiên hàng đầu khi PLC kết nối internet. Chuẩn IEC 1131-3 tiếp tục phát triển với các tính năng lập trình hiện đại hơn.

21/04/2026

Trích đoạn nội dung tài liệu

net Programmable Controllers Theory and Implementation Second Edition L.net PROGRAMMABLE CONTROLLERS T HEORY AND I MPLEMENTATION Second Edition L. Bryan An Industrial Text Company Publication Atlanta • Georgia • USA www.net © 1988, 1997 by Industrial Text Company Published by Industrial Text Company All rights reserved First edition 1988. Second edition 1997 Printed and bound in the United States of America 03 02 01 00 99 98 97 10 9 8 7 6 5 4 3 2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproduction or translation of any part of this work beyond that permitted by Sections 107 and 108 of the 1976 United States Copyright act are unlawful. Requests for permission, accompanying workbooks, or further information should be addressed to: Industrial Text and Video Company 1950 Spectrum Circle Tower A-First Floor Marietta, Georgia 30067 (770) 240-2200 (800) PLC-TEXT Library of Congress Cataloging-in-Publication Data Bryan, L. Programmable controllers: theory and implementation/L.8'9—dc21 96-49350 CIP Due to the nature of this publication and because of the different applications of programmable controllers, the readers or users and those responsible for applying the information herein contained must satisfy themselves to the acceptability of each application and the use of equipment therein mentioned. In no event shall the publisher and others involved in this publication be liable for direct, indirect, or consequential damages resulting from the use of any technique or equipment herein mentioned. The illustrations, charts, and examples in this book are intended solely to illustrate the methods used in each application example. The publisher and others involved in this publication cannot assume responsibility or liability for actual use based on the illustrative uses and applications. No patent liability is assumed with respect to use of information, circuits, illustrations, equipment, or software described in this text. Industrial Text & Video Company 1-800-752-8398 www.net Contents C ONTENTS Preface . ix About the Authors . x How to Use this Book . xi SECTION 1 INTRODUCTORY CONCEPTS Chapter 1 Introduction to Programmable Controllers 1-1 Definition . 5 1-3 Principles of Operation . 10 1-4 PLCs Versus Other Types of Controls . 13 1-5 PLC Product Application Ranges . 22 1-6 Ladder Diagrams and the PLC . 24 1-7 Advantages of PLCs . 26 Chapter 2 Number Systems and Codes 2-1 Number Systems . 41 2-3 One’s and Two’s Complement . 46 2-5 Register Word Formats . 50 Chapter 3 Logic Concepts 3-1 The Binary Concept . 57 3-3 Principles of Boolean Algebra and Logic . 64 3-4 PLC Circuits and Logic Contact Symbology . 68 SECTION 2 COMPONENTS AND SYSTEMS Chapter 4 Processors, the Power Supply, and Programming Devices 4-1 Introduction . 86 4-4 Error Checking and Diagnostics . 92 4-5 The System Power Supply . 104 Chapter 5 The Memory System and I/O Interaction 5-1 Memory Overview . 111 5-3 Memory Structure and Capacity . 115 5-4 Memory Organization and I/O Interaction . 119 Industrial Text & Video Company 1-800-752-8398 iii www.net Contents 5-5 Configuring the PLC Memory—I/O Addressing . 127 5-6 Summary of Memory, Scanning, and I/O Interaction . 133 Chapter 6 The Discrete Input/Output System 6-1 Introduction to Discrete I/O Systems . 138 6-2 I/O Rack Enclosures and Table Mapping . 146 6-4 PLC Instructions for Discrete Inputs . 147 6-5 Types of Discrete Inputs . 150 6-6 PLC Instructions for Discrete Outputs . 165 6-8 Discrete Bypass/Control Stations . 178 6-10 Summary of Discrete I/O . 182 Chapter 7 The Analog Input/Output System 7-1 Overview of Analog Input Signals . 186 7-2 Instructions for Analog Input Modules . 187 7-3 Analog Input Data Representation . 189 7-4 Analog Input Data Handling . 196 7-5 Analog Input Connections . 199 7-6 Overview of Analog Output Signals . 201 7-7 Instructions for Analog Output Modules . 201 7-8 Analog Output Data Representation . 203 7-9 Analog Output Data Handling . 207 7-10 Analog Output Connections . 213 7-11 Analog Output Bypass/Control Stations . 214 Chapter 8 Special Function I/O and Serial Communication Interfacing 8-1 Introduction to Special I/O Modules . 218 8-2 Special Discrete Interfaces . 220 8-3 Special Analog, Temperature, and PID Interfaces . 233 8-5 ASCII, Computer, and Network Interfaces . 248 8-6 Fuzzy Logic Interfaces . 260 SECTION 3 PLC PROGRAMMING Chapter 9 Programming Languages 9-1 Introduction to Programming Languages . 276 9-2 Types of PLC Languages . 276 9-3 Ladder Diagram Format . 282 9-4 Ladder Relay Instructions . 289 9-5 Ladder Relay Programming . 298 9-6 Timers and Counters . 308 Industrial Text & Video Company 1-800-752-8398 iv www.net Contents 9-8 Counter Instructions . 312 9-9 Program/Flow Control Instructions . 322 9-11 Data Manipulation Instructions . 334 9-12 Data Transfer Instructions . 348 9-13 Special Function Instructions . 358 9-14 Network Communication Instructions . 369 Chapter 10 The IEC 1131 Standard and Programming Language 10-1 Introduction to the IEC 1131 . 374 10-2 IEC 1131-3 Programming Languages . 380 10-3 Sequential Function Chart Programming . 403 10-4 Types of Step Actions . 419 10-5 IEC 1131-3 Software Systems . 439 Chapter 11 System Programming and Implementation 11-1 Control Task Definition . 445 11-4 Programming Organization and Implementation . 446 11-5 Discrete I/O Control Programming . 465 11-6 Analog I/O Control Programming . 492 11-7 Short Programming Examples . 521 Chapter 12 PLC System Documentation 12-1 Introduction to Documentation . 536 12-2 Steps for Documentation . 537 12-3 PLC Documentation Systems . 549 SECTION 4 PLC PROCESS APPLICATIONS Chapter 13 Data Measurements and Transducers 13-1 Basic Measurement Concepts . 554 13-2 Interpreting Errors in Measurements . 608 Chapter 14 Process Responses and Transfer Functions 14-1 Process Control Basics . 610 14-2 Control System Parameters . 614 Industrial Text & Video Company 1-800-752-8398 v www.net Contents 14-3 Process Dynamics . 623 14-4 Laplace Transform Basics . 632 14-5 Dead Time Responses in Laplace Form . 644 14-6 Lag Responses in Laplace Form . 645 14-7 Types of Second-Order Responses . 665 Chapter 15 Process Controllers and Loop Tuning 15-1 Introduction . 671 15-3 Discrete-Mode Controllers . 676 15-4 Continuous-Mode Controllers . 706 15-7 Proportional-Integral Controllers (PI Mode) . 725 15-9 Proportional-Derivative Controllers (PD Mode) . 729 15-10 Proportional-Integral-Derivative Controllers (PID Mode) . 736 15-11 Advanced Control Systems . 744 15-12 Controller Loop Tuning . 766 SECTION 5 ADVANCED PLC TOPICS AND NETWORKS Chapter 16 Artificial Intelligence and PLC Systems 16-1 Introduction to AI Systems . 774 16-2 Types of AI Systems . 774 16-3 Organizational Structure of an AI System . 781 16-6 AI Fault Diagnostics Application . 788 Chapter 17 Fuzzy Logic 17-1 Introduction to Fuzzy Logic . 798 17-2 History of Fuzzy Logic . 801 17-3 Fuzzy Logic Operation . 802 17-4 Fuzzy Logic Control Components . 805 17-5 Fuzzy Logic Control Example . 828 17-6 Fuzzy Logic Design Guidelines . 835 Chapter 18 Local Area Networks 18-1 History of Local Area Networks . 848 18-2 Principles of Local Area Networks . 851 18-4 Network Access Methods . 860 18-6 Understanding Network Specifications . 862 Industrial Text & Video Company 1-800-752-8398 vi www.net Contents 18-7 Network Protocols . 866 18-8 Network Testing and Troubleshooting . 874 18-9 Network Comparison and Selection Criteria . 875 Chapter 19 I/O Bus Networks 19-1 Introduction to I/O Bus Networks . 880 19-2 Types of I/O Bus Networks . 883 19-3 Advantages of I/O Bus Networks . 885 19-4 Device Bus Networks . 886 19-5 Process Bus Networks . 899 19-6 I/O Bus Installation and Wiring Connections . 910 19-7 Summary of I/O Bus Networks . 916 SECTION 6 INSTALLATION AND START-UP Chapter 20 PLC Start-Up and Maintenance 20-1 PLC System Layout . 922 20-2 Power Requirements and Safety Circuitry . 931 20-3 Noise, Heat, and Voltage Considerations . 935 20-4 I/O Installation, Wiring, and Precautions . 942 20-5 PLC Start-Up and Checking Procedures . 948 20-6 PLC System Maintenance . 952 20-7 Troubleshooting the PLC System . 954 Chapter 21 System Selection Guidelines 21-1 Introduction to PLC System Selection . 962 21-2 PLC Sizes and Scopes of Applications . 962 21-3 Process Control System Definition . 982 APPENDICES Appendix A Logic Symbols, Truth Tables, and Equivalent Ladder/Logic Diagrams . 987 Appendix B ASCII Reference . 989 Appendix C Electrical Relay Diagram Symbols . 991 Appendix D P&ID Symbols . 993 Appendix E Equation of a Line and Number Tables . 995 Appendix F Abbreviations and Acronyms . 997 Appendix G Voltage-Current Laplace Transfer Function Relationships . 1025 Industrial Text & Video Company 1-800-752-8398 vii www.net This page intentionally left blank.net Preface PREFACE Since the first edition of this book in 1988, the capabilities of programmable logic controllers have grown by leaps and bounds. Likewise, the applications of PLCs have grown with them. In fact, in today’s increasingly computer- controlled environment, it is almost impossible to find a technical industry that does not use programmable controllers in one form or another. To respond to these phenomenal changes, we introduce the second edition of Programmable Controllers: Theory and Implementation. This second edition, like the first, provides a comprehensive theoretical, yet practical, look at all aspects of PLCs and their associated devices and systems. However, this version goes one step further with new chapters on advanced PLC topics, such as I/O bus networks, fuzzy logic, the IEC 1131-3 program- ming standard, process control, and PID algorithms. This new edition also presents revised, up-to-date information about existing topics, with expanded graphics and new, hands-on examples. Furthermore, the new layout of the book—with features like two-tone graphics, key terms lists, well-defined headings and sections, callout icons, and a revised, expanded glossary— makes the information presented even easier to understand. This new edition has been a labor-intensive learning experience for all those involved. As with any task so large, we could never have done it alone. Therefore, we would like to thank the following companies for their help in bringing this book to press: Allen-Bradley Company—Industrial Computer Group, ASI-USA, B & R Industrial Automation, Bailey Controls Company, DeviceNet Vendors Association, ExperTune Software, Fieldbus Foundation, Hoffman Engineering Company, Honeywell—MicroSwitch Division, LANcity—Cable Modem Division of Bay Networks, Mitsubishi Electronics, Omron Electronics, Phoenix Contact, PLC Direct, PMC/BETA LP, Profibus Trade Organization, Schaevitz Engineering Company, Siemens Automation, Square D Company, Thermometrics, and WAGO. We hope that you will find this book to be a valuable learning and reference tool. We have tried to present a variety of programmable control operations; however, with the unlimited variations in control systems, we certainly have not been able to provide an exhaustive list of PLC applications. Only you, armed with the knowledge gained through this book, can explore the true limits of programmable logic controllers. Stephanie Philippo Editor Industrial Text & Video Company 1-800-752-8398 ix www.net About the Authors A BOUT THE AUTHORS L UIS B RYAN Luis Bryan holds a Bachelor of Science in Electrical Engineering degree and a Master of Science in Electrical Engineering degree, both from the Univer- sity of Tennessee. His major areas of expertise are digital systems, electron- ics, and computer engineering. During his graduate studies, Luis was in- volved in several projects with national and international governmental agencies. Luis has extensive experience in the field of programmable controllers. He was involved in international marketing activities, as well as PLC applica- tions development, for a major programmable controller manufacturer. He also worked for a consulting firm, providing market studies and company- specific consultations about PLCs. Furthermore, Luis has given lectures and seminars in Canada, Mexico, and South America about the uses of program- mable controllers. He continues to teach seminars to industry and government entities, including the National Aeronautics and Space Administration (NASA). Luis is an active member of several professional organizations, including the Institute of Electrical and Electronics Engineers (IEEE) and the IEEE’s instrument and computer societies.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ