Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Forcing Grafcet

angel
2020-04-24
2020-04-25
  • angel - 2020-04-24

    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

     
  • i-campbell

    i-campbell - 2020-04-24

    Angel, welcome to CODESYS, and more importantly, a warm welcome to the forge!

    1. Consult if one step is activated: You could use grafcet1.currentstep SFC flag
      https://help.codesys.com/webapp/_cds_sfc_sfc_flags;product=codesys;version=3.5.15.0
      you could also use grafcet1.Step_00.x
    2. 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
    3. Have you seen this for showing it on your visu?
      https://store.codesys.com/sfc-visu-generator.html
     
  • angel - 2020-04-25

    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.

     

Log in to post a comment.