WaitStatement for robot programming


In robot programming there’s a common statement to wait until some logical expression returns True. In VC there are no standard statement like that so I created a custom statement for it. Unzip add-on under My Commands folder. New button is created to program tab in statement toolbar called WaitStatement. Clicking the button new statement is created and also python process handler is associated to it automatically.

Statement evaluates its Expression cyclically and poll cycle is set on PollCycle property. In expression you can use inputs and outputs (IN[port] and OUT[port]), component properties, basic operators (==, !=, <=, >=, <, >, !, &, |, NOT, AND, OR) and constants (0, 1, OFF, ON). So basically the syntax is the same as on If-statement expression except this understand outputs and some alternative key words for not, and, or operators. Routine properties however are not supported. I attach an example layout that demonstrates WaitStatement (layout done with 4.2.2).

WaitStatement_2020_09_15.zip (2.9 KB)
Pick_n_Place_2_Lanes.vcmx (788.7 KB)



that’s really helpful for programming. thanks :blush:

hello keke !
thank your share,that is very helpful!