DriveLab
Account

GRAFCET (IEC 60848)

Steps, transitions, receptivities and actions; the five evolution rules; sequences, choices and parallel branches; timers in receptivities; and how to go from a written specification to a GRAFCET. With a live GRAFCET player.

40 min

Show me

A machine that does things one after another (clamp, drill, release; fill, mix, drain) is sequential. Describing it with a web of self-holding rungs works for three steps and becomes unreadable at ten. GRAFCET (IEC 60848, GRAphe Fonctionnel de Commande Étape Transition) describes the sequence as a graph first; the program comes after. The booklet requires a GRAFCET for every sequential behaviour, drawn in the preparation.

The elements

  • Step (a square, numbered): a stable situation of the machine. A step is active or inactive; the step variable Xn is 1 while step n is active. The initial step (double square) is active at start-up.
  • Transition (a short horizontal bar between steps): the only way to go from one step to the next.
  • Receptivity (written next to the transition): the Boolean condition that allows it to fire, such as START . TOP.
  • Action (a rectangle right of the step): what the machine does while the step is active, such as DOWN (ram down).
  • Directed links: top to bottom by default; a link that goes back up carries an arrow.

The evolution rules

  1. Initial situation: the initial steps are active at start.
  2. Firing condition: a transition is enabled when all its preceding steps are active; it fires when it is enabled and its receptivity is true.
  3. Evolution: firing a transition activates all its following steps and deactivates all its preceding steps.
  4. Simultaneous firing: transitions that can fire at the same time fire together.
  5. Priority of activation: if a step is deactivated and activated at the same moment, it stays active.

Watch the rules at work. The chart below runs on the virtual PLC: the active step is highlighted, an enabled transition turns amber, and green when its receptivity is true. Hold START (I0.0) with TOP (I0.1) ON; then play the role of the ram with BOTTOM and TOP.

GRAFCET running on a virtual PLC-200
active step enabled transition receptivity true
0waitingSTART . TOP1ram downDOWNBOTTOM2dwell2s/X23ram upUPTOP
SIMATIC S7-200 · CPU 224SFRUNSTOP
I0.0START
I0.1TOP
I0.2BOTTOM
Q0.0DOWN0
Q0.1UP0
Timet = 0.00 s · 0 scans

No errors: the program compiles.

FoundationStart here if this is new to you

A GRAFCET is a board game with one token. The token sits on a square (the active step) and the machine does what is written next to that square. To move to the next square, the condition on the bar in between must be true. You cannot skip a bar, and the token never sits on two squares of the same line at once.

Structures

StructureDrawn asMeaning
Sequencesteps one under the otherone thing after another
Choice (OR divergence)one step, several transitions below it on a single lineonly one branch is taken; the receptivities must be exclusive (START . HOT and START . /HOT)
OR convergenceseveral transitions leading to one stepthe branches join
Parallel (AND divergence)one transition, then a double horizontal line, several steps belowall branches start together
AND convergenceseveral steps above a double line, then one transitioncontinue only when all branches are finished
Loopa link back up to an earlier step, with an arrowthe cycle repeats

The Mixing tank example is a choice: from step 0, START with the hot recipe goes to step 2, without it to step 1; both join at step 3.

Actions and receptivities

  • Continuous action (N, the default): the output is 1 exactly while the step is active.
  • Stored action: set on activation, reset in another step (written S and R, or with an arrow in the IEC notation).
  • Timed receptivity 3s/X2: true 3 s after step 2 became active. In the program it becomes a timer enabled by the step bit.
  • Edges ↑START: the rising edge of START, for a transition that must fire once per press.

From specification to GRAFCET

  1. List the inputs and outputs with their meaning (your I/O table).
  2. Write the normal cycle as sentences: "when…, the machine does… until…".
  3. Each "the machine does…" is a step with its actions; each "until/when…" is a receptivity.
  4. Add the initial step (machine at rest, outputs safe) and the return to it.
  5. Add fault handling: which condition, from which steps, leads to a fault step, and how RESET returns to the initial step.
  6. Check the choices are exclusive and every step has a way out.

Then use the Edit the GRAFCET tab to draw yours: add steps and transitions, write actions and receptivities with your symbols, and run it before the session.

Predict first

In the press, the operator presses START while the ram is not at the top (TOP = 0). What happens?