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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
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...
Define: this
Last edit: i-campbell 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