This is where I encountered several issues that made working with SFC considerably more difficult for me.
There is no simple way to jump to a specific step within an SFC when a certain condition occurs, regardless of which step is currently active. For example, I would like to jump directly to a defined step when a variable gets a rising edge, no matter where the SFC currently is.
To achieve this, I had to develop an external controller using PRESET_OPERATING_MODE, STEP_ID, ACTIVATE_STEP, and DEACTIVATE_STEP. This took quite a lot of time and made debugging considerably more difficult.
Another issue was the behaviour of InOut variables in Actions. They are written on every call. This means that a pulse does not only set the variable to TRUE when the corresponding step is active, but also writes FALSE when it is not active. As soon as multiple SFCs work with the same variable, this becomes problematic. I had to build a relatively complicated workaround using an array.
Debugging inside Actions is also difficult, as no current values are displayed when inspecting the program.
It would also be useful to be able to directly assign values other than TRUE/FALSE inline within an Action.
I am aware that some of these suggestions go beyond the IEC 61131-3 standard.
In the end, I rewrote all of my SFC function blocks as state machines in ST. Unfortunately, the limitations mentioned above caused more additional work in my project than the SFC programming was able to save.
