Newbie SFC Question


Join Date
Mar 2023
Denver, CO
Howdy folks. Been doing PLC programming for like 15 years now in LD and ST, but I'm trying to learn SFC now and have a kind of dumb question...

I feel like the answer is "That won't work because the process isn't actually Sequential its right there in the name" but can I have an SFC return to an intermediate step at some point in the sequence instead of back to the initial step?

I guess maybe what I'm doing after typing this explanation out is needing two charts with one triggered by the other? Maybe I need to make two separate routines to have two separate charts?

I attached a 5 minute Visio flowchart of what I'm trying to do.

Screenshot 2023-05-26 101919.png
To be honest, the features depend on which platform you are using for development.
If it's rockwell, you can, but they paywall anything that isn't ladder, which itself is heavily paywalled. But I digress.

Rockwell Automation Publication 1756-PM006K-EN-P - March 2022
Page 25
Misc notes on SFC

Any SFC editor that I am familiar with will easily do what you want. Steps 1 and 3 need a divergence after the step. One transition on each divergence will go to a jump to a specific step.

Allen Bradley's Ladder editor is excellent. Their SFC editor is extremely awkward. Schneiders SFC editor is really good, their ladder editor is almost unusable. Either one can be used to do what you want to do in a very similar way.

SFC implementations seem to differ in the details of what they do on powerup, how to reset the SFC to the initial state, and so on. Try to minimize your use of brand-specific features.

IMHO the various step actions tend to be overly complex and frequently not needed. Most of the SFC that I do involves ladder code for preprocessing inputs, controlling outputs, and so on. Trying to do combinational logic (AND, OR, etc) in SFC is a real bad idea. Use each IEC language for what it is good at and don't try to force-fit something into the wrong language. Don't do loops and matrix operations in ladder - that's what ST is for.

You can't jump from any step to any other step as there are some rules. SFC analysis is a logical reduction process that is used to determine is an SFC topology is valid. You don't have to do it yourself as your compiler will throw an error if your topology is bad - but it is a good idea to understand invalid constructions if you are learning SFC. These include jumps into and out of simultaneous branches and other things.

The PLC class outline download at includes an introductory discussion of SFC analysis starting around page 242. PM me for some free educational software that does it if you want to learn or teach it.

It takes experience to come up with clean SFC charts. If it looks messy - it probably is. Messy SFC may be an indication of improper layering of tasks.
SFC requires a lot of thought drawing pictures before writing code - but no more than well-written ladder. If seems that many people are too quick to hit the keyboard and start clicking and punching before they hit pen and paper. I frequently draw some sort of state diagrams before writing ladder. These diagrams sometimes translate very clearly to SFC.

Process upset conditions like emergency stops can be a challenge with SFC.

Corsair's first law of software stability is 'When a process is at a point where the status of an input is unimportant that input is ignored'. The classic example is the fill cycle on a washing machine followed by the wash cycle. The full switch is needed to advance from the fill to the wash state. Once the machine is in wash the full switch needs to be ignored. SFC frequently makes it much simpler to implement Corsair's first law. It's not as clear with ladder.

The class outline includes some of the theory for translating state transition diagrams to ladder logic using the flip-flop stuff that many of us learned in our digital electronics classes. Trying to be a PLC programmer without these things is like trying to be a concert pianist without first practicing the scales. Each trade involves paying dues in some way - ours is no exception.
Sorry to hijack an old thread, but it's sort of a newbie SFC question too.
Can anybody shed some light on schneider's "Multi Token Mode" SFC?
Is this a true multi-threaded system or is there some sort of prioritising? I have searched manuals and online and there is limited information that i can find.

Similar Topics

Hello all, I'm a new member here. I've joined as I want to learn about PLC programming. I've got a few questions to begin with. To get me...
Hello. New to Unity and had a couple quick questions. Can a Modicon M340 output to a small multiline LCD screen and not a full HMI?
Hi. I'm learning AOI programming in RSLogix 5000. I created an AOI with several input and output parameters but when I choose the AOI in the main...
Good morning, I've had an inverter fail with firmware revision 5.002, the only spare is Rev 7.001, when updating the project with the new...
Hi all, not sure if this is a "thing" but I was hoping I could find out if there's anyone out here willing to supply me with live training. Phone...
Top Bottom