Sequential Function Chart
A sequential function chart (SFC) is the IEC 61131-3 graphical PLC programming language built on steps, transitions and parallel/selective branches. SFCs encode the fast-loop control logic that lives inside equipment modules and phase implementations — the layer that physically opens valves, ramps setpoints and reads sensors. SFCs sit beneath the ISA-88 PFC layer: where the PFC says 'Heat to 65 °C', an SFC inside the reactor's equipment module decides how the jacket actually gets there.
01What an SFC is
IEC 61131-3 specifies five PLC programming languages: Ladder Diagram (LD), Function Block Diagram (FBD), Structured Text (ST), Instruction List (IL, deprecated) and Sequential Function Chart (SFC). SFC is the one designed explicitly for sequential, state-machine-driven logic — the natural fit for batch phase implementation.
- Steps — boxes representing active states; each step holds 'action blocks' that execute while the step is active.
- Transitions — boolean conditions on the lines between steps; when true, the predecessor deactivates and successor activates.
- Initial step — the entry point; activated when the SFC begins.
- Parallel divergence/convergence (double horizontal bars) — multiple branches active concurrently.
- Selective divergence/convergence (single bars with guard transitions) — exactly one branch taken.
- Action qualifiers — N (non-stored), S (set/stored), R (reset), P (pulse), D (delayed), L (limited).
02SFC vs PFC — different layers, similar look
Both languages share visual vocabulary — steps, transitions, parallel/selective branches — which causes confusion. The layer is the discriminator:
| Aspect | PFC | SFC |
|---|---|---|
| Standard | ISA-88 / IEC 61512 | IEC 61131-3 |
| Runtime | Batch manager / MES | PLC scan loop (ms) |
| Scope | Procedure → Phase | Inside a phase or equipment module |
| Materials and lots | Tracks them | Does not |
| Audit trail target | 21 CFR 211.188 batch records | PLC change control + audit log |
| Owner | Process / formulation | Controls engineering |
Practical pattern: PFC commands a phase; phase implementation is an SFC in the equipment module that ramps the jacket, watches the temperature loop and signals completion back to the PFC.
03Validation and change control
- SFCs in GMP equipment are GAMP 5 Category 5 (custom configuration of standard product) — full V-model validation expected.
- Every step and transition is testable; OQ scope enumerates all paths including selective and parallel branches.
- PLC code change control mirrors recipe change control — versioned, reviewed, approved, audit-trailed.
- Backups of SFC source taken at every approved baseline; restore path validated.
- Online edits (live PLC modification) explicitly forbidden in GMP — all changes through controlled deploy with change record.
04Common SFC patterns
- Ramp-and-hold — initial step opens jacket valves at calculated rate; transition fires on temperature within band; next step holds with PID setpoint.
- Charge-with-confirmation — step commands charge valve open and totaliser start; transition fires on target weight; selective branch on over/under-tolerance routes to alarm.
- Parallel start — divergence into agitator-ramp branch and jacket-heat branch; convergence after both complete.
- CIP cycle — sequential rinse → caustic → rinse → acid → final rinse steps with parametric IPCs (conductivity, temperature, time) at each transition.
- Watchdog — every step has a max-duration transition that branches to an exception path if exceeded.
05Coexistence with interlocks
SFC steps issue commands; interlocks decide whether the commands actually execute. The architectural rule: never bake interlock logic into the SFC transition. Interlocks are independent, always-on guards on control modules. The SFC sees "command refused, interlock active" and routes to its exception path. This keeps safety logic provable and independent of recipe variations.
06Cross-industry examples
- Pharma — reactor heat phase SFC ramping jacket and watching for vessel temperature within band; tablet press SFC running start-up sequence (clear, slow speed, ramp to setpoint, full speed).
- Biopharma — bioreactor inoculation SFC sequencing inoculum line CIP → SIP → connection → transfer → flush.
- Food — pasteuriser SFC running flow-divert valve logic on temperature dip, looping back through hold tube for re-pasteurisation.
- Cosmetics — vacuum kettle emulsification SFC ramping agitator speed in stages while monitoring viscosity.
- Chemicals — distillation column SFC managing reboiler ramp, reflux ratio adjustment and product cut decisions.
07Common mistakes
- Recipe parameters hard-coded into the SFC rather than received from the PFC — every parameter change requires PLC redeploy.
- Material-state tracking inside SFC — wrong layer; SFCs do not know about batches or lots.
- Interlocks coded into SFC transitions — coupling safety to recipe logic.
- Online edits during production — undermines GMP and creates uncommitted state.
- SFC steps without watchdog transitions — phases hang silently.
- Action qualifier misuse — S without matching R leaves outputs stuck.
- SFC complexity beyond ~20 steps — refactor into nested SFCs or rethink the equipment-module decomposition.
08How V5 Ultimate handles SFC delegation
Frequently asked questions
Q.Can SFCs run on something other than a PLC?+
Yes — soft-PLCs, IPCs and even some MES platforms execute SFCs. The role is the same: fast-loop sequential logic. Hardware is implementation detail.
Q.Should I write everything in SFC?+
No. SFC is right for sequential state-driven logic. Continuous control (PID loops, signal conditioning) belongs in FBD; logic-heavy non-sequential code belongs in ST or LD. Choose the language that matches the problem.
Q.How do I version-control SFCs?+
Source-export to a text format (most vendors support XML or proprietary text export) and store in a controlled repository. Diffs at the source level are the only path to reviewable change control.
Q.What is an action qualifier and when do I use which?+
Qualifiers control when an action runs within a step's activation. N (non-stored) runs while step is active; S (set) latches on entry; R (reset) latches off; P (pulse) runs once on entry; D (delayed) runs after delay; L (limited) runs for fixed duration. Use N for most cases, S/R sparingly for outputs that must persist across steps.
Q.How does this relate to ISA-88 phase state model?+
The SFC implements the phase's behaviour; the phase state model tells the SFC which super-state it is in (Running, Holding, Aborting). The SFC's Hold response is the choreography that transitions safely to Held state and waits for Restart or Stop.
Primary sources
Further reading
V5 Ultimate ships with the Sequential Function Chart controls already wired in — audit trail, e-signatures, validation evidence. Free trial, no credit card, onboard in days, not months.
