What Are Sequential Function Charts in PLC Programming?

Sequential Function Charts (SFC) are a high-level graphical programming language used to design sequential control logic in Programmable Logic Controllers (PLCs). They provide a structured way to represent industrial automation processes that proceed through a defined series of steps, where each step corresponds to a machine state or action, and transitions determine when the system moves to the next step. SFC is one of the five languages specified in the IEC 61131-3 international standard, alongside Ladder Diagram (LD), Function Block Diagram (FBD), Structured Text (ST), and Instruction List (IL). SFC is particularly suited for batch processes, material handling systems, packaging lines, and any application where the sequence of operations is critical to safety and efficiency.

Unlike ladder logic, which can become unwieldy for complex sequences, SFC offers a top-down, modular view of the control flow. Each step can contain detailed logic written in other IEC languages (ladder, FBD, ST), enabling engineers to combine the best of graphical clarity and computational power. This makes SFC an essential tool for modern PLC programmers who need to build, troubleshoot, and maintain large-scale automation systems.

History and Standardization

Sequential Function Charts originated from Grafcet (Graphe Fonctionnel de Commande Étapes/Transitions), a French graphical method developed in the late 1970s. Grafcet was later adopted as the basis for the SFC standard in IEC 61131-3, published by the International Electrotechnical Commission. The standard ensures that SFC implementations from different PLC vendors—Siemens, Rockwell, Schneider, Beckhoff, etc.—share a common semantics, though minor syntax variations exist. Understanding the underlying principles of Grafcet helps engineers grasp the rationale behind SFC’s step-transition-action model. For deeper historical context, refer to the IEC 61131-3 standard.

Key Components of Sequential Function Charts

To master SFC, you must understand its core building blocks: steps, transitions, actions, and the rules that govern their execution.

Steps

A step represents a stable state in the control process. Each step has an associated set of actions that are executed while the step is active. Steps are depicted as rectangles with a step number or name inside. There are two special types:

  • Initial step – The starting point of the SFC, drawn with a double-line border. It becomes active when the PLC starts or when a reset condition occurs.
  • Normal steps – Represent subsequent states. Only one step (or a set of simultaneous steps) is active at any given time, unless parallel branches are used.

Transitions

Transitions define the conditions that allow the PLC to move from one step to the next. They are drawn as short horizontal lines between steps. Each transition has an associated transition condition—a Boolean expression that, when true, deactivates the current step(s) and activates the next step(s). Transition conditions can be simple sensor signals, timers, counter values, or complex logic written in any IEC language. The transition condition must evaluate to true before the SFC can advance.

Actions

An action is the work performed during a step. Actions can control outputs, start timers, execute calculations, or call subroutines. Each action has a qualifier that defines its behavior:

  • N (non‑stored) – The action is executed only while the step is active.
  • S (set) – The action is set and remains active even after the step deactivates, until explicitly reset.
  • R (reset) – Resets a previously set action.
  • L (limited time) – The action runs for a specified time duration.
  • D (delayed) – The action starts after a delay from step activation.

Actions are placed inside the step rectangle or in a separate action block, depending on the software.

Branches and Parallel Processing

SFC supports two types of branching:

  • Single (or selective) branch – A decision point where the process follows one path based on a transition condition. Only one branch is active.
  • Parallel branch – Two or more paths are executed simultaneously. All parallel steps become active at the same time, and each must reach a joint transition before the process continues. Parallel branches are represented by double horizontal lines.

Implementing SFC in PLC Programming

Implementation follows a systematic workflow that blends graphical design with low‑level code. Below is a step‑by‑step guide, using a typical industrial example.

Step 1: Decompose the Process into Steps and Transitions

Identify all discrete states of the machine. For a conveyor system, steps might be: Idle, Loading, Moving, Unloading, and Stopped. For each step, list the actions (e.g., run motor, open valve, start timer). Then define the conditions that trigger movement to the next step: e.g., part detected → Start Move, timer done → Start Unload. Document these in a table or flowchart before opening the PLC software.

Step 2: Create the SFC Diagram in the Programming Environment

Most modern IDEs (e.g., Siemens TIA Portal, Rockwell Studio 5000, Codesys) provide an SFC editor. Add an initial step, then insert steps and transitions in sequence. Use the software’s palette to draw branches and parallel paths. Label each step and transition clearly with descriptive names. Follow vendor‑specific conventions for step numbering or naming (some require numeric IDs).

Step 3: Program the Actions for Each Step

Double-click a step to define its actions. Use any IEC language to implement the logic. For example, in a conveyor example:

  • Step 1 (Idle) – Action: motor off, light off (N qualifier).
  • Step 2 (Moving) – Action: motor on (S qualifier) to keep running even after step ends until step 3 resets it.
  • Step 3 (Stop) – Action: motor off (R qualifier) resets the set action from step 2.

Step 4: Define Transition Conditions

Each transition must be programmed with a Boolean expression. For example, the transition from Idle to Moving might be Conveyor_Start_PB OR (Part_Sensor AND System_Ready). Use the software’s expression editor or ladder logic within the transition block. Ensure that transitions are evaluated continuously—most SFC engines scan transitions repeatedly.

Step 5: Handle Edge Cases and Safety

Add emergency stop conditions that override the SFC sequence. In SFC, you can create a separate parallel branch or use a dedicated transition that jumps to a safe step. Many PLCs allow jumps (conditional moves to any step) and macro steps (a sub‑SFC called from a step). Use these to organize complex machinery.

Step 6: Simulate and Test

Run the SFC in simulation mode to verify the sequence under all conditions. Check for deadlocks (steps that never deactivate) and ensure all transitions have valid conditions. Use watch windows to monitor active steps and action states. After simulation, download to the PLC and perform live testing with safe speed/jog modes.

Example: Conveyor Belt Control System

Consider a simple conveyor that transports boxes from a loading station to an unloading station. The process has five steps:

  • Step 0 (Initial): Idle – All outputs off.
  • Step 1: Loading – Activate loading gate (solenoid) for 2 seconds to release a box onto the belt.
  • Step 2: Moving – Start conveyor motor; wait until box reaches exit sensor.
  • Step 3: Unloading – Stop motor; open unloading gate for 1 second.
  • Step 4: Return – Close gate and reset counters; return to Idle.

Transitions:

  • T0→1: Start pushbutton pressed AND system ready.
  • T1→2: Timer_Load.DN (2 second delay complete).
  • T2→3: Exit sensor (ON) OR timer if sensor fails (timeout safety).
  • T3→4: Timer_Unload.DN (1 second).
  • T4→0: Always true (immediate return).

Using an SFC, each step and transition is visually clear. The Loading step uses a timer as an action, while the Moving step relies on a sensor. Parallel branches could be added if two conveyors work simultaneously. This modular design allows maintenance technicians to quickly identify where a fault occurs—e.g., if the system hangs on Step 3, they check the unloading timer or gate actuator.

Benefits of Using Sequential Function Charts

  • Graphical clarity – The sequence is visible at a glance, reducing misinterpretation compared to sprawling ladder logic.
  • Modular design – Steps can be developed, tested, and reused independently, speeding up development.
  • IEC 61131-3 compliance – Ensures portability across different PLC brands and reduces training overhead.
  • Natural error handling – Timeout transitions, safety jumps, and watchdog steps can be integrated seamlessly.
  • Parallelism support – Ideal for coordinating multiple axes, robots, or process lines running concurrently.
  • Simplified debugging – Engineers can force steps active/inactive during debugging, isolate problems faster.

For a detailed comparison of IEC languages in real‑world applications, see PLCopen, which maintains guidelines for SFC implementation.

Limitations and Challenges

While SFC is powerful, it has drawbacks:

  • Memory overhead – SFC structures may consume more memory and scan time than equivalent ladder logic, especially with many parallel branches.
  • Vendor implementation differences – Not all PLCs support every SFC feature (e.g., macro steps, forced step transitions). Always check the manual.
  • Not ideal for continuous processes – For analog control loops or high‑speed motion, SFC is often combined with FBD or ST in a hybrid approach.
  • Learning curve – Technicians familiar only with ladder logic may require training to adopt SFC.

Best Practices for SFC Programming

  • Keep steps cohesive – Each step should represent a single, well‑defined state. Avoid “super steps” that try to do too much.
  • Use action qualifiers wisely – Prefer N qualifiers for actions that should stop when the step ends. Use S/R only when a persistent action is required, and document why.
  • Implement a safety layer – Always have a dedicated transition that, on emergency stop, jumps to a safe step (e.g., Idle with all outputs off). Many PLCs allow overriding SFC with a separate safety routine.
  • Comment everything – Even though SFC is graphical, add comments to transitions, actions, and complex conditions. Future maintainers will thank you.
  • Simulate with all edge cases – Test with sensor failures, stuck actuators, and power cycles. Use the PLC’s forcing capability to simulate sensor states.
  • Use sub‑SFCs for repeated patterns – If your process has a recurring sequence (e.g., a pick‑and‑place cycle), encapsulate it as a macro step to reduce duplication.

Comparison with Other IEC Languages

Language Best For When to Use SFC Instead
Ladder Logic Discrete logic, relay replacement When sequence has many steps or parallel branches
Function Block Diagram Continuous control, signal processing When process is state- or step-based, not continuous
Structured Text Complex algorithms, data handling When visual sequence is more important than math

Often, the most effective programs combine SFC for the main sequence with ST or FBD inside the steps. This hybrid approach is common in industry, as noted in resources from Automation.com.

Conclusion

Sequential Function Charts offer a clear, modular, and standardised method for programming sequence‑centric automation tasks. By decomposing a process into steps, transitions, and actions, engineers can design systems that are easier to debug, modify, and expand. Although SFC may require an initial investment in learning and slightly more memory overhead, the long‑term savings in maintenance and reusability make it a cornerstone of professional PLC programming. Whether you are controlling a simple conveyor or a multi‑station assembly line, SFC provides the structure necessary for reliable, efficient, and scalable automation solutions.

To deepen your expertise, explore the official IEC 61131‑3 resources and the PLCopen SFC guidelines. Practice by converting an existing ladder logic sequence into an SFC—you will quickly appreciate the visual clarity and the power of modular step design.