Learn PLCs free

Sequential Function Chart (SFC) in PLC Programming

Sequential Function Chart (SFC) is the IEC 61131-3 graphical programming language for step-based sequences — batch processes, recipe handling, machine cycles, anything that runs as a series of named phases. SFC is the modern successor to GRAFCET (the French national standard from which it descends) and is the natural fit when ladder logic produces unreadable rung counts.

When to reach for SFC

SFC fits when your control flow is "do step 1, when condition X is true do step 2, when condition Y is true do step 3...". Batch reactors. Recipe handling. Test-stand sequences. Machine cycles. Startup/shutdown sequences. The moment you find yourself writing nested CASE statements or rungs that essentially encode "which step are we in?" — that's when SFC pays off.

Anatomy of an SFC

SFC: batch mixer sequenceSequential function chart with an initial step Idle, transition Start, step Fill_A, step Fill_B running in parallel with step Heat, convergence transition, step Mix, step Drain, transition back to Idle.Batch mixer SFCS0 — IdleStart AND Tank_EmptyS1 — Fill AN: PumpA, MV-AS2 — Fill BN: PumpB, MV-BS3 — HeatN: HeaterWt_A=SPWt_B=SPT>65°Call convergedS4 — MixN: MixerMixTimer.Q (5 min)S5 — DrainN: Pump_Out, MV_DrainTank_Emptyreturn to Idle
SFC: parallel branch (Fill A + Fill B + Heat run together) then converge to Mix and Drain

SFC building blocks

  • Step — a named phase of the sequence. While active, its actions execute. Drawn as a rectangle. The initial step is drawn double-bordered.
  • Action — code that runs while a step is active. Can be ladder, ST or FBD. Attached to a step with a qualifier letter.
  • Action qualifier — controls how the action runs:
    • N — Non-stored: runs while step active
    • S — Set: runs once and stays on until reset
    • R — Reset: turn off a previously Set action
    • P — Pulse: runs once at step entry
    • D — Delayed: runs after a time delay from step entry
    • L — Time-Limited: runs for a fixed duration
  • Transition — boolean condition that, when true, advances from one step to the next. Drawn as a horizontal bar.
  • Parallel branch — multiple steps run simultaneously after a divergence. All must complete before the convergence transition fires.
  • Alternative branch — only one of several possible next steps runs, based on which transition fires first.

SFC vs CASE in Structured Text

Many sequences can be implemented either way. SFC is graphical and the structure is visible at a glance — easier to review with non-programmers, easier for plant electricians to trace. ST CASE is more compact and easier to version-control as text.

In practice:

  • Use SFC for batch sequences with parallel sub-sequences and recipe variations. Drawing it shows what runs in parallel.
  • Use ST CASE for state machines without parallelism, or where text-based code review and version diff matter.
  • Use ladder rungs with state-bit logic for tiny sequences (3-4 steps). Don't bring out SFC for trivial cases.

Vendor SFC support

  • Siemens TIA Portal — full SFC editor. Most-used SFC implementation in industry. Common in pharma batch and chemical plants.
  • Rockwell Studio 5000 — full SFC support. Tighter integration with PhaseManager / PlantPAx for batch.
  • CODESYS / TwinCAT — SFC included. Strong action-qualifier support.
  • Schneider EcoStruxure Machine Expert — SFC native.
  • OpenPLC — SFC supported in OpenPLC Editor; Matiec compiler produces ST internally.
  • Mitsubishi GX Works3 — SFC supported but less commonly used than ladder/ST.

Frequently asked questions

What is a Sequential Function Chart in PLC programming?
Sequential Function Chart (SFC) is one of the five IEC 61131-3 PLC programming languages. Programs are organised as graphical steps (named phases) connected by transitions (boolean conditions). When a transition is true, control advances from the current step to the next. Used for batch processes, recipe handling, machine cycles, and any sequential control flow.
What is the difference between SFC and GRAFCET?
GRAFCET (Graphe Fonctionnel de Commande, Étape/Transition) is the French national standard for sequential control specification, the direct predecessor to SFC. SFC is the IEC 61131-3 internationalisation of GRAFCET — same fundamental concepts (steps and transitions) with refinements like action qualifiers (N, S, R, P, D, L) and standardised parallel branch syntax.
When should I use SFC instead of ladder logic?
Use SFC when your control flow is step-based: batch sequences, machine cycles, startup/shutdown procedures, recipe handling. SFC makes the sequence structure visible at a glance — easier to review with non-programmers and easier for plant electricians to trace. Use ladder for direct discrete control (motor seal-ins, interlocks) where the step structure does not exist.
What are SFC action qualifiers?
Action qualifiers control how an action runs while its associated step is active. N (Non-stored) runs while step active. S (Set) runs once and stays on until reset. R (Reset) turns off a previously set action. P (Pulse) runs once at step entry. D (Delayed) runs after a time delay. L (Time-Limited) runs for a fixed duration.
Which PLCs support SFC?
All major IEC 61131-3-conformant PLCs support SFC: Siemens TIA Portal (S7-1500), Rockwell Studio 5000 (ControlLogix), CODESYS / TwinCAT (Beckhoff and others), Schneider EcoStruxure Machine Expert, Mitsubishi GX Works3, and OpenPLC. Siemens and Rockwell have the most mature SFC editors and are most commonly used for batch processing applications.

Related guides

Free PLC simulator

Stop reading, start doing

Write ladder logic in your browser, hit Run, and watch real machine scenarios react. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →