SFC
Sequential Function Chart (SFC) is a graphical programming language for PLCs and industrial control systems under the IEC 61131-3 standard. The language is designed for sequential process control, where processes are broken down into steps, transitions and actions.
SFC is widely used in Process Automation, machine building, batch systems and complex industrial installations where processes pass through a clear sequence of states.
Typical applications:
- Batch processes
- Machine cycles
- Start-up procedures
- Shutdown sequences
- Recipe management
- Robot sequences
- Process automation
SFC combines visual process structures with other IEC 61131-3 languages such as:
SFC therefore often acts as the higher-level orchestration layer on top of underlying logic and control engineering.
⚙️ What is SFC
SFC describes processes as a series of consecutive steps.
The basic components are:
| Component | Function |
|---|---|
| Step | Process state |
| Transition | Condition between steps |
| Action | Logic to execute |
| Branch | Parallel paths |
| Jump | Jump to another step |
Basic example:
Start ↓Start motor ↓Conveyor active ↓Detect product ↓Stop
Each step represents a process state.
🧱 Structure of an SFC program
An SFC consists of:
- Initial steps
- Active steps
- Transitions
- Actions
- Sequences
Example:
[Step 1] ↓ Condition TRUE[Step 2] ↓ Condition TRUE[Step 3]
A transition only occurs when the transition condition is true.
🔄 Steps
A step represents a state within the process.
Examples:
| Step | Function |
|---|---|
| Idle | Waiting |
| Fill Tank | Filling |
| Heat Process | Heating |
| Mixing | Mixing |
| Drain | Emptying |
A step can:
- Execute actions
- Activate outputs
- Start timers
- Evaluate interlocks
⚡ Transitions
Transitions determine when the process moves to the next step.
Example:
TankLevel >= 90%
Or:
TimerExpired = TRUE
Transitions are crucial for controlled process flows.
🎛️ Actions
Actions contain the actual control logic.
Examples:
- Start motor
- Open valve
- Activate alarm
- Change PID setpoint
Actions are often written in:
SFC therefore typically acts as the higher-level sequence layer.
🏭 SFC in industrial automation
SFC is widely used in processes with fixed sequences.
Batch processes
In batch installations:
Fill ↓Mix ↓Heat ↓Cool ↓Drain
Widely used in:
- Chemicals
- Food & beverage
- Pharmaceuticals
- Water treatment
Machine control
For:
- Production cycles
- Robot sequences
- Packaging machines
- Assembly lines
Process installations
For:
- Start-up procedures
- Shutdown sequences
- CIP processes
- Safety procedures
🧠 Parallel sequences
SFC supports parallel process flows.
Example:
┌→ Conveyor 1Start ──┤ └→ Conveyor 2
This allows several processes to run concurrently.
Applications:
- Parallel production lines
- Multi-tank installations
- Robot coordination
🔁 Alternative branches
SFC supports conditional process paths.
Example:
IF ProductType = A → Route AELSE → Route B
This enables flexible production processes.
⏱️ Timing and real-time behaviour
SFC runs within the cyclical PLC scan.
Important parameters:
| Parameter | Typical value |
|---|---|
| Scan time | 1-100 ms |
| Transition latency | Low |
| Determinism | High |
| Jitter | Limited |
Real-time behaviour remains important for:
- Machine safety
- Synchronisation
- Process stability
⚙️ State machines and SFC
SFC closely resembles state machine models.
Each step represents:
- A state
- A process status
- An operational phase
Benefits:
- Clear process structure
- Clear state models
- Easier troubleshooting
- Visual process flows
🔌 Integration with PLC architectures
SFC is often combined with other programming languages.
Typical architecture:
| Layer | Technology |
|---|---|
| Sequences | SFC |
| Logic | Ladder Logic |
| Control engineering | FBD |
| Complex algorithms | ST |
This hybrid model is standard in modern PLC platforms.
📡 Integration with SCADA and HMI
SFC processes provide status information to:
Typical visualisations:
| Data | Use |
|---|---|
| Active step | HMI |
| Batch status | MES |
| Alarm status | SCADA |
| Process history | Historian |
Operators can see in real time which process phase a plant is in.
🛡️ Safety functions
SFC is regularly used in safety procedures.
Examples:
- Controlled shutdown
- Emergency sequences
- Safety interlocks
- Start-up validations
In safety systems, additional requirements apply under:
| Standard | Description |
|---|---|
| IEC 61508 | Functional safety |
| IEC 61511 | Process safety |
| ISO 13849 | Machine safety |
| IEC 62061 | Safety systems |
Safety-critical sequences often run on a Safety PLC.
⚡ SFC in batch control
SFC aligns well with ISA-88 batch architectures.
Examples:
- Recipe steps
- Batch states
- Procedure management
- Unit phases
Many batch systems combine:
🧪 Diagnostics and troubleshooting
SFC provides strong visual diagnostics.
Operators can immediately see:
- Active steps
- Stuck transitions
- Process status
- Sequence errors
Common problems:
| Problem | Possible cause |
|---|---|
| Stuck step | Transition never TRUE |
| Oscillating sequence | Poor state logic |
| Unexpected jumps | Incorrect branches |
| Race conditions | Parallel logic |
| Deadlock | Incorrect transitions |
⚠️ Common design errors
Over-complex sequences
Large monolithic flows become hard to read.
Poor transition logic
Insufficient validation causes instability.
No fault handling
Fault states are often missing.
Too many parallel branches
Parallel processes greatly increase complexity.
Best practices:
- Modular sequences
- Clear state names
- Fault handling
- Timeout protection
- Clear transition conditions
🔐 Cybersecurity risks
SFC programs are an important target in OT attacks.
Attackers can:
- Manipulate process flows
- Block shutdowns
- Skip safety steps
- Disrupt production
Risks:
- Unauthorised engineering
- Malware
- Manipulation of PLC code
- Insider threats
Advanced malware such as Stuxnet demonstrated how process sequences can be modified invisibly.
🧱 Security measures
Important security measures:
| Measure | Purpose |
|---|---|
| Network Segmentation | Isolation |
| Application Whitelisting | Software control |
| MFA | Authentication |
| Logging | Auditing |
| Version Control | Change management |
| Patch Management | Vulnerability reduction |
| Backup | Recovery |
PLC engineering workstations often fall under strict Change Management.
🌐 SFC in Industry 4.0
In Industry 4.0, SFC remains important for process orchestration.
New applications:
- Virtual PLCs
- Digital twins
- AI-driven workflows
- Edge orchestration
- Flexible production
SFC supports the transition to software-defined OT architectures.
📈 Benefits of SFC
Key benefits:
- Very clear process structures
- Strong for sequential processes
- Good troubleshooting
- Clear status models
- Modular design
- Good batch support
⚡ Limitations
Key limitations:
- Less suited to complex calculations
- Large flows can become complex
- Parallel logic quickly becomes hard to read
- Less suited to purely continuous Control Loop
SFC is therefore usually combined with:
