Logic Statements looped with Signals

Hello lovely people of this community,

I would like to ask if and how we can make if/else, while loops with signals.

I get that a process node can send a signal to another process node which can wait for this respective signal. But I want to know how to write the process statements such that I can use If and Else conditions depending on the values of these variables.

I ask this because I am not able to understand how to use the get property and wait for property conditions on different process nodes.

Using signals seems more intuitive.

Thanks in advance for any help or input

Wait signal statement has options to store the received signal value to a process variable. This process variable can be then used in expressions such as the If and While statement conditions.

Note that the value is copied to the variable from the signal, so changing the variable won’t alter the signal.

See the statement reference in VC help file for descriptions of all the statements and their properties.


Thank you for your reply. But I don’t really understand how to do that.

So in one process node if I used a counter, and when that counter reaches a certain limit, I want that process node (Process Node # 2) to send a signal to another process node (Process Node).

And when that happens I would like that process node to change its routine, or write the process statement in a way that
if waitsignal == true
then routine 2

or use a while statement with the same input.

Could you please check the image, I hope it makes my question clearer.
Thanks in advance.

I really need help with this as I’m so stuck :frowning:

One potential issue I can see immediately is that all process variables get reset every time the process routine starts, so you can’t hold any state in those variables between process executions.

You could use e.g. component properties for such persisted state information if you have to.

Another clear issue is that you are not using “==” to compare values in the expressions, the single = is an assignment operator. See the expression reference in the VC help for more info.

If you want to control which process executes in a process executor with multiple processes, that must be done exclusively using the process requirement statements. Those go into the “top part” of the process editor and all requirements must be met simultaneously for the process to start.

Have you read the help file and watched the academy tutorial videos about process modeling yet?