jrupp82

Sequential Function Charts (SFC)

9 posts in this topic

I know that the most common programming languages are Ladder, Structured Text, and Function Block, but I'm curious how many forum members have experience with Sequential Function Charts?  I just took some Rockwell training and asked the same question there, the answer I got was that SFC's are more common in Europe.

I've been playing around a bit with them, as I think they would be good for programming the Automatic Mode of a State machine.  Thoughts?  I'm curious for some Pros & Cons from other members?  

Thanks!

Share this post


Link to post
Share on other sites
On 01/05/2017 at 5:14 AM, jrupp82 said:

I'm curious how many forum members have experience with Sequential Function Charts? 

I guess the overwhelming response answers that question.

First, they are not applicable in every situation. However, with the appropriate application, they are very helpful in program organisation and reduce or even eliminate tediously long and complex rungs full of interlocks since the sequence logic is embodied in the chart. They also aid maintenance, since it is immediately obvious where a sequence is hung up.

Your idea to implement a state machine would be appropriate. I have used SFC's for bread mixers, shrink wrappers, carton machines and probably some less appropriate applications as well. My advice is don't try to incorporate  too much in a single chart.

AB's initial attempt at implementing SFC's was with the introduction of the PLC5 (5/15 & 5/25) and was virtually useless. Likely, many people tried it out, found it useless and just stayed away. The second attempt with the 5/250 was a marginal advance but still too limited to be useful. With the 5/250, you were obliged to have a master SFC -- this typically ended up as a chart with one step that called a ladder file with all the logic. Finally, with the third attempt (5/20 /30 /40 /60) they came up with a very useful and powerful implementation. Diehards like myself started using them, but most continued to stay away. The ControlLogix implementation was a long time coming, but similar to the NP PLC5. And CLX introduced the capability to edit the chart online, though arguably that shouldn't be necessary.

 

1 person likes this

Share this post


Link to post
Share on other sites

I have not used SFC in Rockwell PLCs, but have used them extensively in CodeSys based systems. The amount of time spent programming state machines using SFC vs ladder is reduced by probably 5 fold. Inserting and deleting states in SFC can take seconds versus minutes in the same thing with ladder. SFC self-documents the flow of the program. As opposed to a state machine in ladder, you will need to manually draw a state transition diagram. In my opinion, SFC is the proper tool for state machine programming.

Share this post


Link to post
Share on other sites
Just now, arj3090 said:

I have not used SFC in Rockwell PLCs, but have used them extensively in CodeSys based systems. The amount of time spent programming state machines using SFC vs ladder is reduced by probably 5 fold. Inserting and deleting states in SFC can take seconds versus minutes in the same thing with ladder. SFC self-documents the flow of the program. As opposed to a state machine in ladder, you will need to manually draw a state transition diagram. In my opinion, SFC is the proper tool for state machine programming.

This is the feedback I was looking for.  It seemed like SFC's would be a great tool for this, for all the reasons you mentioned.  In addition, when monitoring the program online, it provides a clear indication of where the logic is at.  I'm definitely going to forge ahead with implementing them in my programs.  I think they could be much easier to teach troubleshooting to non-programmers as we progress.  

Share this post


Link to post
Share on other sites

Another thing to consider is the software licensing.  We have about 7 seats of Studio 5000 standard, which cost us about $3500 each the last time we quoted them.  The next level up that includes the FBD/SFC/ST languages would cost about $6500/seat.  A language pack plug-in license cost about $2300/seat.

So, if you're going to have multiple people needing access to SFC code at the same time, be aware of the licensing costs.  If you're programming for a customer, be aware that they may not have the licenses to open SFC and will likely be upset with you if you include it without running it past them first.

 

1 person likes this

Share this post


Link to post
Share on other sites

Hi,

yes you are right, it's used in Europe but it's not so frequent as you may think. Mostly it's used by French, because SFC is compatible with French programming standard called "Grafcet" (EN60848).  

According my experience SFC is not so bad for overview only in case if you keep function in some reasonable size (number of steps and parallel branching), otherwise it becomes quite messy. For "not programmers" if you use SFC with very good descriptions it's very easy to understand machine functionality. Also in on-line mode you can find this very easy to understand, but it depends on process (if it's very fast process you will end up anyway with trending). Main reason why it's so popular is fact that (I'm not sure about US) in Europe it's quite common that you will receive documentation (flow chart - organic analysis) which completely match flow chart in program. For old Siemens Step7 is possible to export this flow chart to HMI, so you can share flow chart with i.e. maintenance and with some documentation they don't need any computer for basic analysis.

According my experience I prefer simple LAD functions according Grafcet std, what is also very easy to understand, it's faster to made and you don't need any special licence as you will need for SFC (only for Enterprise version if Rockwell doesn't changed this). When you are making SFC you will suffer for long time till it goes finally under your skin, than it's OK but still as I thing slower than LAD. Sure you have some embed functions like timer in each Step, that will ensure minimal time to wait in this step, but if you are programmer you will use it minimally. I have used also TIA portal GRAF (more difficult and complex in compare with AB) it's probably better, but any way I prefer simplicity for editing, access and overview. As a programmer I can write it in ST (Structure text) but I have to keep on my mind about people who will work with it after me.

Radek

Share this post


Link to post
Share on other sites

We use these a fair amount in turbine/reciprocating gas compressor use.

 

Their is an overall status SFC and individual state SFC's (Normal Shutdown, Fast Shutdown, etc.)

Share this post


Link to post
Share on other sites

I've used them a few times, in my opinion the Pros are:

-Easy to see where you are in a sequence, easy to see where a sequence is hung up as Gerry said

-Easy to understand for programmers who aren't used to ladder logic (like Visual Basic programmers)

Cons:

-Programmers who are used to ladder logic (like me) find them difficult to understand

-if there are a lot of different "branches" in your sequence it gets messy

-Hard to print out on paper since you either have to fit everything on one page or print on several pages, which makes it hard to view the sequence

-You may have to pay more for your RSLogix license if you want SFC capability as Joe mentioned

Share this post


Link to post
Share on other sites

one create FSM in any language... if someone takes 5x longer to do it in one language instead of another, that is not testament to language but level of his/her experience.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now