Hi everybody
I am new Codesys user. I want to use SFC and supervise and control one Grafcet from another to implement a mini-Gemma. How can I consult in Grafcet 0 if one step of Grafcet 1 is activated? And how can I force it to 0 or 1?
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I force an SFC to a particular step?
Generally, we do not force SFCs to a particular state. Indeed if you want Grafcet0 to change the state of Grafcet1, you would need to program in Grafcet1, an alternative branch, detailing the conditions in which an output of Grafcet0 can change its state
Thank you very much i-campbell for your response.
Thanks to your instructions, I have finally managed to check the status of another step in another Grafcet. The problem is that I had left the name of the steps by default, and that name (or any other for that step) was not accessible from another POU. By declaring with type IecSFC.SFCStepType, I could consult it from everywhere.
I think the flags that you have recommended me, especially SFCInit, SFCReset and SFCPause will come in handy to make a GEMMA guide. I have already tried SFCReset and it produces a reset of the supervised Grafcet; just in the way I needed.
I have just installed Visu-Generator. It looks quite useful.
Perfect.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everybody
I am new Codesys user. I want to use SFC and supervise and control one Grafcet from another to implement a mini-Gemma. How can I consult in Grafcet 0 if one step of Grafcet 1 is activated? And how can I force it to 0 or 1?
Thank you
Angel, welcome to CODESYS, and more importantly, a warm welcome to the forge!
https://help.codesys.com/webapp/_cds_sfc_sfc_flags;product=codesys;version=3.5.15.0
you could also use grafcet1.Step_00.x
Generally, we do not force SFCs to a particular state. Indeed if you want Grafcet0 to change the state of Grafcet1, you would need to program in Grafcet1, an alternative branch, detailing the conditions in which an output of Grafcet0 can change its state
https://store.codesys.com/sfc-visu-generator.html
Thank you very much i-campbell for your response.
Thanks to your instructions, I have finally managed to check the status of another step in another Grafcet. The problem is that I had left the name of the steps by default, and that name (or any other for that step) was not accessible from another POU. By declaring with type IecSFC.SFCStepType, I could consult it from everywhere.
I think the flags that you have recommended me, especially SFCInit, SFCReset and SFCPause will come in handy to make a GEMMA guide. I have already tried SFCReset and it produces a reset of the supervised Grafcet; just in the way I needed.
I have just installed Visu-Generator. It looks quite useful.
Perfect.