SFC: Conditions on 1 IEC action

  • yann2021

    yann2021 - 2021-03-31

    Hello all,

    I am using Codesys v3.5 and I would like to make the following SFC in Codesys (see attached file).

    No problem to create steps, transitions and actions, however I can't find how to put a condition to an IEC action. In the example above "Reculer P1" if P1 is not backwards (NOT P1 en arrière) for example.

    Thank you in advance for your help.

  • i-campbell

    i-campbell - 2021-03-31

    You could create an "Action" beneath your POU in the device tree, like in this picture from the SFC documentation
    There you can write code for further conditions and processing beyond what is offered by the IEC qualifiers alone.

    Another option would be splitting the step into additional steps which convey the requirements of P1's orientation.

    Just as a comment but not really related to what you are asking, I tend to use the "step actions" rather than "IEC actions" as I find them easier to understand.

  • yann2021

    yann2021 - 2021-04-05

    Hello i-campbell,

    Unfortunately this does not work. The output remains activated even though the step is no longer active... :-( Don't quite understand why...

  • i-campbell

    i-campbell - 2021-04-05

    ... this does not work.

    Define: this


    Last edit: i-campbell 2021-04-05
    • yann2021

      yann2021 - 2021-04-05

      I tried to put in the "Action" beneath your POU. In the Step of the SFC is now a little black triangle on the upper right. Also a so called "Main action", not a IEC action.


      Last edit: yann2021 2021-04-05

Log in to post a comment.