Hey again everyone. Happy New Year!
New question... without using sleep commands is there a way to start another script when another finishes? Reasoning for this is.. I'd like to showcase all functions of my machine. So basically when I say" robot what can you do" it would start with " I can move my head" followed with head movement, when this script is done it is followed by " I can move my arms" and the arms move etc etc. All of my movements have been made in the script manager being easily linked via control command. Just thought it would be a neat idea. Script done go to next script. Thanks guys!
In the Allen Bradley plc programming world we'd call it "step programming "
Upgrade to ARC Pro
Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.
So for example, in the init script, you set the variable to off so that other scripts that look at it don't error.
Then, at the end of each script:
Were "NextScript" is actually the name of the script that should execute after this one.
Finally, you need one more script that turns on demo mode, and starts the first script:
1) Load ARC
2) Press EXAMPLE PROJECTS from the Bookmarks window
3) Enter the EZ-Scripts Examples folder
4) Either locate "Procedural 3" project or search for "ScriptStart"
For more information about example EZ-Script projects, visit this activity: http://www.ez-robot.com/Tutorials/Lesson/22?courseId=6
I'll drop it since we have answered the original question, and the solution is elegant, but this is a recurring theme...
ControlCommand() is how controls speak to other controls. Each control has it's own ControlCommand, this includes 3rd party plugins as well. ControlCommands() are Control specific and not part of the EZ-Script language. ControlCommands() are documented by their respective control using the Cheat Sheet or Right-Click in the editor to display.
The recurring theme only applies to those who forget to use the CheatSheet tab or Right-Click in the editor - neither of which you had done when answering the question.
The recommended first point of action to identify the capabilities of a Control is to look in the CheatSheet tab or Right-Click in the editor, each of which will return the same results.
That is insulting, and innacurate.
We clearly are never going to agree on how software should be documented, so subject dropped.
The ControlCommand() uses self documenting descriptions for commands. If your suggestion is to add another layer of documentation to the ControlCommand() Cheat Sheet display, then that's duly noted. However, keep in mind that the CheatSheet and all uses of it would increase in length/size exponentially with paragraph of description per self-documented command... and be even more difficult to read, considering the CheatSheet is already being skipped as a source for available commands.
In which case, remember that the documentation of ControlCommand() states that that is "sends a command to another control". So, if you tell the Auto Position Control to execute an action, it will do so and continue to the next command. This means it does not wait for the Auto Position Action to finish. The ControlCommand() to start an action simply tells the Auto Position to begin executing that action, and does not wait for it to complete.
There is a variable in Auto Position called $AutoPositionStatus, that can be viewed in the Auto Position Config screen -or- in the Variable List Tab when editing scripts.
That variable, as the blue question mark next to it describes, will change from 0 to 1 based on the status of the Auto Position control (is it running or not). So, you can launch an Auto Position and wait for it to finish like such...
This can be taught using either RoboScratch or Blockly, both of which present this as a lesson by using the Auto Position (Wait) functions.
For example in RoboScratch...
Creates the following code....
And in Blockly...
I did in fact attempt to use cheatsheet and didn't see anything that looked useful, so wrote up the way I knew would work.
Scriptstartwait doesn't sound like it does what it does. If it was scriptstopwait, I might have tried it even without documentation since the name looked like what I was looking for. Now that you have defined it, imakes perfect sense, just not intuitively clear without that definition.
I also looked at getControlValue to see if there was anything useful, but it is also poorly documented (the document says to see below for all values, then the only documented value is "pause").
I prefer videos over documentation.... I learn much faster and better visually... For instance I learned how to change my own motorcycle tires with simple tools (tire irons) by watching an youtube video.... I would have never been able to do that by reading an "how to" manual on changing your own tires... Unless it had a lot of pictures that is