Académique Documents
Professionnel Documents
Culture Documents
Intended Use This station has been developed and produced solely for vocational and further training purposes in the field of automation and technology. The company undertaking the training and/or the instructors is/are to ensure that trainees observe the safety precautions described in the manuals provided. Festo Didactic herewith excludes any liability for damage or injury caused to trainees, the training company, and/or any third party, which may occur if the system is in use for purposes other than purely for training, unless the said damage/injury has been caused by Festo Didactic deliberately or through gross negligence. Order No.: Update: Authors: XXXXXX 08/2010 Frank Ebel, Markus Pany Revised by Tony Oran, Mark Adrian, Cristobal Jimenez Doris Schwarzenberger, Albert Sigel
Graphics:
Festo Corporation, 2010 Internet: festo.com/uslearningsystems e-mail: usls@us.festo.com Address: 395 Moreland Road; Hauppauge, NY 11788 The copying, distribution, and utilization of this document, as well as the communication of its contents to others without express authorization, is prohibited. Offenders will be held liable for the payment of damages. All rights reserved, in particular the right to carry out patent, utility model, or ornamental design registration. Copyright permission form for electronic version of manual available upon request.
TABLE OF CONTENTS
Getting Started .............................................................................................................. 1
Training Contents ......................................................................... Error! Bookmark not defined. Course Objectives: ...................................................................................................................... 4
Getting Started
Page 1
Getting Started
Getting Started
Training Contents Important Notes Responsibilities of the Instructor Responsibilities of Trainees Safety Warranty and Liability Intended Use
Page 1
Getting Started
Important Notes
The basic requirement for safe use and trouble-free operation of the MPS (Modular Production System) is to observe the fundamental safety recommendations and regulations. The safety recommendations in particular must be observed by anyone working on the MPS. Furthermore, the rules and regulations for the prevention of accidents applicable to the place of use must be observed.
Responsibilities of Trainees
Prior to beginning work, all persons assigned to working on the MPS have a duty to: Read the section on safety and the cautionary notes in this manual. Observe the basic regulations regarding operational safety and the prevention of accidents.
Safety
The MPS is designed according to state-of-the-art technology and in compliance with recognized safety regulations. However, when using the system, there is, nevertheless, a risk of physical or fatal injury to the user or third parties or of damage being caused to the machinery or other material assets. The MPS is to be used only: For its intended purpose. In absolutely safe conditions.
2010, Festo Didactic
Getting Started
General Trainees must work on the station only under the supervision of an instructor. Observe the data in the data sheets for the individual components, in particular, all notes on safety!
Electrics Wire up or disconnect electrical connections only when power is disconnected! Use only low voltages of up to 24 V DC.
Pneumatics Do not exceed the permissible pressure of 8 bar (800 kPa). Do not switch on compressed air until you have established and secured all tubing connections. Do not disconnect air lines under pressure. Pay particular attention when switching on the compressed air. Cylinders may advance or retract as soon as the compressed air is switched on.
Mechanics Securely mount all components on the plate. Do not attempt manual intervention unless the machine is at rest.
Page 3
Getting Started
of the system other than purely in a training situation, unless such damage has been caused intentionally or due to gross negligence by Festo Didactic.
Intended Use
This system has been developed and produced exclusively for vocational and further training in the field of automation and technology. The training authority and/or the instructors is/are to ensure that trainees observe the safety precautions described. The use of the system for its intended purpose also includes: Following all advice in the manual. Carrying out inspection and maintenance work.
Course Objectives
Explain the function of a ladder diagram. Explain the function of a block diagram. Describe Statement List and Structured Text. Explain the function of a Programmable Logic Controller (PLC). Describe the parts of a PLC. Describe I/O connections.
Page 4
Getting Started
Do not use the worksheets in this workbook. Print the worksheets from the Training Guide CD included in the back of this book. Additional resources can be found on the CD included with the MPS station.
2010, Festo Didactic
Page 5
Getting Started
Page 6
Lesson
Programmable Logic Controller
Lesson Objectives: Explain the function of a ladder diagram. Explain the function of a block diagram. Describe Statement List and Structured Text. Explain the function of a Programmable Logic Controller (PLC). Describe the parts of a PLC. Describe I/O connections. Develop a PLC program using Statement List Language (STL). Complete an input and output map of the signals from the PLC to the control panel. Explain the relationship between the outputs of a PLC and the actuators they serve.
Page 7
15 Hours
In this lesson, students will learn the fundamentals of programming using Ladder Diagrams, Statements Lists, Structured Text, and Function Blocks. Students will also learn to program using STL (Statement List Language). In addition, students will identify inputs and outputs of the MPS station and control panel. Students will learn about the relationships between: The outputs of a PLC and the actuators they serve. The sensors and the inputs of a PLC. The signals from the PLC to the control panel.
Terminology
Algorithm Backplane Banana Connector Central Processing Unit (CPU) Coil Element Control Logic Digital I/O Ethernet Field Bus Fixed I/O PLC FST Function Block Diagram IEC 61131-3 Input Module Ladder Diagram Logic Diagram Modular PLC NOP NPN Controller Operand Operating Output Module Pascal PLC Relay PNP Controller Profibus-DP Programmable Logic Controller (PLC) Relay Coil Scan Scan Cycle Scan Time Sequential Function Chart Sinking I/O Circuits Sourcing I/O Circuits Statement List Language (STL) Step Instruction Structured Text (ST) SysLink Connector
Page 8
The ladder diagram is a graphic programming language derived from the circuit diagram representation of directly wired relay controls. A ladder diagram consists of power rails on the left- and right-hand side of the diagram, which are connected via rungs by means of switching elements (normally open contacts, normally closed contacts) and coil elements.
Ladder Diagram
In the function block diagram, the functions and function blocks are represented graphically and interconnected into networks. The function block diagram originates from the logic diagram for the design of electronic circuits.
Page 9
Statement List
Statement list is a textual, assembler type language, typified by a simple machine model (process with only one register). A statement list is made up of control instructions consisting of an operator and operand. LD OR AND AND ST Part_TypeA Part_TypeB Part_present Dr ill_OK Sleeve_in
With regard to philosophy of languages, the ladder diagram, function block diagram, and statement list are defined in the manner in which they are used in PLC technology nowadays. They are, however, limited to basic functions with regard to their elements. This is where they mainly differ from the currently existing company dialects. The high performance of these languages is due to the unlimited use of functions and function blocks. Structured text is a high-level language based on Pascal consisting of expressions and instructions. In the main, instructions are defined as follows: Selection instruction such as IF...THEN...ELSE etc., repeat instructions such as FOR, WHILE etc., as well as function block invocations. Example: Sleeve_in:=(Part_TypeA OR Part_TypeB) AND Part_present AND Drill_OK; Structured text facilitates the formulation of numerous applications which exceed pure control technology, such as algorithm problems (high-order computing algorithms, etc.) and data management (data analysis, dealing with more complex data structures, etc.).
Page 10
Power Rail S1
RUNG 1
Neutral Rail
CR1 S2
RUNG 2
S2
S3
CR2
The main disadvantage of the relay panels was the failure of the relays. Even a very good relay has a life of about one million cycles. In some high speed machines this may mean only six months of use. The maintenance of the panels was very time consuming
2010, Festo Didactic
Page 11
Parts of a PLC
As mentioned earlier, a PLC is a specialized computer. The following table compares parts of a PLC to those of a personal computer (PC): Parts of a PLC Central processing unit (CPU) Input module(s) Output module(s) Power supply Backplane Programming device As the table indicates, a PLC is very much like a PC except it has specialized input and output modules. Unlike the keyboard and mouse of a PC, the inputs to the PLC come from field devices, such as sensors and switches, through its input module(s). In a PC the output is sent to a monitor for the user to see. The PLC outputs are sent to field devices, such as motors, relays, valves, etc., through its output module(s). Since the PLC does not have a keyboard or a monitor, a device with a keyboard and monitor is required for programming. In most of todays PLCs, a PC is connected to the PLC as a programming device. Parts of a PC Central processing unit (CPU) Keyboard and mouse Monitor Power supply Motherboard
Page 12
Input module
Output module
There are two ways in which PLCs are constructed: Fixed I/O Modular PLC Fixed I/O PLC Fixed I/O is typically available in small PLCs that come in one package. These types of PLCs are sometimes called brick PLCs because of their small size.
Construction of a PLC
Modular PLC Modular PLCs consist of a CPU module, rack, power supply, and I/O modules in components purchased separately. They greatly increase the ability to custom configure a PLC for a more complex control application. The PLC can be configured to have different types of I/O modules such as digital I/O, analog I/O, communication interface modules, and intelligent I/O with a built-in CPU for high-speed frequency counting.
Page 13
Power supply
A PLC connects input field devices to output field devices through a ladder logic program implemented in software. For example, in the case of the implementation below, the output relay coil 2 (CR2) is energized only if both switches S2 and S3 are pressed.
PLC
Power supply
S1 Input module
Communication
Processor
Output
Input
Input
S1 CR1 S2 S2 S3 CR2
Output module
CR1
S2
S3
CR2
Scan cycle During each operating cycle, the processor: 1. Reads all inputs. 2. Runs the ladder program once to determine the changes in the states of the output devices based on the control logic described by the ladder program and the states of the input devices. 3. Energizes or de-energizes the output devices accordingly. This process is known as a scan. Because the inputs can change at any time, the PLC must repeat this process continuously. Scan time varies with program content and length. A single scan can take anywhere from 1 to 20 ms. If an input changes its state faster than the scan time, then the PLC will most likely miss the changes.
Read inputs
Update outputs
Run program
Page 14
S1
Input device DC power supply
GRD GRD
Sinking Input module Sourcing Output module
Sequence control systems are processes executed in several, clearly separate steps. In such systems, progression from one step to the next occurs only when enabling conditions of the current step are fulfilled. For example, a stamping machine may go through the following sequence of five steps to complete its operation on a part: 1st Check initial part position. 2nd Clamp part. 3rd Stamp part. 4th Unclamp part. 5th Eject part.
Page 15
Clamp part
S
3.1: Part stamped
Stamp part
Unclamp part
S
5.1: Part ejected
Eject part
sequential function chart contains: Steps Transitions between steps and Actions.
Step Transition Step 2 1 Receive part from a feeder
1.1: Part present, stamping, clamping and ejection cylinders retracted
Clamp part
Action
Steps represent the sequence of the operation. Transitions describe the condition for moving from one step to the next. Actions are commands executed by a sequence controller (PLC).
Page 16
As mentioned in Section 2.1, PLCs were developed in the early 1970s in response to the need for quick change over time and ease of maintenance of automated equipment. Prior to the PLCs, automation was implemented using relays and ladder logic wiring diagrams. Initially, PLCs were programmed using a graphical language (ladder diagram programming) that looked like the ladder diagrams. This made transition from the relay implemented control boards to the PLCs very easy. In fact, ladder diagram programming remains one of the most widely used PLC programming languages today. Another PLC programming language is Statement List (STL) Language. STL language allows the programmer to solve control tasks using simple English statements to describe the desired operation of the controller. STL Element Hierarchy STL programs consist of steps. Each step can contain one or more sentences. Each sentence contains a conditional and an executive part.
STEP 1 SENTENCE 1 Conditional part THEN Executive part SENTENCE 2 Conditional part THEN Executive part STEP 2 SENTENCE 1 Conditional part THEN Executive part SENTENCE 2 Conditional part THEN Executive part
Page 17
SET
This sentence will set (turn on) output O1.2 if the input I1.0 is true. It is also possible to make logical combinations. For example, IF AND AND SET RESET N I1.0 I2.1 O2.2 O1.2 O3.0
THEN
This sentence will turn output O1.2 ON and output O3.0 OFF if input I1.0 is ON and I2.1 is OFF and output O2.2 is ON. Comparison to Ladder Diagrams Consider a rung in a ladder diagram that turns output O2.6 ON whenever input I1.0 is ON:
I1.0 O2.6
The equivalent STL sentence would be: IF I1.0 THEN SET O2.6 PSE
2010, Festo Didactic
Page 18
In this example it is also assumed that STEP 1 of the operation (Receive part) is accomplished by receiving a part from a part feeder and is not an action by the stamping machine controller. Following is an STL program corresponding to the sequential function chart of the stamping machine.
Page 19
STEP 2 IF THEN STEP 3 IF AND THEN STEP 4 IF THEN STEP 5 IF THEN AND SET JMP TO RESET RESET SET SET
In the above program STEP 1 used the NOP (No Operation) instruction. When used in the conditional part of a sentence, the NOP instruction constructs a sentence that is always true. In other words, the executive part of the sentence is performed in any case. STEP 1: Initializes the stamping machine by retracting the ejection and by clamping and stamping cylinders. In this state the machine waits until a part is received from a part feeder. STEP 2: Checks to see if a part is present. If so, the clamping cylinder is extended to clamp the part. STEP 3: If a part is present and clamped, then the stamping cylinder is extended to stamp the part. STEP 4: If the stamping cylinder is at its extended state, it is assumed that a part has just been stamped. The stamping cylinder is retracted, and the part is unclamped.
2010, Festo Didactic
Page 20
No
Yes
Action
No
No
Yes
Next sentence of STEP X
Yes
Return to TOP of STEP X
Go to NEXT STEP
Page 21
= = = =
Actuator Sensor Interface Process Field Bus Distributed Periphery Binary in- and outputs TCP/IP protocol Industrial Ethernet
The standard communication within our systems is the I/O communication. Please refer to the next pages to get some more information.
Page 22
2. Example shows the 1-bit bidirectional I/O communication between a 24 VDC, PNP and a 12 VDC, PNP controller:
Page 23
Page 24
Page 25
Page 26
Date: ___________________
Lesson 5 Review
1. A PLC is:
2.
3.
4.
5.
6.
Page 27
Date: ___________________
A normally open switch is to be connected to a PLC as an input device. Complete the wiring diagram for the following PLCs:
Generic PLC FEC32 PLC
1 2 3
GRD
8.
Page 28
Date: ___________________
A pilot light is to be connected to a PLC as an output device. Complete the wiring diagram for the FEC34 PLC, if the light is connected to: Transistor-based output Relay-based output
CC+ A0.7
Transistor-based Outputs Transistor-based Outputs
CC+ A0.7
Relay-based Outputs
Relay-based Outputs
10.
Page 29
Date: ___________________
Complete the ladder diagram below to implement the following control logic: RUNG 1: ELSE RUNG 2: IF S1 is pressed OR S2 AND S3 are pressed THEN activate CR1 IF both S2 AND S3 are pressed THEN activate CR2 AND CR3
Where S1, S2 and S3 are normally open switches, CR1, CR2 and CR3 are relay coils. Neutral Power Rail Rail
RUNG 1
RUNG 2
Page 30
Appendix
Glossary
Algorithm: A list of well-defined instructions for completing a task. Starting from an initial state, the instructions describe a computation that proceeds through a welldefined series of successive states, eventually terminating in a final ending state. Allen-Bradley controller: This is one example of a PLC (Programmable Logic Controller). The three most common Allen-Bradley Controllers are: MicroLogix (ML1200, ML1500), Control Logix, and SLC (SLC500). Other manufacturers of PLCs are Festo, Siemens, Mitsubishi, Omron, and more. Backplane: A circuit board that connects several connectors in parallel to each other, so that each pin of each connector is linked to the same relative pin of all the other connectors, forming a bus. It is used as a backbone to connect several printed circuit boards together to make up a complete system. Banana connector: A banana connector (commonly banana plug for the male, banana jack for the female) is a single-wire (one conductor) electrical connector used for joining wires to equipment. The plugs are frequently used to terminate patch cords for electronic test equipment. Central processing unit (CPU): An electronic circuit that can execute computer programs which are actually sets of instructions. The CPU is essentially the brains of a system. Coil element: An electromagnetic coil (or simply a "coil") is formed when a conductor (usually a solid copper wire referred to as the coil element) is wound around a core or form to create an inductor or electromagnet. One loop of wire is usually referred to as a turn, and a coil consists of one or more turns. For use in an electronic circuit, electrical connection terminals called taps are often connected to a coil. Coils are often coated with varnish and/or wrapped with insulating tape to provide additional insulation and secure them in place. A completed coil assembly with taps, etc., is often called a winding. Control console: The control unit of a mechanical, electrical, or electronic system. Control logic: This is the part of a software architecture that controls what the program will do. This part of the program is also called the controller. Before the
2010, Festo Didactic
Page 31
instruction reaches the control logic, it is translated into binary through an instruction decoder or "decode unit." Digital I/O: The jack where an input/output device is physically connected to a PLC. The input relays transfer signals to the internal relays. The output relays signals to external output devices. Ethernet: A family of frame-based computer networking technologies for local area networks (LANs). It is standardized as IEEE 802.3. The combination of the twisted pair versions of Ethernet for connecting end systems to the network, along with the fiber optic versions for site backbones, is the most widespread wired LAN technology. Festo controller: Festo Programmable Logic Controller. Field bus: A family of industrial computer network protocols used for real-time distributed control, now standardized as IEC 61158. A complex automated industrial system such as a manufacturing assembly line usually needs an organized hierarchy of controller systems to function. In this hierarchy there is usually a Human Machine Interface (HMI) at the top, where an operator can monitor or operate the system. This is typically linked to a middle layer of programmable logic controllers (PLC) via a non time critical communications system (e.g. Ethernet). At the bottom of the control chain is the fieldbus which links the PLCs to the components which actually do the work, such as sensors, actuators, electric motors, console lights, switches, valves, and contactors. Fixed I/O PLC: A PLC (Programmable Logic Controller) that has the processor and a fixed amount of Inputs and Outputs all combined in one unit. An example would be a Festo FEC or an Allen-Bradley ML1500. FST programming software: Festo PLC Software. Function block diagram: A diagram that describes a function between input variables and output variables. A function is described as a set of elementary blocks. Input and output variables are connected to blocks by connection lines. An output of a block may also be connected to an input of another block. Function block diagram is one of five languages for logic or control configuration supported by standard IEC 61131-3 for a control system such as a Programmable Logic Controller (PLC). GXIEC programming software: Mitsubishi PLC Programming Software. IEC 61131-3: The third part of the open international standard IEC 1131. Part 3 of IEC 1131 deals with programming languages and defines two graphical and two textual PLC programming language standards: Ladder diagram (LD), graphical
2010, Festo Didactic
Page 32
Function block diagram (FBD), graphical Structured text (ST), textual Instruction list (IL), textual Sequential function chart (SFC) has elements to organize programs for sequential and parallel control processing.
Input module: The part of the PLC that allows input signals to be connected to the PLCs processor. Ladder diagram: A graphical diagram based on the circuit diagrams of a relay-based logic. Ladder logic: A programming language that represents a program by a graphical diagram based on the circuit diagrams of relay-based logic hardware. It is primarily used to develop software for Programmable Logic Controllers (PLCs) used in industrial control applications. The name is based on the observation that programs in this language resemble ladders, with two vertical rails and a series of horizontal rungs between them. Logic diagram: A graphical representation of a program using formal logic. Mitsubishi/MELSEC controller: Mitsubishi manufactured processor driven device that uses logic-based software to provide electrical control to machines. Modular PLC: A PLC configuration in which each component is split into a separate NOP: No Operation (computer processor instruction) NPN controller. NPN controller: With NPN logic, switching is from via the load to +. The reason for this is partly historical but also safety related. With NPN logic, there is a large number of terminals connected directly to the + conductor. If there is a short circuit from one of these terminals to a housing or , no output will then work. If the same thing happens with PNP logic, the output transistor concerned will be destroyed; but all the other inputs and outputs will continue to work. Operand: An operand is a quantity on which an operation is performed. Operating: To act effectively; produce an effect; exert force or influence. Output module: A device that performs a mechanical action after receiving the electrical signal to do so from the PLC output modules. Pascal: An imperative and procedural programming language designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to
2010, Festo Didactic
Page 33
encourage good programming practices using structured programming and data structuring. PLC board: Festo PLC board with DIN rail, terminal block sheet metal for mounting the PLC and cables. PLC program: Any component of a PLC software ladder program. Programming components do not physically exist but are representations used by the PLC software. PLC relay: Hard-wired physical devices that transfer electrical signals from input devices to output devices. PLCs use software to digitally simulate these connections. PNP controller: DC input modules allow us to connect either PNP (sourcing) or NPN (sinking) transistor type devices to them. In a regular switch (i.e., toggle or pushbutton, etc.) it typically does not matter whether it is wired as NPN or PNP. We should note that most PLCs are using a sensor is used (photo-eye, prox, etc.), the output configuration is important. The difference between the two types is whether the load (the plc) is switched to ground or positive voltage. An NPN type sensor has the load switched to ground whereas a PNP device has the load switched to positive voltage. Profibus-DP: This is the Siemens Brand name for their industrial network. Profibus (Process Field Bus) is a standard for field bus communication in automation technology and was first promoted in1989 by BMBF (German department of education and research). Profile plate: The anodized aluminum profile plate is used for mounting all components of the MPS stations. Both sides are slotted so, if necessary, parts can be mounted on both sides. The slots are compatible with the ITEM profile system. The board is supplied with caps for the sides. The profile plate 350/700 has a hole with a diameter of approximately 5 cm for the I/O cable that connects the PLC board to the station. Programmable logic controller (PLC): A processor driven device that uses logicbased software to provide electrical control to machines. RS232 cable: PC Serial Port Communications standard for serial binary data signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuitterminating Equipment). Relay coil: A relay is an electrically operated switch. Electric current through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and they are double-throw (changeover) switches.
Page 34
Reset sequence: This is the process that is followed to reset the memory on a PLC. RS Logix programming software: Allen Bradley Proprietary PLC programming software. RS422 programming cable: Allen Bradley PC Communications cable. Scan: One complete cycle of a PLC checking inputs, executing its programs, and updating the status of its outputs. Scan cycle: The time it takes to determine the status of input devices (update input image table), interpret the logic (solve ladder logic), and update output devices. Scan time: The time it takes for a controller to scan all the logic before updating its input (and output) image table. Sequential function chart: Sequential function chart (SFC) is a graphical programming language used for PLCs. It is one of the five languages defined by IEC 1131-3 standard. Main components of SFC are steps with associated actions, transitions with associated logic conditions, and directed links between steps and transitions. Siemens controller: A Siemens manufactured processor driven device that uses logicbased software to provide electrical control to machines. Sinking I/O circuits: A sinking digital I/O circuit provides a ground. Sourcing I/O circuits: A sourcing digital I/O circuit provides a voltage source. Statement List Language (STL): STL corresponds to the Instruction List language defined in the IEC 61131-3 specification. It is utilized in Siemens PLCs. STEP 7 programming software: Siemens PLC programming software. Step instruction: A step instruction is a method of executing a computer program one step at a time to determine how it is functioning. This might be to determine if the correct program flow is being followed in the program during the execution or to see if variables are set to their correct values after a single step has completed. Structured text (ST): Structured text is one of the 5 languages supported by the IEC 61131-3 standard. It is designed for programmable logic controllers (PLCs). It is a high level language that is block structured and syntactically resembles Pascal.
Page 35
SysLink connector: Festos brand name for IEEE-488 Connectors. IEEE-488 is a short-range, digital communications bus specification that has been in use for over 30 years. Originally created for use with automated test equipment, the standard is still in wide use for that purpose. Terminal block: The terminal block connects the PLC cable to individual functions on the station.
Page 36
INDEX
Index
C Commissioning ..................................................3 F Fixed I/O ...........................................................13 Fixed I/O ...........................................................13 Function block diagram ...................................9 I IEC 1131-3 ..........................................................9 L Ladder diagram .......................... 9, 11, 12, 18, 25 N NOP instruction ...............................................20 P Power supply ................................................... 25 Program execution ......................................... 14 Programmable Logic Controller ...... 1114, 25 S Safety ................................................................... 2 Scan cycle ......................................................... 14 Sentence ........................................................... 18 Sequence control systems ................ 1517, 25 Sinking I/O....................................................... 15 Sourcing I/O .................................................... 15 Statement list .................................................. 10 Statement List Language ............................. 17 Step execution rules ............................................. 21 STEP instruction.............................................. 18 STL.................................................................. 19, 25 Structured text ................................................ 10
Page 37