You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

Thread Tools Display Modes
Old May 26th, 2023, 12:20 PM   #1
United States

JohnBomb is offline
JohnBomb's Avatar
Join Date: Mar 2023
Location: Denver, CO
Posts: 2
Newbie SFC Question

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.
Attached Images
File Type: png Screenshot 2023-05-26 101919.png (11.2 KB, 56 views)
  Reply With Quote
Old May 26th, 2023, 02:02 PM   #2

JTCat is offline
Join Date: Nov 2020
Location: Republic of Artsakh
Posts: 175
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
  Reply With Quote
Old May 26th, 2023, 11:06 PM   #3
Lifetime Supporting Member
United States

Corsair is offline
Join Date: Dec 2020
Location: Missouri
Posts: 188
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.
  Reply With Quote
Old May 26th, 2023, 11:17 PM   #4
Lifetime Supporting Member
United States

Corsair is offline
Join Date: Dec 2020
Location: Missouri
Posts: 188
I really like the RW Lewis text - it's pure 1131 without brand-specific baggage. I first learned about logical reductions for SFC analysis from it.
  Reply With Quote
Jump to Live PLC Question and Answer Forum

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
S7-300 Analog IO Scaling (newbie question) minerman LIVE PLC Questions And Answers 10 November 26th, 2012 10:31 AM
PLC newbie question mike47 LIVE PLC Questions And Answers 5 August 26th, 2012 05:48 AM
DC power supplies and PLC's - newbie question ab2013 LIVE PLC Questions And Answers 2 August 13th, 2012 08:12 PM
Photoelectric Sensor (PLC Newbie Question) tim_callinan LIVE PLC Questions And Answers 5 May 24th, 2012 06:20 PM
Newbie update and a question or two caffeinencsu LIVE PLC Questions And Answers 2 November 30th, 2003 09:24 AM

All times are GMT -4. The time now is 05:23 AM.