🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Manufacturing & Marine › Robotics / Mechatronics › Programmable Logic Controllers for Mechatronics › Lesson 8
MFG-MECH15-02 · Lesson 8 · 10 clock hours · demo

Sequential Function Charts and Program Organization

Objective. Students will trace the execution of a sequential function chart (SFC) through its steps and transitions and modify an existing SFC to add a new step and transition without disrupting existing sequences.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by a licensed engineer or certified journey-level tradesperson or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

What Is a Sequential Function Chart?

A Sequential Function Chart (SFC) is one of the five IEC 61131-3 programming languages. Where ladder diagram excels at combinational logic, SFC is purpose-built for processes that move through a defined series of states — exactly the kind of step-by-step motion you see in pick-and-place stations, conveyor indexers, and packaging machines. An SFC breaks a process into steps and transitions. Only one step (or a small set of parallel steps) is active at a time. When the condition on a transition becomes TRUE, the PLC deactivates the current step and activates the next one.

Anatomy of an SFC

Steps are drawn as rectangles, each labeled with a name and number (e.g., S1_Home, S2_Pick). Inside or beside each step you attach actions — output coils, subroutine calls, or function block invocations that execute while that step is active. Actions carry a qualifier: N (non-stored, active only while the step is active), S (set, latches ON), R (reset, latches OFF), D (time-delayed), L (time-limited), and others defined in IEC 61131-3.

Transitions appear as horizontal lines between steps, each with a Boolean condition written beside it. The PLC scans every active step's outgoing transition every scan cycle. As soon as the condition is TRUE, control passes to the next step. Common transition conditions include a sensor input turning ON, a timer done bit (TDN), a counter reaching a preset, or a combination written in ladder or structured text.

An initial step (drawn with a double border) marks where execution begins at program startup or after a reset. A jump or looping connection at the bottom of the last step returns control to the initial step, creating a repeating cycle.

Tracing the Home → Pick → Place Example

Consider a three-step SFC for a simulated pick-and-place station:

1. S1_Home — the arm rests at the home sensor. Action N: energize the home solenoid. Transition: `Pick_CMD AND Home_Sensor`.

2. S2_Pick — the arm moves to the pick position and the gripper closes. Action N: extend pick cylinder, energize gripper. Transition: `Part_Detected AND Gripper_Closed`.

3. S3_Place — the arm moves to the place position and the gripper opens. Action N: retract pick cylinder, move to place position, de-energize gripper. Transition: `Place_Sensor AND Gripper_Open`.

A jump from S3_Place back to S1_Home closes the loop. On your printed worksheet, shade only the rectangle of the currently active step as you watch the simulation. Notice that outputs tied to inactive steps are automatically de-energized when those steps are not active — a key safety advantage over unstructured ladder code where forgotten outputs can remain ON.

Adding a Fourth Step: Inspect

Your modification exercise inserts S4_Inspect between S3_Place and the return to S1_Home. The inspect station uses a vision sensor or a simple part-present sensor to confirm the placed part before the next cycle begins.

After downloading, use online monitoring to watch the step status bits. Most PLC platforms display the active step highlighted in color. Verify that the Inspect step activates immediately after the gripper opens at the place position and that it holds for the expected dwell time before transitioning home. Timing tolerance for this exercise is ±0.5 s of the preset.

Program Organization Units (POUs)

Industrial PLC programs are not one giant block of code. IEC 61131-3 defines Program Organization Units:

A two-level architecture for this station might look like: Main LD routine handles safety interlocks and calls the SFC sequence routine; the SFC routine calls a timer subroutine or invokes TON function blocks for timed transitions. Keeping safety logic at the top level ensures it executes every scan regardless of which SFC step is active.

Safety Considerations

Before working on or near the pick-and-place station, apply OSHA 29 CFR 1910.147 lockout/tagout procedures: isolate all energy sources (electrical, pneumatic), apply personal locks, and verify zero energy state before reaching inside the cell. Verify absence of voltage with a calibrated meter following NFPA 70E practices. Machine guarding per OSHA 1910.212 must remain in place during normal operation; safeguarding requirements for the robot cell follow ANSI/RIA R15.06 / ISO 10218. Never rely solely on a software-controlled SFC as the only safeguard — hardware safety relays or a safety PLC must provide independent E-stop and gate-interlock circuits per NFPA 79.

Key terms8

Sequential Function Chart (SFC)An IEC 61131-3 PLC programming language that organizes control logic into steps and transitions, executing code only in the active step and advancing when a transition condition becomes TRUE.
StepA named state in an SFC, represented by a rectangle, during which associated actions are executed; only active steps run their actions.
TransitionA Boolean condition between two SFC steps; when the condition is TRUE and the preceding step is active, control passes to the next step.
Action qualifierA code (N, S, R, D, L, etc.) attached to an SFC action that defines how the output behaves — for example, N means the output is active only while the step is active.
Program Organization Unit (POU)A self-contained block of PLC code defined by IEC 61131-3; types include Programs, Function Blocks, and Functions, each with specific roles and memory behavior.
Function Block (FB)A reusable POU that retains internal state between scans; examples include TON timers and PID controllers, which can be instantiated multiple times with independent data.
Initial stepThe designated starting step of an SFC, drawn with a double border, which is active when the program first enters the SFC or after a reset.
Online monitoringA PLC software feature that displays live program status — including active SFC steps, current bit states, and timer values — while the controller is running, allowing real-time verification.
In class: Instructor demonstration: show a three-step SFC (Home → Pick → Place) controlling a simulated pick-and-place station; students trace step activation and transition conditions on a printed SFC diagram as the program runs, highlighting active steps in real time. · Modification exercise: students add a fourth step (Inspect) with a timed transition between Place and Home; download and test; verify new step activates correctly using online monitoring. · Program organization discussion: instructor explains program organization units (POUs) — main program, subroutines, function blocks — and students sketch a two-level program architecture (main LD → timer subroutine → SFC sequence) on paper, then compare with a partner.
Materials: PLC programming software, PLC trainer with pick-and-place simulation fixture (or software simulation), printed SFC diagram worksheets, projector
Check: Students correctly trace all three original steps on the printed diagram (instructor checks); modified SFC with new Inspect step runs without faulting and transition timing is within ±0.5 s; architecture sketch reviewed by instructor.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Programmable Logic Controllers
1. In a Sequential Function Chart, what must be TRUE before the PLC deactivates the current step and activates the next step?
Programmable Logic Controllers
2. Which IEC 61131-3 action qualifier causes an SFC output to be active ONLY while its associated step is active, and automatically turns OFF when the step deactivates?
Programmable Logic Controllers
3. A technician adds a new Inspect step between Place and Home in an existing SFC. After downloading, the Inspect step never activates. Which is the MOST likely cause?
Programmable Logic Controllers
4. Which IEC 61131-3 Program Organization Unit type retains internal state (memory) between scan cycles and can be instantiated multiple times with independent data?
Programmable Logic Controllers
5. In a two-level program architecture, safety interlock logic is placed in the main LD routine rather than inside the SFC routine. What is the PRIMARY reason for this design choice?
Safety
6. Before a technician reaches inside a pick-and-place robot cell to adjust a sensor, which regulation requires that all energy sources be isolated and locked out, with absence of energy verified?
Programmable Logic Controllers
7. A student is using online monitoring to verify the new Inspect step. The step activates correctly but the transition to Home occurs 1.8 seconds earlier than the 4.0-second TON preset. Which is the MOST likely cause?
Safety
8. Which safeguarding standard specifically addresses the safety requirements for industrial robot cells, including safeguarding devices and collaborative operation boundaries?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.