Asked — Edited
Resolved Resolved by VGosine!

Digital Wait Usage Question

if I issue a script command such as:

digital wait (d23, true, 50)

what does the script execution do while it is waiting for the d23 status to change?

can I start another script in parallel to process at the same time when we are waiting for the digital port to change?

how would one start a parallel script?

is there a tutorial on coding parallel scripts while waiting for real world I/o changes?

thanks neil


ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

United Kingdom
#1  

You can run as many scripts side by side as you like.

You can start a "parallel script" a number of ways, manually or probably the better method would be using ControlCommand. Look under Cheat Sheet in the right hand side of any script dialogue for simple click and paste ControlCommands available to the project.

Trinidad/Tobago
#2  

When you issue the Digital_Wait command the script that it is running within will wait for the condition to be met before proceeding.

You can start as many scripts as you want to run side by side, just as Rich said.

Do you want a specific script to run after the digital status has changed? If so then this is what you would use to execute that script.


ControlCommand("Script", ScriptStart)

We don't have any tutorials on running scripts simultaneously but it would be as simple as running a script with these commands:


ControlCommand("Script1", ScriptStart)
ControlCommand("Script2", ScriptStart)
ControlCommand("Script3", ScriptStart)

This will have each script executing simultaneously.

Please Look at the ez-script manual for more information on EZ-Script functions:)

#3  

Thanks guys. I now understand how to multitask scripts. Your post cleared up a lot and should be part of the tutorials. The light just went on. LOL Neil