Sequential Function Chart

A chart is built from steps, transitions and actions. The active step runs its actions. A transition moves the chart to the next step when its condition is on.

A chart in the editor: initial step ST001 Start, transition TR001, ST002 Fill with an N action, transition TR002 into an AND split, ST003 Mix with an N action and ST004 Heat with a D action side by side, an AND join, transition TR003, then ST005 Drain

What a chart is made of

ElementWhat it doesIts tag
StepOne state. Its actions run while it is active. The initial step, with a double border, is where the chart starts.Status tag: on while active
TransitionMoves the chart from the step above to the step below.Condition tag: your logic turns it on
ActionLadder logic a step runs. Its qualifier (N, P, S, R, L, D) says when.None
AND split and joinRuns several paths at the same time, then waits for all of them.None
OR split and joinTakes one of several paths, then brings it back.None
Dummy stepA step with no actions, to join or space out paths.Status tag: on while active

What happens each scan

  1. Each transition under an active step is checked. It passes when its condition tag is on and the step above has been active for its Minimum active (ms).
  2. The chart moves: the step above turns off and the step below turns on.
  3. Every step's status tag is written.
  4. The actions run, each as its qualifier says.

On the first scan the initial step turns on and its actions run. Transitions are first checked on the next scan.

The chart above, element by element

  • Start is the initial step. The chart is active there when the PLC runs.
  • Transition TR001 moves the chart to Fill when its condition tag turns on.
  • Fill has one action with qualifier N, so it runs on every scan while Fill is active.
  • Transition TR002 leads into an AND split, so Mix and Heat turn on together. Heat has a D action, so it starts after its delay.
  • The AND join waits for both. Then TR003 moves the chart to Drain.

Create a chart

  1. Stop the PLC. Editing is locked while it runs.
  2. In Project Explorer, right-click a program or its Routines folder and choose New Routine…
  3. Type a name. Under Language, choose Sequential Function Chart (SFC), then Create routine.
  4. Drag tiles from the chart palette onto the grid, or focus a tile and press Enter.
  5. Choose Create chart tags to give every step its status tag and every transition its condition tag.

Good to know

  • Use a chart for logic that runs in order. Use ladder or FBD for logic that is checked every scan, such as an interlock.
  • A chart is for learning and simulation, not a safety interlock.

Related