You are on page 1of 24

Chapter 9 : GRAFCET and Ladder Diagram

The GRAFCET is a tool for describing the specifications of the control unit of an
automated system.
The working of an automatic equipment may be described graphically by a group of:

STEPS
TRANSITIONS
DIRECTED LINKS

to which are associated certain ACTIONS


which are conditions to be fulfilled
linking steps and transitions
Transitions

step 0
input 1

Directed Links

step 1

output 1
input 2

step 2

output 2
input 3

step 3

Actions

output 3
input 4

step 4

output 4
input 5

step 5
input 6

GRAFCET & Ladder Diagram

The GRAFCET (contd)

Block Diagram of a PLC-controlled automatic system :

PILOT LIGHTS

INSTRUCTIONS

OPERATOR

COMMANDS

CONTROL
UNIT

OPERATIVE
UNIT
INFOMATION

PSA2

FP2-C1

XY64D2T

XY64D2T

GRAFCET & Ladder Diagram

The GRAFCET (contd)


Initial Step (double box)
Initiated by First Cycle Bit

WAIT step ( - doing nothing, in this case )


Transitions

start

extend cylinder A
cylinder A extended

Actions

extend cylinder B
cylinder B extended

retract cylinder A
retract cylinder B

cylinder A retracted cylinder B retracted

These are sensors !

Transitions
(AND operation)

Two Actions
In One step

GRAFCET & Ladder Diagram

Different parts of a GRAFCET


Labelled Connector : indicating where
control has come from (source

Initial Step : defining the initial situation of


the automated system.

Transition : between steps and with which


logic conditions are associated.
Step : a steady state with
which command or actions
may be associated.

Simultaneous Activation :
indicated by transition followed
by a double horizontal line.
Start of Sequence Selection :
indicated by a single horizontal
line followed by two or more
transitions.

Directed Link : connecting steps to


transitions, and transitions to steps.

ACTIONS

ACTIONS

ACTIONS

ACTIONS

End of Sequence Selection :


indicated by one or more
transitions followed by a
single Horizontal line.

Simultaneous De-activation :
indicated a double horizontal line
followed by transition.

Labelled Connector :
indicating where control is going
to (destination Connector).

GRAFCET & Ladder Diagram

Grafcet Design Sequence


How to do the sequence.
1. Represent the steps (step_1 and step_2) by internal
Relay bits R1 and R2.
R1 and R2 will either be 1 (active) or 0 (inactive).

1
START

2. Only 1 step should be active at any one time.


3. Do not worry about outputs at the moment.

4. The initial step should be activated by the PLC


internal scan cycle (the very first cycle). After
which it will be activated by step_2 and stop_PB
(during the return loop).
Step_1 activated by 1st cycle bit, but it will turn
off during the 2nd cycle onwards. Hence, the
need to on to the avtive state (therefore latch
It) using step_1.
Step_1 latched.

STOP

1st_cycle_bit

Occurs only once


upon PLC power
on
1st_cycle_bit

When step_1 is active and start_PB is pressed, step_2


will be active and need to be latched (because
start_PB will eventually be released!)

Step-1

Step-1

Step-1

Step-1 Start

Step-2

Step-2

(But then there will be 2 active steps: step_1 and


step_2.We want to have only one active step. Therfore,
when step_2 becomes active, step_2 should de-activate
(kill-off) step_1.
Similarly, the step after step_2, that is step_1, should be
used to de-activate (kill-off) step-2.
Provision must be made to go back to step_1 again when
Step_2 is active and stop_PB is pressed.(This is to loop
back).

1st_cycle_bit

Step-1

Step-1 Step-2
Step-2 Stop

Step-1

Start

Step-2 Step-1

To kill Step 2
when Step 1
is active

GRAFCET & Ladder Diagram

Step-2

Grafcet Design Output


How to do the output:
ON RED

1. Now that we have got the sequence, (sequence


Ensures that step_1 and start_PB goes to step_2,
And step_2 and stop_PB goes back to step_1,
And so on) we can determine the outputs (i.e.
What happens at each step).

START

2. We can decide to turn on red_light in step_1


And turn on green_light in step_2 (if that is
What is required).

ON GREEN
STOP

3. That means upon powering up of PLC (remember


1st_ cycle_ bit hence the initial step : step_1),
the red light turns. When start_PB is pressed,
green_light turns on. When stop_PB is pressed,
red light turns on, and so on.
(Remember : no change in sequence, only the output).

Step-1

ON RED

Step-2

ON GREEN

OR
We can decide to turn on the buzzer in step_2 and turn on both the lights in step_1.
So that when start_PB is pressed, the red_light and green_light will turn on.
(Remember : still no change in sequence, only the output).
Work the
Outputs from
right to left

ON RED
ON GREEN

Step-1

ON GREEN

START

Step-2

ON RED

ON BUZZER

ON BUZZER
STOP

GRAFCET & Ladder Diagram

OR
Other examples.

Step-1

ON GREEN

Step-2

ON BUZZER

Step-1

ON RED

ON RED
ON GREEN

1
START

ON RED
ON BUZZER

Step-2

STOP

Outputs may be
in any order

Inputs may
be repeated
Outputs

ON RED
ON BUZZER

1
START

ON GREEN
ON BUZZER

Step-1

ON RED

Step-2

ON GREEN

Step-1

ON BUZZER

Step-2

STOP
No Repeated
Outputs !!

Note : Beware of repeated output in the ladder diagram program.


Even though the GRAFCET contains two instances of ON BUZZER
The OUTPUT ladder diagram should contain only one instance of ON BUZZER.
It is wise therefore to state the output first and see which steps need this output.
That is work the output part of the ladder diagram from right to left.

GRAFCET & Ladder Diagram

GRAFCET of the Press


Start PB

Stamp
Done manually by operator

UNPROCESSED
MATERIAL
IN POSITION

Die

Stamp

Material in position and cycle start

( steps )
LOWER STAMP

Stamp

End of compression ( input = sensor )


RAISE STAMP

Stamp

Stamp in high position


LOWER DIE

Die

( outputs / actions )
Die in low position
EVACUATE PART

Stamp

Evacuation completed
RAISE DIE

Die

Die in high position

GRAFCET & Ladder Diagram

SEQUENCE

Ladder Diagram of the Press

1st_cycle_bit

Step-1

Step-6

Die-High

Step-1

Step-2

Step-1

Material

Step-2

Step-3

Step-2

End-High

Step-3

Step-4

Step-3

Stamp-High

Step-4

Step-5

Step-4

Die-Low

Step-5

Step-6

Step-5

Evacuate

Step-6

Step-1

Start

Step-2

Step-3

Step-4

Step-5

Step-6

OUTPUT
Step-2
Step-3
Step-4
Step-5
Step-6

Lower Stamp
Raise Stamp
Lower Die
Evacuate part
Raise Die

GRAFCET & Ladder Diagram

Project 1 - Moving a Wagon


Right Side

Left Side
Start PB

1
Start PB pressed

Moving A Wagon

Move Wagon to the Right

2
Right Side
reached

Move Wagon to the Left

3
Left Side
reached

OUTPUT

SEQUENCE
1st_cycle_bit

Step-1

Step-1

Step-2

Step-3

Left-side

Step-1

Start

Step-2

Step-3

Step-2

Right-side

Step-3

Step-1

Step-2

Move-right

Step-3

Move-left

Step-2

Step-3

GRAFCET & Ladder Diagram

Convert GRAFCET

Ladder Diagram

Use On Red

Use Ext_A

Use R1 or Step 1
Use A+

Sequence

Output

GRAFCET & Ladder Diagram

GRAFCET of the Drill


1

System initialization :
Retract Cylinder A
Retract Cylinder B
Off Green Light

Run & System initialised

On Green Light
Extend Cylinder A
Cylinder A extended

Extend Cylinder B

Cylinder B extended

Lower Drill

Step 4 / TIM001 / 3s . Drill_low

Raise Drill

5
Drill_ high

Retract Cylinder A
Retract Cylinder B

Cylinder A retracted . Cylinder B retracted

sensors

Drill-high

Drill

Drill-Low

Cylinder A and Cylinder B hold the


material (part to be drilled) tightly while
the drilling machine drills the hole.

Part / Material

Cylinder A

Cylinder B
A-

A+

B+
sensors

BGRAFCET & Ladder Diagram

Project 2

Ladder Diagram of the Drill

SEQUENCE

OUTPUT

1st_cycle_bit

Step-1

Step-1

Step-2

Step-6

Cyl.A ret

Step-2

Ext . Cyl A
Cyl.B ret
Step-3

Step-1

Run

Step-2

Step-3

Step-2

Cyl.A ext

Step-3

Step-4

Step-3

Cyl.B ext

Step-4

Step-5

Initialise ?
d

Tim001

Step-3

Step-4

LOWER -DRILL

Step-5

RAISE-DRILL

Step-6

Ret . Cyl A
Ret . Cyl B

Step-4

Step-5

Step-6

Drill-Low

Ext . Cyl B

Step-2

Step-4
Step-4

ON GREEN LIGHT

Step-5

TIM
001
3s

Step-5

Drill-high

Step-6

Step-1

Step-6

GRAFCET & Ladder Diagram

Grafcet Design
Automatic Hand Dryer
The system incorporates a diffuse sensor to detect the the presence of a pair of hands. When a pair
of hands are placed just below the the Automatic Hand Dryer, heated air flow is turned on. When
the person has completed drying his hands, the removal or absence of hands will be detected. The
heated air will continue to flow for a further 3 seconds before the heated air flow is turned off.

Fill in the blanks :


1

3
Step 3 / Timer5 / 3s

Outputs

Inputs

Off Hand Dryer


On Hand Dryer

Presence of Hands
Absence of Hands

Automatic Hand Dryer

GRAFCET & Ladder Diagram

Automatic Hand Dryer

SEQUENCE
1st_cycle_bit

Step-0

Step-0

Step-1

Step-2

Tim005

Presence

Step-0

DIF

Step-1

Step-2

Step-1

Absence

Step-1

DIF

Step-2

Step-0

Step-2

DIF (=ON) = Presence of hands


OUTPUT
Step-0

Step-1

OFF HAND DRYER

ON HAND DRYER

Step-2

Step-2

Timer5
3s

GRAFCET & Ladder Diagram

GRAFCET with multiple selections


A Grafcet is generally made up of several sequences (several series of steps that
execute one after the other) and it is often necessary to exclusively select one of
these sequences.
Example:

Action A

Action C

Action G

9
b

Action D

10

11

Action E
k

The above GRAFCET consists of a switch which allow to select one out of three
possible sequences depend on the transition conditions x, y and z. The different
transitions corresponding with their conditions x, y and z may be enable
simultaneously and they could be cleared simultaneously if the transition conditions
x, y and z were true at the same time. In order to avoid this from happening, the
transition conditions must be mutually exclusive. It is also possible to introduce the
priorities among the different sequences.

GRAFCET & Ladder Diagram

GRAFCET with multiple selections

12
The transition conditions a.b
and a.b are mutually exclusive.
If a and b are both present, the
transition from step 12 will not
be cleared.

a.b

a.b

13

14

12
The transition 12-13 has higher
priority than 12-14: the
transition 12-13 will be cleared
if both a and b are true at the
same time.

12
f.e

a.b

13

Action E

14

16
k

f.e
13

Action G

17

g
14

Action K

Action L
l

Action H
h

18

Action M

n.m
n.m

15

Action J
j

Jump from step 12 to step 15


if condition f.e is true.

19

Action P
p

Repeat 17-18 if condition n.m


is not obtained and n.m is true.
GRAFCET & Ladder Diagram

OUTPUT

SEQUENCE
Step-4

Step-5

Step-6

Step-5

Step-6

Step-7

Step-6

Step-7
Step-5
Step-8
Step-5
Step-9
Step-9
Step-10

Step-8

Step-9

Step-6

Step-7

Step-8

Step-10

Step-11

Step-6

Step-7

Step-11
y

Step-8

Step-11
z

Step-9

Step-10
b

Step-10

Step-11

Step-7

Step-8

Step-10

Step-11

Step-5

Step-11

Step-12

GRAFCET & Ladder Diagram

GRAFCET : COIN TOSSER

TOSS
COIN

TAIL

HEAD
ON
GREEN

ON
RED

STEP-2-3/ Timer7 / 3s

Input
Label
Head
Tail

Output

Addr
X1
X2

Label

TOSS COIN
GREEN
RED

Addr
Y1
Y2
Y3

OUTPUT

SEQUENCE
Step-1

1st_cycle_bit
Step-1
Step-2

IO Listing or
IO Address Assignment Table

Step-1

TOSS COIN

Step-2

ON GREEN

Step-2 Step-3
Timer7

Step-3

Step-3

Step-1

Head

Step-2

Step-1

Step-1

Tail

Step-3

Step-1

ON RED

Step-2
Step-2
Step-3

Timer7
3s

Step-3

GRAFCET & Ladder Diagram

GRAFCET: COMPONENT INSPECTION


1
START

FAIL

PASS

EXTEND
PASS-PUSHER

PASS-PUSHER-EXT

EXTEND
FAIL-PUSHER
FAIL-PUSHER-EXT

LOAD NEXT
COMPONENT
MATERIAL (IN POSITION)

SOLUTION : Sequence & Output

GRAFCET & Ladder Diagram

(c)

Design a GRAFCET for the following system in Fig 1 (initial step = step 1):
Detection of clasps on cardboard box:
The system incorporates a through-beam (TB) optical sensor, an inductive
sensor (IND ) and a counter.
The presence of a new clasp increments the counter (INCR_CTR).
The counter serves only to show the number of clasps on each box that
passes by. No other action need to be taken by the system based on the
number of clasps detected.
The counter is reset (RESET_CTR) for every new box that arrives.

TB
IND
(inputs)

PLC

INCR_CTR
RESET_CT
R
(outputs)

PLC input-output diagram

Counter

Fig. 1 : Detection of clasps on cardboard box

GRAFCET & Ladder Diagram

Solution :

GRAFCET & Ladder Diagram

(d)

Design a GRAFCET for the following system in Fig Q3d (initial step = step 1):
Automatic gauge level monitoring: The system incorporates two throughbeam (TB) optical sensors to monitor the level of the fluid in the stationary
glass gauge as shown in Fig Q3d. When the level falls below the lower limit,
a valve situated on top of the gauge is turned on automatically to add more
fluid. When the fluid level reaches above the upper limit, the valve is turned
on for a further 10 seconds before it is turned off.
Note : The control of filling level through glass gauge makes use of the laws of refraction. The
fluid, being the optically denser medium, breaks the light beam. Without the fluid the sensor is
activated.
TB_Top
TB_Bottom

PLC

On Valve
Off Valve

(inputs)

(outputs)

PLC input-output diagram

Automatic On/Off Valve


Emitters

Detectors

TB_Top

TB_Bottom

Fig. Q3d : Automatic Gauge Level Monitoring

GRAFCET & Ladder Diagram

Solution :

GRAFCET & Ladder Diagram

You might also like