Grafcet (SFC): Getting the current state of the state machine

simplelogix

Member
Join Date
Sep 2003
Location
Auckland
Posts
31
Hello Enlightened Engineers,

I am using PL7 PRO V4.5 (made by Schneider Electric) on a Premium PLC.

I have to debug existing code in Grafcet and the mission is quite unpalatable. The code has no comments and the states of the state machine(s) do not have any labels attached to them. Also the step numbers are all over the place eg. step 5 follows step 18 which then jumps to step 33 etc.

My immediate task is to get the state number of the state machine. i.e. I am looking for the equivalent of

current_state := X1.state

where "X1.state" is the current active state (X1 being the state machine).

I looked through all the grafcet help files and couldn't find a way to get this. Please dont tell me to write 100 rungs of code in ladder for 100 states!

Thanks for your help.
 
I gather you have had to upload the program and there are no comments or a really slack contractor?
Ain't grafcet wonderful?
Cannot help you with Schneider PLCs I am afraid, I will NOT use them.
 
Well I haven't had to upload the program but when someone else did before I joined this place. And the story down the grapevine is that the original program (with comments and all) was not to be found. Since then this program which has been keeping the factory going has been chopped and changed to such an extent that logical thought is almost not possible!

And yes, after having worked on the Schneider PLC, I must say I am not too impressed. I am more a Rockwell man.
 
SFC Step Number

Having used PLC Pro V4.2....I'm not aware of being able to determine the active step number other than examining the individual ebool bits (X1.1...etc). But I'm sure you're already aware of this.

One possible alternative is to setup a ST program with a "for loop" that uses indirect addressing. I've never tried this but it should work. For example, X1.0[pointer] and then move the point value into the "current_state" word if the bit is on. The value of the pointer should go from 0 to the maximum step number used in the program. I don't like using indirect addressing but this will save you from having to program every single rung.

On a side note, I was in Auckland this time last year. Loved the city. Got to jump off the Sky Tower and hit the surf at Muriwai and Piha beach.
 
Hi Sticks,

Thanks for the information. I had considered indexing through the loop as you suggested. It is not something that I really want to do.

The current PLC software drives a servo (again a Schneider Lexium on FIPIO bus) and this servo keeps throwing up a warning bit. Without making modifications to the current software, I want to know which state is active when the bit goes high.

Oh cool, glad that you enjoyed Auckland. I havent jumped off the Sky Tower yet. Am not that brave! I have been to Toronto and Vancouver a few times. If Canada wasn't that cold, I really wouldn't mind relocating. I did spend a few days at New Foundland too, on a project. It was fun.
 

Similar Topics

Hi Does anyone know of a nice to use (and possibly free) package (say like visio) that I can use to draw SFC charts for inclusion in a word...
Replies
12
Views
16,137
I have reviewed the IEC 1131 documentation and previous posts, and cannot find a way to ensure a transition only executes if it's true for a...
Replies
2
Views
5,468
Hello everyone, Please forgive my ignorance, but I am new to the field of PLC programming. I would like to know if RSLogix 500 could be used to...
Replies
6
Views
10,867
I was looking for free grafcet software, I finally found grafchart see here: http://hubpages.com/hub/Grafchart_Grafcet_SFC_software Anybody uses...
Replies
1
Views
2,463
I’ve found SFCEDIT by http://stephane.dimeglio.free.fr/sfcedit/en/ a simple and reasonably priced Grafcet Editor for planning and documenting...
Replies
2
Views
2,462
Back
Top Bottom