Exercises

The following exercises will consolidate what you have learned so far and train you to use GRAFCET in a practical setting. The exercises allow you to apply all the GRAFCET techniques you have learned in the previous sections.

Do the following when you want to perform an exercise:

  1. Open the correct template in Grafcet-Studio (see the instructions given in the practical exercise). You will then be able to access the operands/symbols needed for creating the system. You can find the template in the "My Files" folder in the "GRAFCET Workbook" folder.
  2. To test the GRAFCET chart, load the virtual system of the same name into PLC Lab from the "GRAFCET Workbook" node (see tree view). Select the following as the "target": "S7AG (WinSPS-S7)"
  3. Click on the "RUN" button first to start the virtual system so that the input signals are set correctly.
  4. Then switch on Watch mode in Grafcet-Studio.

Fig. PLC Lab Runtime in RUN mode

We wish you lots of fun in the practical application of GRAFCET.

Step sequence for metal cleaning plant

PLC-Lab Filename Grafcet-Studio Filename
MetallReinigungsanlage.plclab MetallReinigungsanlage.grafcet

The operation of a metal cleaning plant is to be described and programmed in GRAFCET. The parts prepared for cleaning are inserted manually into the cleaning drum, the drum is closed and the Start button is pressed to start the cleaning process.

You need to program the following steps:

  • Initial step 1: No action. Step enabling condition S4Start*S2DrumEmpty
  • Step 2: Switch on Y1CloseDrum. Step enabling condition: S1DrumClosed
  • Step 3: Switch on M2Pump. Step enabling condition: S3DrumFilled
  • Step 4: Switch off M2Pump and switch on Heating. Step enabling condition: TempLiquid >= 35°C
  • Step 5: Switch on M1WashingDrum. Step enabling condition: 5s/X5
  • Step 6: Switch off M1WashingDrum and Heating. Switch on M3Pump. Step enabling condition: S2DrumEmpty
  • Step 7: Switch off M3Pump and switch on H1CleaningCompleted. Step enabling condition: S5Confirm
  • Step 8: Switch off H1CleaningCompleted and Y1CloseDrum. Step enabling condition: !S4Start

|

Fig. 5.162 Diagram of the technology for the metal cleaning plant

Definition of the operands:

Symbol Description
S1DrumClosed "Drum closed" sensor, pressed = True
S2DrumEmpty "Drum is not filled with liquid" sensor, value = True if state is given
S3DrumFilled "Drum is filled with liquid" sensor, value = True if state is given
S4Start "Start" button, pressed = True
S5Confirm "Confirm" button, pressed = True
TempLiquid Liquid temperature sensor, integral value 0-50°C
M1WashingDrum Drum motor
M2Pump Pump in inlet
P1CleaningCompleted "Cleaning Completed" lamp
Heating Heating
M3Pump Pump in drain
A1CloseDrum "Close drum" actuator

Video:

Time-controlled clock sequence

PLC-Lab Filename Grafcet-Studio Filename
ZeitgesteuerteTaktkette.plclab ZeitgesteuerteTaktkette.grafcet

A clock sequence with a total of five steps is to be programmed dependent on time. The start is performed via a button (pulse) and continues until the button is pressed again. The steps must always be completed in full. An enclosing step provides itself as a solution here. A lamp is assigned to each pulse.

Fig. 5.163 Diagram of the technology for the time-controlled clock sequence

Definition of the operands:

Symbol Description
S1StartStop "Start/Stop" button, pressed = True
P1Step1 "Step 1"lamp
P2Step2 "Step 2"lamp
P3Step3 "Step 3"lamp
P4Step4 "Step 4"lamp

Video:

Filling station

PLC-Lab Filename Grafcet-Studio Filename
Fuellanlage.plclab Fuellanlage.grafcet

A GRAFCET for the filling station shown in is to be designed. Pressing the Start button S1 commences the filling of the tank via pump M1 and the valve Y1 up to a filling level of 95 litres. Once this level is reached, the medium is to be stirred with the help of M3. This operation consists of 10 seconds of agitation followed by a pause of 5 seconds. The operation is to be repeated three times. Afterwards, the tank is completely drained via pump M2 and the valve Y2. The agitator switches itself on and remains on during the draining operation until the medium has reached a level of less than 5 litres. It is important to make sure that the pump does not pump against a closed valve when it is switched on. The switch-on delay for the pump vs. the corresponding valve should be two seconds. The current filling level of the tank is contained in the operand FillingLevel as an integral value.

Fig. 5.164 Diagram of the technology for the filling station

Definition of the operands:

Symbol Description
S1Start "Start" button, pressed = True
FillingLevel Sensor for filling level, integral value 0-100 litres
P1AgitatorActive "Agitator Cycle Active" lamp
P2ProcessCompleted "Operation Complete" lamp
M1PumpInlet Pump in inlet
M2PumpDrain Pump at drain
M3Agitator Motor for agitator
Y1Inlet Valve in inlet
Y2Drain Valve at drain
CountAgitatorProcesses Internal integral value for buffering the number of cycles

Video:

Operating mode switch

PLC-Lab Filename Grafcet-Studio Filename
Betriebsartenschalter.plclab Betriebsartenschalter.grafcet

Manual and Automatic modes are to be programmed for a rotary index table. Each of the operating modes are shown by a lamp H1 for Manual mode and H2 for Automatic mode. You make the selection with the switch S1. Once S1 is pressed, Automatic is selected and the operand has the value True.

The GRAFCET is to be structured. Partial GRAFCET charts are to be formed as a part of this: G1 for Manual mode and G2 for Automatic mode.

If the Emergency Stop switch S2 has been pressed, then the operand S2 has the value False. In this case, no more steps can be active in G1 and G2. If S2 is unlocked (i.e. no longer pressed), you first need to select Manual mode before you can switch back to Automatic mode.

Fig. 5.165 Diagram of the technology for mode selection

Definition of the operands:

Symbol Description
S1ManualAutomatic "Manual/Automatic" switch, pressed = True = automatic
S2EmergencyStop "Emergency Stop" switch, pressed = False
P1ManualIsActive "Manual" lamp
P2AutomaticIsActive "Automatic" lamp
P3EmergencyStop "Emergency Stop" lamp

Video:

Rotary index table for a filter testing machine

PLC-Lab Filename Grafcet-Studio Filename
RundschalttischKurz.plclab RundschalttischKurz.grafcet

The filters produced by a manufacturer are to be evaluated in terms of various test methods. A maximum of three test methods are to be considered; Each method corresponds to a checking station. The pick-up and removal station are also to be included. The rotary table is equipped with a total of five stations (and a reserve station). Pressing the Start button (S1Start) transports the filter from the magazine to the empty receiving station. The rotary index table continues the cycle to one station further as soon as all the stations have delivered a completion message and the unloading station is empty. Sensor S4 has the value True when the table is in a correct position and the test or unloading can be carried out. Unloading takes place manually. Each station has a sensor, which has the value True when a filter is present in the station and therefore, the test is to be carried out (S9-S14).

If the Stop button (S2) is pressed, no new filters are inserted into the device.

Note: Each station has its own time-dependent checking action as a substitute for simulating the testing program. For the simulation, the completion message from a checking station can be assumed as being present after two seconds. The three checking stations and the feeding of the filters from the magazine (A1) are to be programmed as enclosing steps and are called up within the partial sequences of a parallel branch from the main GRAFCET chart.

Fig. 5.166 Diagram of the technology for the rotary index table

Definition of the operands:

Symbol Description
S1Start "Start" button, pressed = True
S2Stop "Stop" button, pressed = True
S4TableInPosition "Table in correct position" sensor, pressed = True
S9Occupied "Receiving station is occupied" sensor, pressed = True
S10Occupied "Station 1 is occupied" sensor, pressed = True
S11Occupied "Station 2 is occupied" sensor, pressed = True
S12Occupied "Station 3 is occupied" sensor, pressed = True
S14UnloadOccupied "Unloading station is occupied" sensor, pressed = True
S15A1Retracted "Feed cylinder in rear end position" sensor, pressed = True
S16A1Extended "Feed cylinder in front end position" sensor, pressed = True
A1ExtendRetract Extend and retract cylinder A1, True = extend
M1RotaryTable Rotary index table motor

Video:

Filling raw materials into drum and mixing them

PLC-Lab Filename Grafcet-Studio Filename
RohstoffeInTrommelVermischen.plclab RohstoffeInTrommelVermischen.grafcet

The GRAFCET for the following arrangement is to be created:

A drum can be opened at the top so that it can be filled with raw materials. To do this, the drum must be at filling position S5. After closing the drum (S4 = True), it begins to spin for 20 seconds to mix the raw materials. After these 20 seconds, unloading position S6 is approached and the drum opened (S3 = True) so that the mixture empties out. The drum then moves to the filling position S5 at a throttled spin speed. If the Stop button S2 is pressed, all actions are stopped immediately. A restart is only possible if the drum is emptied manually and then moved to the starting position.

Fig. 5.167 Diagram of the technology for the raw material drum

Definition of the operands:

Symbol Description
S1Start Start button, value = True if pressed
S2Stop Stop button, value = False if pressed
S3ContainerOpen "Drum is open" sensor, value = True when open
S4ContainerClosed "Drum is closed" sensor, value = True when closed
S5FillPos "Drum in filling position" sensor, value = True when in position
S6DrainPos "Drum in draining position" sensor, value = True when in position
M1RotateContainer Motor for rotating the drum
M2RequestItems Motor for feeding in raw materials
A1OpenContainer Actuator for opening the flap on the drum, if True, flap is opened.
M1SpinSpeed Default integral value for the spin speed of the drum in r/min

The detailed procedure takes the following form:

  1. Actuation of the Start button
  2. Opening of the drum
  3. Request for raw materials for four seconds
  4. Closing of the drum
  5. Rotation of the drum at a spin speed of 20 r/min
  6. After 20 seconds, the drum stops at the unloading position
  7. Opening of the drum for four seconds
  8. Closing of the drum
  9. Rotation of the drum to the filling position at a spin speed of 3 r/min

A new cycle can now start. Since the Stop button is meant to abort the automatic process, it must be organised in a group with its own initial step, which, on Stop, is to be deactivated to an empty situation via forcing.

Video:

Mounting tyres (on rims) with a mounting robot

PLC-Lab Filename Grafcet-Studio Filename
MontageRoboter.plclab MontageRoboter.grafcet

Part of the tyre mounting process in automotive manufacturing is to be described using GRAFCET. A mounting robot fitted with an arm is to be used in the process. The arm picks up a tyre and places it on one side of the rear axle of a vehicle located on the belt.

Procedure: 1. Request tyre and vehicle manually. Limit switches S5 and S6 need to be actuated. 2. Press the Start button. 3. A2 opens the removal station. The robot picks up the tyre. 4. The robot pivots to the right at 90° to the mounting position. 5. A1 pushes the tyre onto the vehicle axle. 6. A1 retracts. 7. The robot moves to the basic position at 0°. 8. The vehicle is removed manually.

Note: An enclosed step is used in each case for the procedure of the robot.

Definition of the operands:

Symbol Description
S1Start Start button, value = True if pressed
S3A1Retracted "A1 retracted" sensor, value = True if occupied
S4A1Extended "A1 extended" sensor, value = True if occupied
S5CarInPos "Car in mounting position" sensor, value = True if occupied
S6TireInPickupPos "Tyre in pickup position" sensor, value = True if occupied
S7TireRemovalOpen "Tyre removal is open" sensor, value = True if occupied
S8TireRemovalClose "Tyre removal is closed" sensor, value = True if occupied
PosJointInDegree Sensor, integral value with the current position of the robot joint in degrees
M1Right Motor for rightward movements of the robot
M1Left Motor for leftward movements of the the robot
A1PickupRoboter "Tyre pickup extend/retract" actuator, True = Extend
A2TireRemoval "Tyre removal extend/retract" actuator, True = Open removal

Video:

Shearing device

PLC-Lab Filename Grafcet-Studio Filename
Abschervorrichtung.plclab Abschervorrichtung.grafcet

A GRAFCET is to be developed for a device which shears rods with a constant length off a longer rod.

Process description:

  1. Switch on the control by pressing the "Con. On" button (S1).
  2. Start the process with the "Start" button (S3).
  3. A2 extends and inserts the rod.
  4. A1 extends until the rod reaches S13 or limit switch S6 is pressed.
  5. A3 fixes the rod.
  6. A4 cuts off a part and retracts.
  7. A3 retracts.
  8. A2 and A1 retract.

A new cycle can now be initiated by pressing the Start button. The operation is to be stopped immediately if "Emergency Stop" or "Control Off" are pressed.

It should only be possible to activate the control when the "Emergency Stop" switch is not pressed. All limit switches of the actuators deliver a False signal when actuated. The same applies to the "Con. Off" button and the Emergency Stop switch.

Fig. 5.168 Diagram of the technology for the shearing device

Definition of the operands:

Symbol Description
S1ControlOn "Control On" button, value = True if pressed
S2ControlOff "Control Off" button, value = False if pressed
S3Start "Start" button, value = True if pressed
S4EmergencyStop "Emergency Stop" switch, value = False if pressed
S5A1Retracted "A1 retracted" sensor, value = False if pressed
S6A1Extended "A1 extended" sensor, value = False if pressed
S7A2Retracted "A2 retracted" sensor, value = False if pressed
S8A2Extended "A2 extended" sensor, value = False if pressed
S9A3Retracted "A3 retracted" sensor, value = False if pressed
S10A3Extended "A3 extended" sensor, value = False if pressed
S11A4Retracted "A4 retracted" sensor, value = False if pressed
S12A4Extended "A4 extended" sensor, value = False if pressed
S13ItemInPosition "Item in position" sensor, value = True if pressed
P1ControlOn "Control On" lamp
A1Extend "A1 extend" actuator
A1Retract "A1 retract" actuator
A2Extend "A2 extend/retract" actuator, True = extend
A3Extend "A3 extend/retract" actuator, True = extend
A4Extend "A4 extend/retract" actuator, True = extend

Video:

Cleaning Bath

PLC-Lab Filename Grafcet-Studio Filename
Reinigungsbad.plclab Reinigungsbad.grafcet

Fig. 5.169 Diagram of the technology for the cleaning bath

A GRAFCET is to be developed for a cleaning bath for metal parts.

Process description:

  1. Switching on of the control by pressing the "Con. On" button (S1). The H1 lamp signals that the control is switched on.
  2. Starting of the process by pressing the Start button (S3).
  3. A1 extends and pushes a workpiece onto the A2 holder.
  4. The cleaning bath heating is switched on. The workpiece can be immersed in the bath once the bath has reached a temperature of 70°C. The current temperature is delivered by the sensor S8 between 20-75°C.
  5. Once the bath has reached the desired temperature, A2 lowers the workpiece into the bath for 8 seconds. The heating remains switched on for as long as the workpiece is immersed in the bath.
  6. Once the time has expired, A2 lifts the item out of the bath. A new cycle can now be started. For this, A1 pushes the next workpiece onto the holder of A2. The already cleaned workpiece is fed to the next processing step over a ramp.

Switching the control off should stop a cycle immediately. A restart is only possible once the control has been switched on.

Definition of the operands:

Symbol Description
S1ControlOn "Control On" button, value = True if pressed
S2ControlOff "Control Off" button, value = False if pressed
S3Start "Start" button, value = True if pressed
S4A1Retracted "A1 retracted" sensor, value = False if pressed
S5A1Extended "A1 extended" sensor, value = False if pressed
S6A2Retracted "A2 retracted" sensor, value = False if pressed
S7A2Extended "A2 extended" sensor, value = False if pressed
S8TempWater Sensor for bath temperature, integral value in the range 20°C–75°C
P1ControlIsOn "Control Is On" lamp
A1Extend "A1 extend/retract" actuator, True = extend
A2Extend "A2 extend/retract" actuator, True = extend
HeatingOn Turns the bath heating on

Video:

Tomograph

PLC-Lab Filename Grafcet-Studio Filename
Tomograph.plclab Tomograph.grafcet

The GRAFCET for a tomograph is to be developed.

Process description:

  1. The position at which the examination is to take place in the tube is set with a slide control.
  2. After switching on the control (S1) and pressing "Start" (S4),the lounger moves to this selected position.
  3. When the position is reached, the radiation source rotates from the left to right and back again.
  4. The lounger then moves out of the tube into the basic position.

Fig. 5.170 Diagram of the technology for the tomograph

When the lounger moves, lamp H2 should show this. If the radiation source is rotating, H3 signals this. H3 is designed as a blinking lamp. The position of the lounger is delivered by a sensor in a range from 1 to 600. The basic position is reached here at a value of <= 5. The reaching of the examination position is to take place by way of a comparison >= (greater than or equal to), since the lounger moves relatively quickly. The Emergency Stop (S3) and Control Off buttons (S2) deliver the value False when pressed.

Definition of the operands:

Symbol Description
S1ControlOn "Control On" button, value = True if pressed
S2ControlOff "Control Off" button, value = False if pressed
S3EmergencyStop "Emergency Stop" switch, value = False if pressed
S4Start "Start" button, value = True if pressed
S5RadiationSourceLeft "Radiation source left position" sensor, value = True if pressed
S6RadiationSourceRight "Radiation source right position" sensor, value = True if pressed
S7LoungerPosition "Integral position value of the lounger" sensor, value returns the range 1-600
TargetPosLounger Selected value for the position of the lounger set with the slide control
P1ControlOn "Control On" lamp
M1MoveLoungerInside Actuator, move lounger into the tomograph
M1MoveLoungerOutside Actuator, move lounger out of the tomograph
M2RotateRadiationRight Actuator, rotate radiation source to the right
M2RotateRadiationLeft Actuator, rotate radiation source to the left
H2RadiationSourceIsMoving Lamp for "Radiation source is moving"
H3LoungerIsMoving Blinking lamp for "Lounger is moving", lamp is designed as a blinking lamp

Video: