Industrial Automation course
Lesson 6
PLC – SFC
Exercise 1
Let’s consider a rocks transport system based on a cart. The operator defines the beginning of the cycle using the START button. The cart goes through the entire rail from left to right and it stops waiting to be filled. The rocks, after being accumulated in a tank, are moved mechanically into the cart, which must automatically move along the rail from right to left.
Exercise 1
As INPUTS we have six sensors:
Start Start button ET Empty Tank
LS Left Switch TDS Tank Down Switch
RS Right Switch TUS Tank Up Switch
LS LM RS RM Start TUS TDS ET DWT UPT Rocks As OUTPUTSwe have:
RM Right Motor DWT Down Tank
Exercise 1
Start AND NOT(ET)
Stop RS CartR N RM TankDW N DWT TDS Unload TankUP N UPT ET TUS CartL N LM LS
Exercise 1.1
Let’s add to the previous exercise a maintenance stop every 100 cycles.
It is necessary to add:
MS (Maintenance Stop) as output MR (Maintenance Reset) as input
Exercise 1.1
Stop RS TankDW N DWT TDS Unload TankUP N UPT TUS CartL N LM ET LSStart AND NOT(ET) AND N<100 N>=100 RM CartR N RM E: N = N + 1; MaintReq N MS X: N = 0;
Exercise 2
Let’s consider an automatic car wash plant.
The customer approaches to the belt when the traffic light is green. The wash phases are: soaping, brushing, rinsing and drying.
All the phases are preceded by a photocell that detects the car arrival in that section of the plant.
Every 1000 washes the plant must be blocked and wait for the maintenance, made by an operator.
Inputs Outputs
InP Input photocell RTL Red traffic light (0=GREEN, 1=RED)
BP Brushing photocell SM Soaping motor
RP Rinsing photocell BM Brushing motor
DP Drying photocell RM Rinsing motor
OutP Output photocell DM Drying motor
MAIR Maintenance reset MAI Maintenance stop
Exercise 2
InP BP RP DP OutP SM BM RM DM RTL MAIR MAIExercise 2
The plant can be considered as a set of single smaller plants:
• Soaping
• Brushing
• Rinsing
• Drying
Each of these «plants» must be turned on when the input photocell detects the passage of a car, while it must be switched off when the car is completely exited from the section (when the next photocell is deactivated).
Exercise 2
As already described in lesson 4, the solution of this exercise requires a «distributed» management of each single part of the plant.
With the SFC we don’t have the possibility of manage more than one «execution cycles» in one single chart, for this
reason it is necessary to use more than one program.
We will have a program for each part of the plant (in the soaping chart we will manage also the traffic light and the maintenance).
Exercise 2
Each part of the plant will have this SFC:
Stop entranceP SectionON Ladder 𝑇𝑟𝑎𝑛𝑠𝑖𝑡𝑖𝑜𝑛 𝑒𝑥𝑖𝑡𝑃
N
Exercise 2
Oltre a questi programmi, nel programma di gestione dell’insaponatura, è necessario introdurre la gestione di semaforo e manutenzione. Maintenance ON MAIR 𝑇𝑟𝑎𝑛𝑠𝑖𝑡𝑖𝑜𝑛 𝐵𝑃 N N MAI S RTL Stop R RTL X: N :=0; N>=1000 N<1000 AND FIn SoapingON N SM S RTL Ladder E: N:=N +1;
Exercise 2
Example of SFC for the brushing section
Stop FS BrushingON Ladder 𝑇𝑟𝑎𝑛𝑠𝑖𝑡𝑖𝑜𝑛 𝑅𝑃
N
Exercise 3
Let’s consider an automatic drilling and riveting system for sheet metal.
When the two pieces arrive, a robot execute the handling of the components (subsequently one to each other) and it
positions them on the mounting jig. When the handling is finished the machining can be executed using the automatic driller (the duration of this operation is 5 sec) and the riveter (10 sec).
At the end of the operations the robots moves the piece in a pallet.
Exercise 3
P
CB CA MA MB TR
BDS FDS FRS BRS PB PA RST RC DFM RFM DON RON InputsPA Presence sensor conveyor A FDS Front driller switch
PB Presence sensor conveyor B BRS Back riveter switch
RST Robot state (0=IDLE, 1=EXECUTING) FRS Front riveter switch
BDS Back driller switch
DBM
Exercise 3
Outputs RC Robot command (0=STOP, 1=from CA to
MA, 2=from CB to MB, 3=from M to P)
DON Driller ON
RFM Riveter front motor
DFM Driller front motor RBM Riveter back motor
DBM Driller back motor RON Riveter ON
P
CB CA MA MB TR
BDS FDS FRS BRS PB PA RST RC DFM RFM DON RON DBM RBMExercise 3
Consider the steps necessary to achieve the final product:
1)Wait the activation of CA and CB
2)Send the command 1 to the robot and wait the end of the execution 3)Send the command 2 to the robot and wait the end of the execution 4)Move the driller until reach its front switch
5)Activate the driller for 5 seconds
6)Move back the driller until it reaches the back switch 7)Move the riveter until reach its front switch
8)Activate the driller for 10 seconds
9)Move back the driller until it reaches the back switch
10)Send the command 3 to the robot and wait the end of the execution 11)Send the command 0 to the robot
Exercise 3
This example, that in lesson 4 was «solved» using the ladder with the states, is perfect for the SFC logic.
We have a set of states that a subsequent one to each other, with simple transitions between the states.
The solution is «trivial», the states ar the points described in the slide 17.
Exercise 3
Stop PA AND PB MovingA E: RC :=1; NOT RST MovingB E: RC :=2; NOT RST DrillerFW N DFM FDS DrillerON N DON DrillerBW N DBM FTI RivFW N RFM FRS RivON N RON RivLav.t >= T#10s RivBW N RBM BRS MovingProd E: RC :=3;Conclusions
SFC Remarks
It is the best language for the development of finite state machine control algorithms.
It is not always good for «decentralized» logical controls (we have a single execution in the program, except the
parallelism).
As it will be described, it matches perfectly with the Petri nets logic.