WaitIo, WaitBool functions

Hello everybody

I have a question regarding the WaitBool and WaitIo functions.

The behaviour of this function is, after reaching the condition of the function and returning OK, in the next cycle the return value switch back to RUNNING. Using more than one function calls in one step causes the problem, that reaching on wait function condition, the other is still running, so the step stays active, the wait function does not keep the OK state.

So I'm not able to set every function there on _tmpRetVal and collecting all tmpRetVal at the end  before returning OK for the next step.

Best reply by SteffenR-

This behaviour is known, but it is the "safe" variant.

If the function would continue returning OK, it could happen that it returns OK in the next step with different parameters as well.

It would be necessary to save and compare all parameters or to save and compare SFCCurrentStep (= step name in which WaitIo/WaitBool is called).

Currently you have to use a separate step for each instance (CallIdx). Of course, this eleminates the advantage of these methods to add such a check via Online Change (because usually changes in the SFC chain are causing memory shifts which could cause other problems).

View original
7 replies
Resolved