Getting a handle on SFC,FB,STX over Ladder?

kdcui

Lifetime Supporting Member
Join Date
Dec 2007
Location
USA
Posts
386
I'm trying to get a handle on how to discern the "appropriate" times and situations to implement SFC, FB, and STX over ladder logic.

I've read through the respective portions of the L5K programming manual, and read some old posts on the forum. However I can't seem to shake the notion that whatever can be done in SFC or otherwise can also be done in ladder. Here is my general understanding of things, and maybe someone can help connect the dots.

From my understanding SFC is really only applicable when you have some type of sequential process or state machine. Or should SFC be considered for other processes? I still feel like even in a sequential process, I can accomplish the same in ladder logic, but just not have the ability to be looking at a visual representation of the execution path from a "bird's eye" view.

If the SFCs can be used for sequential processes, how is that different than using the Phase Manager to manage them?

To me, I'm not sure where else I would use STX other than to compliment steps in an SFC, or perhaps to run some complex number crunching or algorithim, as opposed to using a CPT instruction.

I can understand a bit more where Function Blocks may fit into a program. Rather than paste similar rungs to operate a VFD or other device, and scatter them around my ladder logic, I can have all the associated devices for a given portion of my program stored on multiple sheets, thereby organizing the program more effectively.

Are there any instances in which the efficiency of the program (scan time, execution) will increase through the use of SFC or other over ladder logic?

Thanks.
 
Last edited:
I can give you an example (for me anyway) where STX is superior to Ladder. For/Next or Do/While operations with indirect/indexed addressing within the loop. You 'CAN' do the same in ladder, but for readability, it is far superior in STX, IMHO.

As a more exacting application, I have a raw material handling system with 30 storage silos that can have any particular raw material type stored in it at once. The delivery system blends out of 1 to 8 of these silos at once (10% of 1, 20% of 2, etc.). The recipes are stored by raw material type, not location, so whenever a recipe is downloaded to upto 8 day hoppers, the code must look at all the day hoppers, the 8 raw material type blend for each of those 8 hoppers and the 30 silo locations where those types are stored. Three nested loops with indexed addressing accomplishes this quickly and nicely with minimum code.

As for SFC, I agree with you and have never used them. I do step logic (grafcets) within ladder and it is just as easy to maintain and troubleshoot.
 
Thanks, I think I agree with you about iterating loops in STX. Coming from a C/C++ background I am probably more comfortable with that.

One thing that bugs with SFC is that it seems particularly redundant for most applications when the Phase Manager is included in L5K. I could understand on a larger system that each Phase could have it's own individual steps composed in SFC, but like you said the SFC code could be easily done in ladder anyways. Or maybe I am failing to look at things form a larger perspective.

I think half of the issue might be preference, though I can see where SFC might be a bit more readable to someone new to PLCs
 

Similar Topics

The application was working in Twincat 4022.16 Used VM for offline. recently changed the laptop and the getting the error with Message as below...
Replies
0
Views
52
We are using wincc scada WinCC system software V7.5 SP2 , connected to few plc . Past 3 weeks we getting this alarm continously when we checked...
Replies
0
Views
79
I am very, very new to PLCs. I only have experience with Picos, but I knew enough to save this from the dumpster. Apparently, everything on it is...
Replies
13
Views
610
Hi, I tried today to get RD3A and WR3A instructions to work on the PLC and it didn't work, but it worked in simulation. I followed the clone...
Replies
18
Views
1,395
Good morning guys; Im new at AB plc, and i just need help about a table or a list called something like "exchange data table" in French it is...
Replies
4
Views
772
Back
Top Bottom