1、Cascading LogicA Machine Control Methodology forProgrammable Logic ControllersCascading LogicA Machine Control Methodology forProgrammable Logic ControllersGary Kirckof, P.E.NoticeThe information presented in this publication is for the general education of the reader. Because neither the author nor
2、 the publisher have any control over the use of the information by the reader, both the author and the publisher disclaim any and all liability of any kind arising out of such use. The reader is expected to exercise sound professional judgment in using any of the information presented in a particula
3、r application.Additionally, neither the author nor the publisher have investigated or considered the affect of any patents on the ability of the reader to use any of the information in a particular application. The reader is responsible for reviewing any possible patents that may affect any particul
4、ar use of the information presented.Any references to commercial products in the work are cited as examples only. Neither the author nor the publisher endorse any referenced commercial product. Any trademarks or tradenames referenced belong to the respective owner of the mark or name. Neither the au
5、thor nor the publisher make any representation regarding the availability of any referenced commercial product at any time. The manufacturers instructions on use of any commercial product must be followed at all times, even if in conflict with the information in this publication.Copyright 2003 ISA T
6、he Instrumentation, Systems, and Automation SocietyAll rights reserved. Printed in the United States of America. 10 9 8 7 6 5 4 3 2ISBN 1-55617-814-XNo part of this work may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
7、 recording or otherwise, without the prior writ-ten permission of the publisher.ISA67 Alexander DriveP.O. Box 12277Research Triangle Park, NC 27709Library of Congress Cataloging-in-Publication DataKirckof, Gary.Cascading logic :a machine control methodology for programmable logiccontrollers / by Gar
8、y Kirckof.p. cm.Includes bibliographical references and index.ISBN 1-55617-814-X1. Programmable controllers. I. Title.TJ223.P76 K56 2002629.89-dc212002012741vContentsABOUT THE AUTHOR ixINTRODUCTION xiChapter 1 LADDER LOGIC BASICS 11.0 Introduction, 11.1 Rungs and Branches, 21.2 Program Execution and
9、 Scan Time, 31.3 One Shots, 41.4 Always On Bit, 51.5 First Scan Bit, 61.6 Alternators, 61.7 Binary Counters, 71.8 One Scan Oscillator, 91.9 Latches, 91.10 Duty Timers, 121.11 DeMorgans Theorem, 121.12 Other Circuits, 14Chapter 2 SEQUENCES AND MOTION OBJECTS 152.0 Introduction, 152.1 Functional Group
10、ing, 152.2 Documentation, 172.3 Sequences, 172.4 The Motion Object, 202.5 Summary, 27vi Table of ContentsChapter 3 OUTPUT LOGIC 293.0 Introduction, 293.1 Application Considerations, 293.2 Spring-Return Valves, 323.3 Auxiliary Rungs, 323.4 Spring-Return Valve Output Latch, 353.5 Recovery, 373.6 Doubl
11、e-Ended, Detented Valves, 393.7 Double-Ended Valve Output Logic (Spring-Return Configuration), 403.8 Double-Ended Valve Output Logic (Double-Ended Configuration), 413.9 Three-Position Valves, 423.10 Three-Position Cylinders, 453.11 Pulse Outputs, 463.12 Conclusion, 47Chapter 4 SIMULATING SENSORS 494
12、.0 Introduction, 494.1 Cylinders with Only One Sensor, 494.2 Cylinders with No Sensors, 504.3 Time-Driven Motion Objects, 504.4 Output Logic Versus Motion Objects, 52Chapter 5 CHECKING SENSORS 535.0 Introduction, 535.1 Problems with Lone Sensors, 545.2 Back Checking, 555.3 Forward Checking, 575.4 Po
13、sition Bits, 595.5 How Often Sensors Are Checked, 605.6 Home Position, 61Chapter 6 CONTROLLING SEQUENCES 656.0 Introduction, 656.1 Types of Sequences, 656.2 Common Control Structure, 666.3 Conclusion, 75Chapter 7 STEP AND SINGLE CYCLE 777.0 Introduction, 777.1 Why Have Stepping?, 777.2 Why Have Sing
14、le Cycle?, 787.3 Mode Selection, 787.4 Single-Cycle Control, 807.5 Step Mode Control, 827.6 Modified Sequence Control, 83Table of Contents vii7.7 Mix and Match Modes, 857.8 Machine Running, 867.9 In Cycle, 877.10 Fault Recovery, Debug, and Startup Tools, 87Chapter 8 SYSTEM CONTROL 918.0 Introduction
15、, 918.1 Summary of Sequence Control, 918.2 Control Hierarchy, 948.3 System Control, 968.4 Starting Auxiliary Equipment with the Machine, 1038.5 Program Structure, 1038.6 Summary, 104Chapter 9 PARENT/CHILD SEQUENCES 1079.0 Introduction, 1079.1 The Dial Machine, 1079.2 The Dial Sequence, 1129.3 Typica
16、l Station Sequence, 1249.4 Cycle Stop Points, 1289.5 Manual Load/Unload Stations, 1319.6 Dial Mechanisms, 1319.7 Indexing Stations, 1339.8 Code Generation and Checking, 134Chapter 10 DECISION LOGIC 13710.0 Introduction, 13710.1 The Pick/Place Example, 13710.2 Part Inspection, 13710.3 Continuing Sequ
17、ences, 14210.4 Branching Sequences, 14310.5 Converging Sequences, 14310.6 Parallel Branches, 14410.7 Conclusion, 145Chapter 11 DEPENDENT SEQUENCES 14711.0 Introduction, 14711.1 The Example, 14711.2 The Problem, 14911.3 The Solution, 15211.4 Other Problems, 15211.5 Conclusion, 154viii Table of Conten
18、tsChapter 12 MACHINE STATES 15512.0 Introduction, 15512.1 Machine States, 15612.2 Machine State Concepts, 15612.3 Power Off State, 15812.4 First Scan State, 15812.5 Fault State, 15912.6 Manual Mode State, 16212.7 Ready and Not Ready States, 16212.8 Running State, 16312.9 Other Possible States, 16412
19、.10 Conclusions, 164Chapter 13 MESSAGE LOGIC 16713.0 Introduction, 16713.1 Motion Object, 16813.2 Message Displays, 16913.3 Message Display Logic, 16913.4 Types of Messages, 17113.5 Message Text, 17213.6 Message Logic Payback, 173Appendix A 175GLOSSARY 185INDEX 203ixAbout theAuthorGary Kirckof has s
20、pent the bulk of his twenty-year career programming automated equipment and assembly lines. Cascading Logic is a direct result of that experience. He is a mechanical engineering graduate of the University of Minnesota and as such started his career engineering process piping, heating, ventilating an
21、d air conditioning systems. The shift in focus to programming happened in stages. The first step occurred after the energy crisis when energy management system became popular. These systems were designed to reduce the operating cost of the equipment he was working with so programming them became par
22、t of his job. The next step happened while installing an energy management system in a Ford Motor Company plant. While working up in the trusses he looked down at all the automated equipment below him and decided right then and there to become a machine programmer. His affinity towards program-ming
23、and his mechanical engineering background made him a natural control engineer. Gary Kirckof is currently a system engineer for Remmele Engineering in St. Paul, Minnesota and is both a registered mechanical and electrical engineer.xiIntroductionCascading logic is a programming methodology for generat
24、ing machine-control programs. It is intended for industrial equipment that is sequential and controlled by a programmable logic controller. The intent of Cascad-ing Logic is to create robust and reliable programs that are easy to write, easy to debug, and easy to maintain. The goals of Cascading Log
25、ic are to save time for both the programmer and the end user of the equipment (minimize downtime) and to produce better machinery. Lets look at what industrial equipment consists of, what is needed to commission and main-tain industrial equipment, and what is required of a machine-control pro-gram t
26、o best understand the reasoning behind Cascading Logic.Typical Industrial EquipmentIndustrial equipment is a collection of motions, where a motion is any com-bination of mechanisms and a prime mover that can cause a physical event to occur on the machine. Most physical events result in something act
27、ually moving, hence the name “motion” to generally describe these events; but physical events also include activities such as maintaining tem-peratures and communicating with databases.Prime movers cause events to happen and include devices such as hydraulic and pneumatic cylinders, various types of
28、 motors, and heaters. Prime movers are controlled by output signals from the programmable logic controller. The output signals are coupled to the prime movers through solenoid valves, variable-speed drives, servo controllers, and so forth. The programmable logic controller receives feedback from the
29、 prime movers, mechanisms for positional information, and so forth to complete the control loop. Sensors such as proximity switches, photoelectric eyes, and thermocouples are typically used to provide the feedback.xii Cascading LogicA common machine motion is a pneumatic cylinder controlled through
30、a solenoid valve. It uses two proximity switches to provide feedback. The programmable logic controller can command the cylinder to extend and retract, knows when the cylinder is either extended or retracted, and even knows when the cylinder is in the process of extending or retracting.Industrial eq
31、uipment is also a collection of processes. Typical processes include press-fitting two parts together, welding, bending, and part inspecting. A large amount of machine activity involves transferring parts between processes and includes pick-and-place mechanisms, dials, and walking beams. Each proces
32、s on a machine and the associated part-trans-fer mechanisms usually require a separate machine section, referred to as a station. Each station is autonomous, sharing only part-transfer mecha-nisms and data with the other stations. As such, we can group the machine motions into processes or stations
33、and think of the machine as a collection of stations. Its the divide-and-conquer approach that allows us to think of the machine as a whole, just a single station of the machine, or just an indi-vidual motion of a station.The subdivision of the machine-control program follows the grouping of the mac
34、hines processes. The program will thus have a system section for the logic common to all the stations, a section for each station, plus a few miscellaneous sections to round off the code.Typical industrial equipment is sequential, that is, the prime movers of each station are programmed to operate o
35、ne after another in a prescribed manner until the required process is complete. The sequence of events are also cyclic, such that the mechanisms end up in the same positions they started from; this means the sequence can be repeated over and over again. It thus becomes the task of the programmer to
36、convey the required machine actions and the timing of each action into a machine-control pro-gram. Programming begins not by writing logic but instead by listing each step a station must perform. A step of a sequence is the smallest action the machine controller can initiate, such as energizing a so
37、lenoid valve or trig-gering a vision system to start its inspection routine. The steps are then combined into a sequence for the station. This is perhaps one of the easiest programming tasks, provided you know the steps the station is required to take. It is equally important for the machine control
38、ler to have sufficient feedback, so it can execute the steps at the correct time, determine if the step finished or failed, and make other appropriate decisions.Commissioning and Maintaining EquipmentAt some point in the equipments life, it is turned on for the first time. At this point nothing is a
39、djusted. Devices such as flow-control valves, motor Introduction xiiispeeds, time delays inside the machine-control logic, and the position of feedback sensors all have to be adjusted and set correctly for the machine to run as required. Pneumatic cylinders may be sticky when first used, the clutch
40、and/or brakes may need to be burnished for proper operation, and load cells will need to be calibrated. Most likely, wiring and plumbing mis-takes will need to be sorted out. Everything on the machine will need to be adjusted and checked before the machine is ready for production. The pro-grammer is
41、 also faced with time constraints to complete the equipment startup and debug as quickly as possible.Tools can be added to the machine-control logic to help out and to speed up the commissioning process. A typical tool is a manual-mode layer added to the machine-control logic. This allows each motio
42、n to be individ-ually and conveniently controlled from the operator-control station and provides the status of each motion, such as position. As a result, a cylinder can be repeatedly commanded to extend and retract to exercise it and to set its flow controls. A vision system can be commanded to ins
43、pect a part over and over to check its operation without the need to run the entire machine. The manual-mode layer is a great way to check out the input/output of the programmable logic controller. Each motion can be com-manded to see if it goes in the correct direction and if the sensors are trig-g
44、ered correctly. The prime movers, sensors, plumbing, and wiring can all be checked at once. An alternative method involves triggering sensors with the tip of a screwdriver while watching the lights on the input mod-ules and forcing outputs on and off while observing the associated prime movers. The
45、alternate method, while widely used, does not check to see if signals make it into the controller (faulty processor racks and/or mod-ules). It does not check association of inputs and outputs, and it does not provide convenient functionality for the end user.Manual-mode operations can be used to wal
46、k product through the machine to set up alignment, such as hard stops, and it can be used to fine-tune sensor locations after each motion is individually checked out and initially tuned. The next step is to check out and test the logic. The logic is easier to check out when we know the motions are i
47、n working order because it is faster to determine if a problem is hardware or software. Manual-mode operations give us not only the ability to work with each motion, but provide us with a firm foundation, after we have confidence with the motions, to proceed with the logic. More tools can be incorpo
48、-rated into the logic to assist with program check-out.Just as the individual motions on a machine are grouped into station sequences then into an entire machine program, the equipment can be commissioned in a like manner. Additional tools can be used to step and single cycle each station. Stepping
49、allows an operator to walk through a xiv Cascading Logicstations sequence one step at a time to check the programming of the sequence and to check the alignment of the mechanisms. Single cycling allows the station to step through its sequence at rated speed to check cycle time and machine dynamics.A good example is setting up a dial to function correctly. Take a dial pow-ered by an AC motor through a clutch/brake. The clutch/brake is ener-gized to spin a dial, which in turn advances the product on the dial from one station to the next. A proximity switch is used to se
copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1