Date post: | 31-Oct-2015 |
Category: |
Documents |
Upload: | maurealn11 |
View: | 1,691 times |
Download: | 100 times |
of 113
ISaGRAF
Learning system for automation and communications
Programmable Logic Controller
Fundamentals and Applications of
Programmable Logic Controllers
Exercises
Solutions
Exercise 1
The YES Function
Problem Description
Actuation of a push button (S1) is to cause a lamp (H1) to be switched on. The lamp is to be illuminated as long as the push button is actuated.
Draw the circuit diagram and assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electrical Circuit Diagram
Solution 1
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLPush Button S1
Output0_0[Output]BOOLLamp H1
Ladder Programming
IL Programming
ST Programming
FBD Programming
Exercise 2
The NOT Function
Problem Description
A thin wire has been stretched behind a display window, which breaks if a burglary is attempted. A close circuit is interrupted as a result of this and a buzzer is sounded. A normally closed switch is used to simulate the unbroken wire.
Draw the circuit diagram and assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electrical Circuit Diagram
Solution 2
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLSensor S1
Output0_0[Output]BOOLSiren H1
Ladder Programming
IL Programming
ST Programming
FBD Programming
OR
Exercise 3
The AND Function
Problem Description
A press stamp 1.0 is to advance only if a push button is actuated and a protective guard is closed. If one of these conditions is not met, the press tool is to return immediately.
The position of the closed protective guard B1 is monitored by a proximity switch B1. The press tool is advanced or retracted by means of a spring return solenoid valve (Coil Y1).
Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg
You can use any one or all of the five languages available.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 3
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLStart Switch S1
Input0_1[Input]BOOLSafety Sensor B1
Output0_0[Output]BOOLCylinder Extends Y1
Ladder Programming
IL Programming
ST Programming
FBD Programming
Exercise 4
The OR Function
Problem Description
An apartment bell is to ring if bell button S1 at the front door is pressed or bell button S2 at the apartment door.
Draw the circuit diagram and assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electrical Circuit Diagram
Solution 4
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLPush Button S1
Input0_1[Input]BOOLPush Button S2
Output0_0[Output]BOOLBell H1
Ladder Programming
IL Programming
ST Programming
FBD Programming for Festo PLC
Exercise 5
Combination of AND/OR/NOT Functions
Problem Description
A stamping device can be operated from three sides. A workpiece is inserted via a guide, whereby it touches two of the three proximity switches B1, B2 and B3. This causes a pneumatic cylinder 1.0 to extend via a solenoid valve (Coil Y1), whereby a recess is to be stamped into the workpiece.
The stamping cycle is to be triggered only if two signal generators are Typeesses. For reasons of safety the cylinder must be prevented from advancing, if all three proximity sensors are contacted.
Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 5
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLProximity Sensor B1
Input0_1[Input]BOOLProximity Sensor B2
Input0_2[Input]BOOLProximity Sensor B3
Flag1[Internal]BOOLInternal Relay 1
Flag2[Internal]BOOLInternal Relay 2
Flag3[Internal]BOOLInternal Relay 3
Output0_0[Output]BOOLCylinder Extends Y1
Ladder Programming
Instruction List Programming
Structured Text Programming
OR
FBD Programming
Exercise 6
Logic Control System with Branching.
Problem Description
The control of a bulk material mixing system consists of a push button (S1) and a selector switch (S2).
Once the appropriate silo has been selected using the selector switch (S2), pressing the push button (S1) opens the silo. Use single-solenoid 5/2-way directional control valves to control both cylinders. The cylinders are extended in the initial position.
Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 6
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLStart Button S1
Input0_1[Input]BOOLSelector Switch S2
Output0_0[Output]BOOLCylinder A Retracts Y1
Output0_1[Output]BOOLCylinder B Retracts Y2
Ladder Programming
IL Programming
ST Programming
FBD Programming
Exercise 7
Setting and Resetting of an Output
Technical Knowledge
Storage operations form part of the elementary PLC operations and apply in cases where a briefly occurring signal status is permanently stored. Typical examples of storage operations are the permanent setting or resetting of output signals. The standard function blocks SR and RS are available for the realisation of storage functions.
Function block SR, dominant setting flip-flop
Function block SR contains a dominant setting flip-flop.
The typical behaviour of the SR function block is therefore as follows:
A 1-signal at set input S1 sets the flip-flop, i.e. the value of Q1 becomes 1.
A 1 signal at reset input R sets the value of Q1 at 0 only if a 0-signal simultaneously applies at the S1 input. If a 1-signal applies both at the S1 and the R input output Q1 is set.Function block RS, dominant resetting flip-flop
Function block RS contains a dominant resetting flip-flop.
The behaviour of the block represented is as follows:
A 1-signal at reset input R1 sets the value of Q1 to 0, irrespective of which value applies at input S.
A 1-signal at set input S sets output Q1 to 1 only if a 0-signal simultaneously applies at the R1 input.
If 1-signals apply both at inputs S and R1, output Q1 is reset.
Problem Description
The drill on a drilling unit is monitored by means of a drill breakage sensor (B1).
If the drill is broken, the sensor interrupts the circuit. A buzzer (H1) is to sound in this event. The buzzer can only be switched off via push button S1. Draw the electrical circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electrical Circuit Diagram
Solution 7
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLPush Button S1
Input0_1[Input]BOOLSensor B1
Output0_1[Output]BOOLBuzzer H1
NameFunction or Function BlockComment
RS_1RSRS Function Block 1
Ladder Diagram
IL Programming
OR
ST Programming
Remember to declare RS_1 in the Variables under Function Block.
FBD Programming
Using FBD in Ladder Diagrams
Exercise 8
Transfer of a Part
Problem Description
Using a double-acting cylinder, a part is to be moved from one roller track to another. The operation is to be started using a push button. An acknowledgement signal is required when the piston is fully extended to ensure that the part has been transferred. The return stroke is to be automatic. Use a double solenoid valve.
Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 8
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLStart Button S1
Input0_1[Input]BOOLCylinder A Back B1
Input0_2[Input]BOOLCylinder A Forward B2
Output0_0[Output]BOOLCylinder A Extends Y1
Output0_1[Output]BOOLCylinder A Retracts Y2
Ladder Diagram
IL Programming
OR
ST Programming
FBD Programming
OR
Exercise 9
Activating a Cylinder
Signal Edges
Technical Knowledge
PLC applications frequently require the detection and evaluation not of signal itself, but of the point of change of a signal. These signal changes are described as edges.
Rising (positive) edges mark the instant, during which a signal change takes place from 0 to 1.
Falling (negative) edges mark the instant, during which a signal change takes place from 1 to 0.
Function block R_TRIG for rising edge detection
This standard function block is used for the detection of a rising edge.
If a signal change takes place from 0 to 1 at input CLK, output Q assumes the value 1 during a program cycle.
Function block F_TRIG for falling edge detection
This standard function block is used for the detection of a falling edge.
If a signal change takes place from 1 to 0 at input CLK, output Q carries a 1-signal during a program cycle.Problem Description
A cylinder is actuated by means of a spring-returned solenoid valve (coil Y1). Two proximity switches signal the positions "extended" (B2) and "retracted" (B1). Push button (S1) is used to actuate the cylinder in such a way that it advances from the retracted end position into the opposite direction. The cylinder must advance only once per push button actuation. To trigger a second movement of the cylinder, the push button must be released and actuated afresh. Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 9
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLStart Button S1
Input0_1[Input]BOOLCylinder A Back B1
Input0_2[Input]BOOLCylinder A Forward B2
Flag1[Internal]BOOLInternal Relay 1
Output0_0[Output]BOOLCylinder Solenoid Y1
NameFunction or Function BlockComment
R_TRIG_1R_TRIGRising Edge 1
RS_1RSReset-Set 1
Ladder Diagram
IL Programming for Festo PLC
ST Programming
FBD Programming
Exercise 10
Bonding of Components
Pulse Timer
Technical Knowledge
A large number of control tasks require the programming of time. Through IEC61131-3, standard function blocks are available for timers with different time response.
Timers are available for the realisation of a pulse time response, a switch-on signal delay and a switch-off signal delay.
Function block TP, pulse timer
Standard function block TP is a pulse timer
The response of function block TP is as follows:
Function block TP is started via a short or long signal at input IN.
Once the timer has started, a 1-signal applies at output Q for the time specified at input PT.
The current timer value (the time, which has elapsed since the start) is available at output ET.
The timer can only be started again once it has expired.
Problem Description
Two components are to be bonded together with the help of a pneumatic cylinder 1.0. To do this, the bonding surfaces are pressed together with a defined force for 5 seconds. The time is commenced once the cylinder advances from its retracted end position (sensor B1).
The cylinder is controlled by single solenoid directional control valves (Y1). Once the 5 seconds have expired, the cylinder is to return to the initial position. The bonding process is started by a push button S1.
Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 10
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLStart Button S1
Input0_1[Input]BOOLCylinder A Back B1
Output0_0[Output]BOOLCylinder Solenoid Y1
NameFunction or Function BlockComment
TP_1TPTimer Preset 1
Ladder Diagram
IL Programming
ST Programming
FBD Programming for Festo PLC
Exercise 11
Embossing Device
Switch-on Signal Delay
Technical Knowledge
Function block TON, Switch-on signal delay
The standard function block TON is used to generate a switch-on signal delay.
The behaviour of function block TON is as follows:
Function block TON is started by means of a 1-signal at input IN.
Upon expiry of the time specified at input PT, output Q carries a 1-signal. The 1-signal at output Q applies until the input signal IN reverts to the value 0.
If the duration of the input signal IN is shorter than the specified time PT, the value of output Q remains a constant 0.
The current timer value (the time, which has elapsed since the start) is available at output ET.
Problem Description
A workpiece is to be embossed by activating a start button (S1). In order to ensure that the embossing cycle is not triggered inadvertently, the embossing cycle is to be triggered only after 3 seconds have expired. During this time the start button must be permanently actuated. The position of the cylinder 1.0 is established by means of the proximity switches B1 (retracted) and B2 (extended). The cylinder is controlled by single solenoid directional control valves (Y1). Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 11
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLStart Button S1
Input0_1[Input]BOOLCylinder A Back B1
Input0_2[Input]BOOLCylinder A Forward B2
Output0_0[Output]BOOLCylinder Solenoid Y1
NameFunction or Function BlockComment
TON_1TONTimer Delay On 1
RS_1RSReset-Set 1
Ladder Diagram
IL Programming
ST Programming
FBD Programming for Festo PLC
Exercise 12
Clamping Device
Switch-off Signal Delay
Technical Knowledge
Function block TOF, switch-off signal delay
The standard function block TOF is used to generate a switch-off signal delay.
The behaviour response of function block TOF is as follows:
Function block TOF is started via a 1-signal at input IN. Output Q simultaneously receives the value 1.
After the input signal IN has reverted to the value 0, the 1 signal continues to be applied at output Q for the time specified at the PT input and then returns to the value 0.
Problem Description
A workpiece is to be clamped by activating the start button S1. When the workpiece is clamped by cylinder 1.0, cylinder 2.0 extends and embosses the workpiece. Since the workpiece requires time to cool down, it remains clamped for a period of 3 seconds. This time is started with the advancing of cylinder 1.0.
Use single solenoid DCV for cylinder 1.0 and double solenoid DCV for cylinder 2.0.
Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use any one or all of the five languages available.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 12
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLStart Button S1
Input0_1[Input]BOOLCylinder A Back B1
Input0_2[Input]BOOLCylinder A Forward B2
Input0_3[Input]BOOLCylinder B Back B3
Input0_4[Input]BOOLCylinder B Forward B4
Output0_0[Output]BOOLCylinder Solenoid Y1
Output0_1[Output]BOOLCylinder B Extends Y2
Output0_2[Output]BOOLCylinder B Retracts Y3
NameFunction or Function BlockComment
TOF_1TOFTimer Delay Off 1
R_TRIG_1R_TRIGRising Edge 1
RS_1RSReset-Set 1
RS_2RSReset-Set 2
Ladder Diagram
IL Programming
ST Programming
FBD Programming
Exercise 13
Bending Device with Counter
Counters
Technical Background
Function block CTU, incremental counter
Function block CTU realises an incremental counter. Its interface is defined by means of three input and two output parameters.
The characteristic behaviour of an incremental counter is as follows:
A 1-signal at reset input R sets the current counter status CV at 0.
Thereafter, the value CV of the counter is increased by 1 with each rising edge at input CU.
A 1-signal applies at output Q as soon as the current value CV is equal or greater than the preselect value PV. Output Q carries a 0-signal as long as current counter status CV is less than the preselect value PV.
Function block CTD, Decremental counter
Function block CTD being a decremental counter is counterpart to function block CTU.
The behaviour of a decremental counter is as follows:
A 1-signal at the LD input sets the current counter status CV equal to the preselect value PV.
Each rising edge at the CD input decreases the current counter status CV by 1.
Output Q carries a 0-signal as long as the current counter status CV is greater than 0. Only if the current value is less or equal to 0, does a 1-signal apply at output Q.
Problem Description
A double-acting cylinder is used for a bending process and is to operate for 5 continuous cycle and then stop. The cycle is started by a push button. The cylinder is controlled via single solenoid valves. Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
Use the Ladder or FBD language.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 13
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLStart Button S1
Input0_1[Input]BOOLCylinder A Back B1
Input0_2[Input]BOOLCylinder A Forward B2
Flag1[Internal]BOOLInternal Relay 1
Flag2[Internal]BOOLInternal Relay 2
Output0_0[Output]BOOLCylinder Solenoid Y1
NameFunction or Function BlockComment
CTU_1CTUCounter Up 1
R_TRIG_1R_TRIGRising Edge 1
R_TRIG_2R_TRIGRising Edge 2
RS_1RSReset-Set 1
RS_2RSReset-Set 2
Ladder Diagram
IL Programming
ST Programming
Function Block Diagram
Exercise 14
Lifting Device for Packages
Linear Sequence
Technical Knowledge
Sequence control systems
Sequence control systems describe processes, which proceed in several clearly separated steps.
The transition from one step to the next is dependent on the process statuses. It is possible for the process to be branched into partial processes in relation to the process statuses established.
The program of a sequence control system must therefore fulfill three basic exercises:
Steps of a sequential function chart
Example of double divergence and convergence.
Note that if it is an OR logic, the line would be a single line.
Problem Description
A roller conveyor is monitored by proximity switch B1 as to whether a package is present. If a package is present, the package is picked up by a Cylinder 1.0 (Lifting cylinder) and then transferred to another conveyor by means of Cylinder 2.0 (Transfer cylinder).
Cylinder 1.0 is to retract first, followed by Cylinder 2.0. The cylinders are retracted and advanced by means of solenoid valves (Coil Y1 and Y2). The cylinder positions are monitored by means of proximity switches B2 to B5.
On the feed side, packages have been arranged in such a way that they reach the lifting devices individually.
Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You can use all the programming languages but should try the Sequential Function Chart.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 14
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Variables
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLProximity Sensor B1
Input0_1[Input]BOOLCylinder A Back B2
Input0_2[Input]BOOLCylinder A Forward B3
Input0_3[Input]BOOLCylinder B Back B4
Input0_4[Input]BOOLCylinder B Forward B5
Output0_0[Output]BOOLCylinder A Solenoid Y1
Output0_1[Output]BOOLCylinder B Solenoid Y2
Flag1[Internal]BOOLInternal Relay 1
Flag2[Internal]BOOLInternal Relay 2
Flag3[Internal]BOOLInternal Relay 3
Flag4[Internal]BOOLInternal Relay 4
Flag5[Internal]BOOLInternal Relay 5
NameFunction or Function BlockComment
SR_1SRSet-Reset 1
SR_2SRSet-Reset 2
SR_3SRSet-Reset 3
SR_4SRSet-Reset 4
SR_5SRSet-Reset 5
SR_6SRSet-Reset 6
SR_7SRSet-Reset 7
Ladder Diagram
Ladder with Function Blocks
Structured Text
Function Block Diagram
Instruction List
Sequential Function Chart for Festo PLC
Sequential Function Chart
Exercise 15
Distributing Device for Boxes
Problem Description
Metal strips are placed manually in a fixture. Cylinder 1.0 clamps the metal strip when a push button is pressed. Cylinder 2.0 starts the bend and retracts. Cylinder 3.0 completes the bending operation. After Cylinder 3.0 has returned to its initial position, Cylinder 1.0 releases the part.
Sequence abbreviation: A+ B+ B- C+ C- A-
Reed switches sense cylinder positions.
Draw the electrical circuit diagram and Electro-pneumatic circuit diagram.
Assemble the equipment.
Formulate the PLC program using MultiProg.
You should use either the Ladder Diagram or the Sequential Function Chart.
Electro-Pneumatic Circuit Diagram
Electrical Circuit Diagram
Solution 15
For Festo PLC
NameAttribTypeComment
Input0_0[Input]BOOLProximity Sensor B1
Input0_1[Input]BOOLCylinder A Back B2
Input0_2[Input]BOOLCylinder A Forward B3
Input0_3[Input]BOOLCylinder B Back B4
Input0_4[Input]BOOLCylinder B Forward B5
Input0_5[Input]BOOLCylinder C Back B6
Input0_6[Input]BOOLCylinder C Forward B7
Output0_0[Output]BOOLCylinder A Solenoid Y1
Output0_1[Output]BOOLCylinder B Solenoid Y2
Output0_2[Output]BOOLCylinder C Solenoid Y3
Flag1[Internal]BOOLInternal Relay 1
Flag2[Internal]BOOLInternal Relay 2
Flag3[Internal]BOOLInternal Relay 3
Flag4[Internal]BOOLInternal Relay 4
Flag5[Internal]BOOLInternal Relay 5
Flag6[Internal]BOOLInternal Relay 6
Flag7[Internal]BOOLInternal Relay 7
Ladder Diagram
Sequential Function Chart
IN
Input0_1
Input0_0
TP
Q1
RESET1
SET
RS
RS_1
Q
CLK
R_TRIG
AND
R_TRIG_1
AND
Input0_2
Input0_0
Input0_1
Output0_0
R_TRIG_1(CLK:=Input0_0);
RS_1(SET:=R_TRIG1_1.Q AND Input0_1,RESET1:=R_TRIG_1.Q AND Input0_2);
Output0_0:= RS_1.Q1;
LD Input0_0
ST R_TRIG_1.CLK
CAL R_TRIG_1
LD R_TRIG_1.Q
AND Input0_1
S Output0_0
LD R_TRIG_1.Q
AND Input0_2
R Output0_0
R
Output0_0
Input0_2
CLK
Output0_0
Input0_1
Q
S
Input0_0
Input0_2
Output0_1
Input0_1
Output0_0
Input0_0
AND
Output0_0:= Input0_0 AND Input0_1;
Output0_1:= Input0_2;
LD Input0_0
AND Input0_1
S Output0_0
R Output0_1
LD Input0_2
S Output0_1
R Output0_0
LD Input0_0
AND Input0_1
ST Output0_0
LD Input0_2
ST Output0_1
R
R
Output0_0
Output0_1
Output0_1
Output0_0
Input0_2
Input0_1
S
S
Input0_0
Output0_0
Q1
RESET1
SET
Input0_0
Input0_1
RS
Q1
RESET1
SET
Input0_0
Input0_1
RS
Output0_0
RS_1(SET:=Not Input0_1, RESET1:= Input0_0);
Output0_0:= RS_1.Q1;
LDN Input0_1
S Output0_0
LD Input0_0
R Output0_0
R
Output0_0
Input0_0
S
Input0_1
Output0_0
Output0_0
Input0_1
Input0_0
AND
Input0_1
Input0_0
AND
Output0_1
Output0_0:= Input0_0 AND NOT Input0_1;
Output0_1:= Input0_0 AND Input0_1;
LD Input0_0
ANDN Input0_1
ST Output0_0
LD Input0_0
AND Input0_1
ST Output0_1
Output0_1
Output0_0
Input0_1
Input0_1
Input0_0
Input0_0
AND
AND
AND
OR
Input0_1
Input0_0
Input0_2
Input0_1
Input0_0
Output0_0
Input0_2
Input0_1
Input0_0
LDN Input0_1
ST RS_1.SET
LD Input0_0
ST RS_1.RESET1
CAL RS_1
LD RS_1.Q1
ST Output0_0
Flag1:= Input0_0 AND Input0_1 AND NOT Input0_2;
Flag2:=Input0_0 AND Input0_2 AND NOT Input0_1;
Flag3:=Input0_1 AND Input0_2 AND NOT Input0_0;
Output0_0:=Flag1 OR Flag2 OR Flag3;
LD Input0_0
AND Input0_1
ANDN Input0_2
ST Flag1
LD Input0_0
AND Input0_2
ANDN Input0_1
ST Flag2
LD Input0_1
AND Input0_2
ANDN Input0_0
ST Flag3
LD Flag1
OR Flag2
OR Flag3
ST Output0_0
Output0_0
Input0_2
Input0_2
Input0_1
Input0_1
Input0_2
Input0_1
Input0_0
Input0_0
Input0_0
Input0_1
OR
Input0_0
Output0_0
Output0_0:= Input0_0 OR Input0_1;
LD Input0_0
OR Input0_1
ST Output0_0
Input0_1
Output0_0
Input0_0
LD Input0_1
OR Input0_2
ST Outuput0
Input0_1
AND
Input0_0
Output0_0
Output0_0:= Input0_0 AND Input0_1;
LD Input0_0
AND Input0_1
ST Output0_0
Output0_0
Input0_1
Input0_0
Flag5
Flag3
SR_5
Output0_0:= NOT Input0_0;
LDN Input0_0
ST Output0_0
Output0_0
Input0_0
H1
S1
EMBED Word.Picture.8
0V
0V
24V
0.3
0.2
0.1
0.0
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
0V
24V
PLC
O
I
SET1
Output0_0:=Input0_0;
LD Input0_0
ST Output0_0
Output0_0
Input0_0
H1
S1
Output0_0
Output0_0
0.6
0.5
TON_1(IN:=Input0_0 AND Input0_1,PT:= T#3s);
RS_1(SET:=TON_1.Q,RESET1:= Input0_2);
Output0_0:= RS_1.Q1;
LD Input0_0
AND Input0_1
ST TON_1.IN
LD T#3s
ST TON_1.PT
CAL TON_1
LD TON_1.Q
S Output0_0
LD Input0_2
R Output0_0
R
Output0_0
Input0_2
S
T#3s
ET
Output0_0
Q
PT
IN
Input0_1
Input0_0
TON
ET
T#5s
Q
PT
IN
TP
AND
Input0_1
Input0_0
Output0_0
TP_1(IN:=Input0_0 AND Input0_1,PT:= T#5s);
Output0_0:= TP_1.Q;
LD Input0_0
AND Input0_1
ST TP_1.IN
LD T#5s
ST TP_1.PT
CAL TP_1
LD TP_1.Q
ST Output0_0
T#5s
ET
Output0_0
Q
PT
EMBED Word.Picture.8
0.4
0.3
0.2
0.1
0.0
0V
24V
PLC
0V
0.7
O
0.0
I
0.1
0V
24V
0.3
0.2
Input0_1
AND
TON
IN
PT
Q
T#3s
ET
RS
SET
RESET1
Q1
Input0_2
TOF
Input0_0
Input0_1
IN
PT
Q
Output0_0
ET
T#3s
Input0_2
Output0_1
S
Input0_3
R_TRIG_1
Input0_3
Input0_4
Output0_1
R
Output0_2
S
Input0_3
Output0_2
R
LD Input0_0
AND Input0_1
AND Input0_3
ST TOF_1.IN
LD T#3s
ST TOF_1.PT
CAL TOF_1
LD TOF_1.Q
ST Output0_0
LD Input0_2
ST R_Trig_1.CLK
CAL R_Trig_1
LD R_Trig_1.Q
AND Input0_3
S Output0_1
LD Input0_4
R Output0_1
S Output0_2
LD Input0_3
R Output0_2
TOF_1 (IN:=Input0_0 AND Input0_1 AND Input0_3,PT:= T#3s);
Output0_0:= TOF_1.Q;
R_Trig_1 (Input0_2);
RS_1 (SET:=R_Trig_1.Q AND Input0_3,RESET1:= Input0_4);
Output0_1:= RS_1.Q1;
RS_2 (SET:=Input0_4,RESET1:= Input0_3);
Output0_2:= RS_2.Q1;
CTU_1
Input0_0
Input0_1
AND
TOF
IN
PT
Q
T#3s
ET
Input0_3
Output0_1
Input0_2
Input0_3
AND
R_TRIG
CLK
Q
RS
SET
RESET1
Q1
Input0_4
Output0_2
Input0_0
Input0_1
RS
SET
RESET1
Q1
Input0_2
Output0_0
CTU
Input0_2
CU
PV
Q
Flag2
CV
Flag2
Input0_1
Flag1
Output0_0
Input0_0
Flag1
Flag2
Flag1
5
RESET
S
S
R
R
Output0_0
R_TRIG_1
Flag2
Input0_1
Input0_1
Flag1
AND
R_TRIG
CLK
Q
RS
SET
RESET1
Q1
Input0_2
Flag2
Input0_2
Flag2
CTU
CU
PV
Q
RS
SET
RESET1
Q1
Q
CLK
R_TRIG
5
RESET
CV
Input0_0
Flag5
Flag1
Flag1
Input0_2
Flag1
Flag2
Flag2
Input0_4
Flag2
Flag3
Flag3
Input0_1
Output0_0
R
S007
Input0_5
Flag2
Flag1
Input0_3
Input0_3
Output0_0
Input0_0
Input0_2
Input0_0
CTU_1
R_TRIG_2
Input0_0
RS_1
Output0_1
R
S005
Output0_2
R
S006
Input0_6
Output0_2
S
S005
Input0_3
Input0_1
Output0_0
R
S004
Input0_4
Output0_1
S
S003
Input0_2
Flag1
RS_2
TP_1
TP_1
RS-1
RS_1
TON_1
TON_1
RS_1
TOF_1
R_TRIG_1
TOF_1
RS_1
RS_2
LD Input0_0
S Flag1
LD Input0_1
AND Flag1
S Output0_0
LD Input0_2
ST R_TRIG_1.CLK
CAL R_TRIG_1
LD R_TRIG_1.Q
R Output0_0
LD Input0_2
ST R_TRIG_2.CLK
CAL R_TRIG_2
LD R_TRIG_2.Q
ST CTU_1.CU
LD Flag2
ST CTU_1.Reset
LD 5
ST CTU_1.PV
CAL CTU_1
LD CTU_1.Q
ST Flag2
LD Flag2
R Flag1
RS_1 (SET:=Input0_0,RESET1:= Flag2);
RS_2 (SET:=Input0_1 AND Flag1,RESET1:=R_TRIG_1.Q);
R_TRIG_1(CLK:=Input0_2);
CTU_1 (CU:=R_TRIG_2.Q,RESET:= Flag2,PV:= 5);
R_TRIG_2(CLK:=Input0_2);
Flag1:= RS_1.Q1;
Output0_0:= RS_2.Q1;
Flag2:= CTU_1.Q;
Output0_1
Flag4
Flag2
Output0_0
Flag3
Flag1
Flag5
Flag4
Input0_1
Flag4
Flag4
Flag3
Input0_3
Output0_1
R
S004
Input0_4
Output0_1
Output0_1
2
R
1
Action Step
3
Initial Step
2
Action Step
1
Output0_0
S
S002
Output0_0
R
Input0_0
S001
S
S003
Input0_2
Output0_2
R
Output0_1
R
Output0_0
S
S002
Flag2
Flag2
Output0_0
R
Input0_0
S001
Flag1
Input0_2
Flag1
Flag1
Flag7
Input0_0
Transition Step
2
4
Action Step
Transition Step
3
Transition Step
4
2
101
End of Process 2
Process2
1
true
Wait for Process 2
End of Process 1
Process1
Run
3
2
1
101
3
2
1
Transition Step
Initialize
Wait for Process 2
102
Input0_4
Flag2
Flag3
Flag3
Input0_3
Flag3
Flag4
Flag4
Input0_6
Flag4
Flag5
Flag5
Input0_5
Flag5
Flag6
Flag6
Input0_1
Flag6
Flag7
Flag1
Flag6
Output0_0
Flag2
Flag3
Output0_1
Flag4
Flag5
Output0_2
RESET
Flag1
Input0_1
Flag4
Q1
SR
AND
Flag4
Flag2
SR_4
SET1
RESET
Flag5
Input0_4
Flag3
Q1
SR
AND
Flag1
Flag3
SR_3
SET1
RESET
Flag4
Input0_2
Flag2
SR_1 (SET1:=Input0_1 AND Input0_3, RESET:=Flag2);
Flag1:=SR_1.Q1;
SR_2 (SET1:=Input0_0 AND Flag1, RESET:=Flag3);
Flag2:=SR_2.Q1;
SR_3 (SET1:=Input0_2 AND Flag2 AND NOT Flag1, RESET:=Flag4);
Flag3:=SR_3.Q1;
SR_4 (SET1:=Input0_4 AND Flag3 AND NOT Flag2, RESET:=Flag5);
Flag4:=SR_4.Q1;
SR_5 (SET1:=Input0_1 AND Flag4 AND NOT Flag3, RESET:=Flag1);
Flag5:=SR_5.Q1;
SR_6 (SET1:=Flag2, RESET:=Flag4);
Output0_0:=SR_6.Q1;
SR_7 (SET1:=Flag3, RESET:=Flag5);
Output0_1:=SR_7.Q1;
Q1
SR
AND
Flag2
SR_7
Q1
RESET
SET1
RS
Flag5
Output0_1
SR_2
Flag3
SR_6
Q1
RESET
Input0_1
SR_5
Q1
RESET
SET1
RS
Flag1
Flag5
Flag4
Flag3
Input0_4
SR_4
Q1
RESET
SET1
RS
Flag5
Flag4
Flag3
Flag2
Input0_2
SR_3
Q1
RESET
SR_1
Q1
RESET
SET1
RS
SET1
RS
Flag4
Output0_0
SET1
Flag2
SET1
RS
Flag4
Flag3
Flag2
Flag1
SR_2
Q1
RESET
SET1
RS
Flag3
Flag2
Input0_0
Flag1
RESET
Flag3
Input0_0
Input0_0
Output0_0
Input0_0
Flag1
Q1
SR
AND
Flag1
SR_1
SET1
Output0_0:= (Input0_0 AND Input0_1 AND NOT Input0_2)
OR (Input0_0 AND Input0_2 AND NOT Input0_1)
OR(Input0_1 AND Input0_2 AND NOT Input0_0);
RESET
NOT
Output0_0
EMBED Word.Picture.8
Flag2
Input0_3
Input0_1
Q1
SR
AND
Output0_1
SR_7
SET1
RESET
Flag5
Flag3
LD Input0_2
ANDN Flag1
AND Flag2
ST SR_3.SET1
LD Flag4
ST SR_3.RESET
CAL SR_3
LD SR_3.Q1
ST Flag3
LD Input0_4
ANDN Flag2
AND Flag3
ST SR_4.SET1
LD Flag5
ST SR_4.RESET
CAL SR_4
LD SR_4.Q1
ST Flag4
LD Input0_1
ANDN Flag3
AND Flag4
ST SR_5.SET1
LD Flag1
ST SR_5.RESET
CAL SR_5
LD SR_5.Q1
ST Flag5
LD Flag2
ST SR_6.SET1
LD Flag4
ST SR_6.RESET
CAL SR_6
ST Output0_0
LD Flag3
ST SR_7.SET1
LD Flag5
ST SR_7.RESET
CAL SR_7
ST Output0_1
Q1
SR
Output0_0
SR_6
SET1
RESET
Flag4
Flag2
LD Input0_1
AND Input0_3
ST SR_1.SET1
LD Flag2
ST SR_1.RESET
CAL SR_1
LD SR_1.Q1
ST Flag1
LD Input0_0
AND Flag1
ST SR_2.SET1
LD Flag3
ST SR_2.RESET
CAL SR_2
LD SR_2.Q1
ST Flag2
Q1
SR
RS_1
Q1
RESET1
SET
RS
Input0_2
Output0_1
Input0_2
Input0_1
Input0_0
AND
Output0_0
Q
CLK
R_TRIG
R_TRIG_2
Q
CLK
R_TRIG
R_TRIG_1
Q
CLK
R_TRIG
B1
B2
Y2
B2
B1
B2
B1
B1
B1 B2
B2
B1
B4
B3
B2
B1
R_TRIG
R_TRIG_1
E311 Fundamentals and Applications of Programmable Logic ControllersFesto Didactic
_1004157395.doc
_1012837055.doc