SFC with an E-STOP

BillRobinson

Member
Join Date
Oct 2006
Location
Sydney, Nova Scotia
Posts
185
I'm writing my first SFC code and I'm wondering what the best practice would be for handling an E-stop that sends you to a safe state at any step of the process. Is the best way to do this is to create a selection branch at every transition that sends you to the safe state if the ESTOP bit is ON?

This seems a bit of a pain to add this to every transition, especially if it becomes a large program.
 
First of all.

It depends on application, continuous process is different from discrete machine etc.

It depends on controller. Siemens SFC is different from RockWell SFC etc.
 
you might consider setting up a "Simultaneous" path (possibly of just one step) – which would run independently of the main control branch – and have that step continually monitor the status of the E-Stop ...

then look at using either the SFP (Pause) or SFR (Reset) instructions ... quite possibly you could use one of these in your "monitor" step to "control" the rest of the chart – and (if necessary) tell it where to pick back up again once the E-Stop has been reset ...

a lot depends on how the rest of the program is structured – but the ideas above might be helpful to you ... if not, it would be a good idea to post again – and if possible, post the entire program ...

and just for completeness – from what you've posted, it appears that your E-Stop circuit is already properly "hardwired" and in place ... specifically, you just want the PLC to "monitor" the status of the E-Stop circuit – and to bring the PLC program to a graceful halt in the event of an emergency ... more specifically, the PLC program should NOT be responsible for initiating or controlling the emergency stop action ...

you're probably already well aware of this – but I'm including it here as a part of the discussion for some of the newer members who might read this in the future ...

 
Last edited:
So basically:

[INIT]
+ (ESTOP?)
|
============================
| |
[MONITOR] [CYCLE]
+ (ESTOP?) + (cycle.dn)
| |
[RESET] [WASTE]
| +
| |
| [FLUSH]
| |
| ___
| + +
| | ----> to cycle
============================




With the idea here that we are always in Cycle, waste or flush, unless the estop is pushed.

What about calling the SFC from a JSR based upon the ESTOP



ESTOP
|--|/|------------[JSR: MYSFC]-------|
|
| ESTOP
|--| |------------[JSR: SAFESTATE]---|



 
Last edited:
well, the first questions should be:

(1) if we're in CYCLE when the E-Stop is pressed, do we want to "return" to CYCLE when the E-Stop condition is later cleared (and pick up where we left off)? ... or do we want to "start over" from the very beginning? ...

(2) if we're in WASTE when the E-Stop is pressed, do we want to "return" to WASTE when the E-Stop condition is later cleared (and pick up where we left off)? ... or do we want to "start over" from the very beginning? ...

(3) if we're in FLUSH when the E-Stop is pressed, do we want to "return" to FLUSH when the E-Stop condition is later cleared (and pick up where we left off)? ... or do we want to "start over" from the very beginning? ...

you'll have to nail down those answers before you can go much further ...

suggestion: if you haven't already done so, take a look in the SAMPLES folder that should have been installed with your RSLogix5000 software (do a File Open, etc.) ... there should be a couple of SFC examples in there – and the basic idea of jumping "out of" – and then back "in to" - the chart is covered ... that might be a good place to start ...

 
here's a tip which is very helpful when I'm demonstrating SFC ideas to students ...

first make up a simple Ladder Routine for each of your "steps" ... (three steps = three ladder routines) ... have each of these routines "flash" a separate LED on a spare output module ...

now have each of your SFC steps call ONE of these routines into action ... call a DIFFERENT routine with each step ...

now when you run the SFC, you can watch the LEDs flash and instantly tell exactly which step in the chart is executing ... this is usually a LOT more effective than just watching the "green on the screen" indications ...

IMPORTANT ... set up the flashing action so that the LED is turned ON – more than it's turned OFF ... this will help demonstrate what happens when you exit a particular step of the chart while an output is being driven ON ... depending on how you've configured the SFC, the output will either go off (which is USUALLY what you want) – or else the output will remain in its last state – and occasionally stay ON (which is sometimes a programming faux-pas of gargantuan proportions) ...

 

Similar Topics

Hey. If you haven't already read me, first time I'm building a full project on Rockwell PLC. I started building the sequences last week and I...
Replies
3
Views
141
Hi all. I'm building my first Grafcet using Logix, but I started from another project. From what we usually do with other PLC's, I was expecting...
Replies
3
Views
169
I have a fanuc servo motor and drive that I salvaged from a lathe barfeeder that was headed for the dumps which I'm trying to see if I can get...
Replies
2
Views
173
Hiya, I'm a student who's very new to programming on Studio5000 (Logix Designer - Rockwell Software) and maybe getting some insight or help on a...
Replies
0
Views
97
HI! HOW COULD I OBTAIN THE NAMES OF THE STEPS OF A ROUTINE IN SFC LANGUAGE IN STUDIO5000? Or is there a system variable that gives me those...
Replies
0
Views
356
Back
Top Bottom