Home
GRAFCET Master · Manual
Advanced Technical Manual · IEC 60848 / IEC 61131-3

GRAFCET Master Complete Guide

Master the history and theory of GRAFCET, official IEC 60848 rules, step-by-step diagramming on PC and mobile, button-by-button UI navigation, and the 10-Plant Virtual Commissioning Studio.

Chapter 1 · Foundations

History, Purpose, Pros/Cons & Industry Today

From France 1977 to international standard IEC 60848 and modern Industry 4.0/5.0 PLC engineering.

Origins & Standardization

Created in France in 1977 by an AFCET/ADEPA working group, GRAFCET (Graphe Fonctionnel de Commande Étape-Transition) bridged mechanical, electrical, and PLC engineers with an unambiguous graphical model rooted in Petri Nets.

Standardized in France as NF C 03-190 (1982) and internationally as IEC 60848 (1988, updated 2002 & 2013), its PLC-executable syntax was incorporated into IEC 61131-3 in 1993 as SFC (Sequential Function Chart).

IEC 60848 vs. IEC 61131-3 (SFC)
GRAFCET (IEC 60848) specifies machine behavior cleanly regardless of hardware; SFC (IEC 61131-3) is the PLC programming language implementing that chart alongside Structured Text (ST) or Ladder Diagram (LD).

What Is GRAFCET Used For?

  • Discrete machine automation: Bottlers, palletizers, stretch wrappers, carton strappers, AS/RS stacker cranes, and CNC robot cells.
  • Batch & process industries: Multi-reagent chemical reactors, plating lines, and HTST pasteurizers with CIP sanitization.
  • GEMMA Operating Modes: Coordinating Auto Production, Setup, End-of-Cycle Stop, Emergency Stop, and Homing via Forcing Orders.
  • Fast field diagnostics: Seeing the exact active step and missing transition sensor pinpoints faults much faster than scanning long Ladder networks.

Advantages & Trade-Offs vs. Ladder / Pure Code

Key Advantages
  • • Self-documenting step-by-step sequence aligned directly with machine physics.
  • • Native concurrency (AND branches) and mutually exclusive routing (OR branches).
  • • Instant fault localization by checking which transition condition blocks advancement.
  • • Direct portability to Siemens S7-GRAPH, Studio 5000 SFC, CODESYS, and PLCopen TC6 XML.
Disadvantages / Trade-Offs
  • • Less compact than Ladder/FBD for large combinational interlock grids or high-speed bitwise logic.
  • • Requires strict engineering discipline: wrong receptivities or unbalanced AND joins can deadlock a cycle.
  • • Legacy small PLCs often compile sequential charts down into Structured Text or Ladder state variables (just like our ST/Arduino exporter).

GRAFCET Today (Industry 4.0 / 5.0)

GRAFCET/SFC remains core across European automation, packaging, robotics, and food/pharma plants (Siemens TIA Portal GRAPH, Schneider Control Expert, Rockwell Studio 5000, CODESYS).

Combined with Virtual Commissioning digital twins, engineers validate mechanical clearances, interlocks, and emergency stops against simulated physics before energizing real shop-floor actuators.

Chapter 2 · IEC 60848 Rules

Official GRAFCET Rules & Editor Syntax

The 5 evolution rules, strict alternation, action qualifiers, Boolean receptivities, OR/AND branching, loops, jumps, and macros.

The 5 Evolution Rules (IEC 60848)

0Start * S_Home1NMotor_CWInitial Step (0) → Transition → Active Step (1) + Action (N)
RuleOfficial PrincipleSimulation Behavior
Rule 1 · Initial SituationInitial steps define the system state at startup.Every runnable chart needs at least one Initial Step (double border, e.g. S0 / Step 1).
Rule 2 · Transition ClearingEnabled when ALL preceding steps are active; clears only when its receptivity is TRUE.Supports single transitions and multi-branch AND-Join synchronization.
Rule 3 · Step ActivationClearing deactivates all preceding steps and activates all succeeding steps simultaneously.State updates cleanly every PLC scan cycle.
Rule 4 · Simultaneous FiringAll enabled transitions whose receptivities are true fire simultaneously.Allows independent parallel AND branches to run concurrently.
Rule 5 · Priority of ActivationIf a step is simultaneously activated and deactivated in the same scan, activation prevails.Protects tight loop transitions from accidentally dropping active state.

Strict Step ↔ Transition Alternation

A valid GRAFCET always alternates: Step → Transition → Step → Transition. Never connect two Steps directly without a Transition, or two Transitions consecutively without a Step.

OR Divergence (Choice)1A!A23AND Divergence (Parallel)Start45Single bar after Step = OR · Double bar after Transition = AND
OR Selection vs. AND Parallelism
• OR Divergence (exclusive choice): follows a Step with a single horizontal line; each branch begins with a Transition carrying mutually exclusive conditions. • AND Divergence (parallel execution): follows a single Transition with a double horizontal line; each branch begins with a Step and rejoins via an AND Convergence bar into one synchronization Transition.

IEC 61131-3 Action Qualifiers

QualifierMeaningBehavior while Step is active
NNon-storedOutput stays ON while the parent step is active.
SSet (Stored)Latches output ON across steps until cleared by an R action.
RResetClears a previously Set variable back to 0.
P / P1Rising Edge PulseExecutes for 1 scan cycle upon step activation (great for counters Count++).
P0Falling Edge PulseExecutes for 1 scan cycle upon step deactivation.
LTime LimitedRuns only up to the configured duration (e.g. T#2s) while step remains active.
DTime DelayedWaits for the configured delay after activation, then drives the output.
DS / SD / SLTimed Stored VariantsCombined delayed/stored/limited behaviors per IEC 61131-3.

Receptivities, Timers & Counters

  • Boolean expressions: Use * or AND, + or OR or ||, ! or NOT (e.g. Start * !E_Stop * (S_A || S_B)).
  • Always-true transition: Use 1 or TRUE to advance on the next scan.
  • Step timers: Use t/X2/3s or T#3s inside transitions (plus dedicated TIMER variables).
  • Edges: RE Var (rising edge) and FE Var (falling edge).
  • Numeric comparisons: Wrap integer/real comparisons in brackets like [Count_OK < Sp_Lote] or [Temp_C >= 72].
  • Interlock & Supervision: In Step Properties: Interlock disables actions when false; Supervision halts transition evolution until safe.
Chapter 3 · Workflow

How to Build a Diagram Step-by-Step (Including Return Loops)

Practical build order from I/O Symbol definitions to closing cycle loops on PC and mobile.

6-Step Engineering Workflow

  • 1. Declare I/O Variables: Open the Symbol Table and add Inputs (I0.0..), Outputs (Q0.0..), Memories (M..), and Integers/Reals.
  • 2. Place Initial Step: Pick Initial Step from Toolbox; it automatically leaves top margin for return lines.
  • 3. Rapid-Build with Quick-Chain Bar: Tap a Step for + Transition ↓ / + Action →; tap a Transition for + Step ↓ / + Step + Transition ↓.
  • 4. Configure Formulas & Qualifiers: Use Properties on the right to enter transition formulas with symbol autocomplete and action qualifiers.
  • 5. Close Cycles with Return Loops: Connect the bottom transition back to the loop start step.
  • 6. Simulate, Oscilloscope & Export: Run Play or Single Step, inspect Logs & Timing Chart, and export PNG, SVG, ST, Arduino, or PLCopen TC6 XML.

Creating Return Lines on Mobile & PC

Return Lines (LINK_LOOP) route flow cleanly from a lower Transition back up to a previous Step so cycles repeat without overlapping lines across blocks.

S0S1Done = 1Blue dot / ↩ Return Loop
  • Mobile & 2-Tap Method (recommended on touch): 1) Tap the source Transition. 2) Tap "↩ Return Loop" on the top Quick Bar. 3) Pick Left/Right side and tap the target Step on canvas (or tap its S0/S1 chip on the bottom pill).
  • Desktop Drag Method: Select or hover over a Transition to reveal the blue dot underneath it, drag directly onto the target Step, and release.
  • Edit Side or Target Anytime: Tap any Return Loop to use "↔ Flip Side" on the Quick Bar or update Target Step & Side inside Properties.
Chapter 4 · Desktop (PC)

PC Navigation Button-by-Button

Complete map of Top Toolbar controls, Sidebars, Bottom Panels, Minimap, and Keyboard Shortcuts.

Top Toolbar Controls

GroupButtonsFunction
Project & ExportNew (+), Open, Save, Export, Share, Cloud Save/LoadManage multi-page charts, save/load .g7/.json, export PNG/SVG/ST/Arduino/PLCopen XML, generate share links, and sync Pro cloud projects.
HistoryUndo, RedoStep backward/forward across all edits (Ctrl+Z / Ctrl+Y).
SimulationPlay/Resume, Pause, Stop, Single StepCompile active chart, run live PLC scan cycles, pause mid-cycle, reset, or step one scan at a time.
ViewportZoom -, %, Zoom +, Fit (F), Grid, PanScale 25%–300%, reset 100% (Ctrl+0), auto-fit diagram (F), toggle grid, or toggle pan tool.
UtilitiesSearch, Language, Virtual Plants, Manual, Contact, Settings, AccountJump to any step/transition, switch among 7 languages, launch /plant or /manual, tune scan time, or manage account.

Sidebars, Bottom Panel & Minimap

  • Left Sidebar · Toolbox / Pages / Demos: 15 IEC GRAFCET blocks (drag or click to stamp), multi-page switcher for Macros/GEMMA, and starter demos.
  • Right Sidebar · Properties & I/O Monitor: Inspect/edit any selected element (including Return Loops) and toggle/force live I/O values.
  • Bottom Panel · Symbols, Logs & Timing Chart: Variable definitions on the left; live transition firing logs and digital waveform Timing Chart on the right.
  • Interactive Minimap: Click/drag viewport indicator in the bottom-right corner and inspect live grid (Col, Row) coordinates.

Keyboard & Mouse Shortcuts

ShortcutAction
Ctrl + Z / Ctrl + YUndo / Redo edits.
Ctrl + C / Ctrl + VCopy and paste selected blocks with internal links.
Delete / BackspaceDelete selected elements.
Space + Drag / Middle Mouse / Alt + DragPan canvas instantly without losing active selection.
Mouse WheelZoom centered at cursor.
F / Ctrl + 0Fit diagram to screen / Reset zoom to 100%.
Shift + Click / Marquee DragMulti-select elements.
EscapeCancel active Stamp tool or Return Loop connection mode.
Chapter 5 · Mobile & Tablet

Phone / iPhone & Tablet Touch Guide

Adaptive overlay sheets, Floating Bottom Dock, touch gestures, Stamp mode, and 2-tap return loops.

Overlay Sheets & Floating Bottom Dock

On compact viewports (< 1024 px), sidebars automatically collapse into slide-over sheets so your diagram owns almost the entire screen.

🔧 Toolbox|⚙ Properties |▸_ Logs & Chart|⛶ Fit
  • Toolbox button: Opens parts drawer; closes automatically once you tap a part so you can tap directly on the grid to place it.
  • Properties button (with dot badge): Lights up with a blue dot whenever an element is selected; tap to edit its formula or action.
  • Logs button (bottom sheet): Contains segmented tabs for Symbol Table, Execution Logs, and Timing Chart oscilloscope.
  • Fit button (⛶): Centers and scales the full diagram onto your phone screen in one tap.

Touch Gestures & 2-Tap Loops

GestureBehavior
1-finger drag on empty canvasSmooth canvas panning.
2-finger pinchPinch-to-zoom anchored between fingers (25% – 300%).
Single tap on any elementSelects element and reveals the scrollable Top Quick Bar (+ Transition, + Action, + Step, ↩ Return Loop, ↔ Flip Side, Delete).
Drag selected elementRepositions element(s) with automatic grid snap.
Active Stamp PillBottom pill lets you cancel placement with a single tap on X instead of Esc.
Return Loop (2 taps)Tap Transition → tap "↩ Return Loop" → pick Left/Right → tap target Step or quick chip S0/S1.
Chapter 6 · Virtual Plants (/plant)

Virtual Plant Studio & Commissioning Certificates

How to program, wire sensors, inject faults across all 10 industrial plants, and earn verified PNG certificates.

Split-Screen Studio Architecture

  • Left Pane (Read-Only GRAFCET Monitor): Displays live step illumination and Preflight checks for unmapped symbols or syntax errors.
  • Right Pane (2D Physics Machine): Real-time animation + 3 tabs: Drives & Parameters, I/O Wiring & Sensors (remap addresses, Auto/F:1/F:0/NC-NO, Auto-match button), and Mission Checklist (5 objectives).
  • Studio Header Controls: 10-Plant picker, language switcher, Example (Demo Mode), Start Challenge / Create My Program, Start PLC, Pause, Step, Stop, and E-STOP.
  • Fault Injection Bar (Pro): Stick individual inputs to 1 or 0 independently to practice troubleshooting.

All 10 Virtual Plants

PlantTierAutomation Focus
1. Stretch WrapperFreeTurntable, hoist carriage, encoder wrap counter, Lmax overtravel.
2. X-Z Pick & Place GantryFree2-axis vacuum gantry, variable layer height, side-collision guard.
3. Sorting ConveyorFreeInductive metal + optical height sensors, 3-chute OR diverters.
4. Batch Mixer ReactorFree AccountDual dosing A+B, agitator, low-level dry-heater interlock, drain.
5. Chemical Bridge CraneFree Account3-bath degrease/rinse/dry hoist with timers and tank clearance interlock.
6. Tandem Carton StrapperFree AccountSplitter blade, C-S-C-S-C conveyors, parallel AND strapping.
7. 4-Station Rotary BottlerPro90° indexing table, parallel fill||cap AND, QC camera, OR reject chute.
8. 3×3 AS/RS Stacker CraneProParallel X||Z travel, telescopic fork, laser double-load rack protection.
9. Robotic CNC + CMM CellProDoor/chuck/spindle safety interlocks, CMM probing, defect injection & OR scrap.
10. HTST Pasteurizer & CIPProOR Production (FDV >= 72 °C) vs. caustic CIP wash + sanitary interlocks.

Strict Commissioning Certificate Criteria

  • 1. Original User Program: Cannot be the built-in reference page; requires at least 3 Steps, 2 Transitions, and 0 Preflight/compile errors.
  • 2. Live PLC Execution: Requires running the simulation engine cleanly (at least 3 scan cycles).
  • 3. All 5/5 Mission Objectives: Must complete all 5 physical milestones on that same plant.
  • 4. Zero Physical Faults: Any collision, spill, dry-heating, or safety violation blocks certification until reset.
  • 5. Auto Sensors Only: Manual sensor forcing (F:1 / F:0, disabled, inverted) and fault injection must remain unused.
Demo Mode vs. Challenge Mode
Loading the built-in Example runs in Demo Mode for learning and NEVER awards a certificate. Click "Start Challenge for Certificate" to build your own verified program.
Ready to put it into practice?