Flow control statements with boolean signals conditions

Hello,

I have not been able to use if and while statements with boolen signals conditions. Is it possible?

Thanks in advance,

Condition expressions can’t access signals directly, but you can use a WaitSignal statement to copy the current value of a signal to a process variable and then use that variable in the If statement’s condition.
See the reference guide page for the WaitSignal statement in the help file.

Thanks TSy, that worked like a charm.

1 Like