Asked — Edited

Controlcommand Values - Looking For Help

I have looked thru the scripting manual and the Learn Section. I cannot find any clarification or syntax on this command. I would love to use it.

Thanks Wayne


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

#1  

The specific values depend on the Control you are trying to Command.

Typical syntax is:


ControlCommand("Control Name", "Command", "zero or more comma separated parameters")

The best way to determine the valid values is to use the Cheat Sheet in the script window. Just right click in the window, and there will be a list of all controls. If the control can be commanded, there will be an arrow to click and then a list of all valid ControlCommand statements.

Alan

#3  

ControlCommand doesn't return a value. It just tells the control to execute the command.

What I meant by "zero or more values" is that some commands have additional values, but not all do, so it may end with the command, or you may need to add one or more comma separated values after the command.

For instance, here are two camera commands:


ControlCommand("Camera", CameraColorTrackingEnable, "red")

will tell the camera to look for red objects (I might be missing or have extra quotes here. I am not connected to an EZ-B right now).

Camera is the object CameraColorTrackingEnable is the command Red is the value


ControlCommand("Camera", CameraFaceTrackingEnable)

will tell the camera to start face tracking.

Camera is the object CameraFaceTrackingEnable is the command There are no values.

Alan

#4  

Thank You!

Do you know if it is possible to get a running or non running command if a particular script is running?

#6  

Thanks For the Link:

If the answer to my question is listed then I do not see it.

Thanks.

#7  

Hmm.... Good question. There is a command called GetControlValue which seems like it might be able to provide some state information, but the documentation looks incomplete (or possibly the feature is incomplete) as the only value that it looks like we can get is if a control (including a script) is paused.

Here is the doc excerpt:

Quote:

ControlCommand Values You can receive values for controls using using the GetControlValue() command. The syntax for this command can be found above in this document. Each control will accept a different collection of commands, which are listed here.

All Controls

Pause

DJ, are there supposed to be more possible values here?

In the mean time, here is a solution that will work as long as the script has not terminated unexpectedly.

At the beginning of your script, set a variable that it is running. At the end of your script, set the variable to not running. Then in the other script where you want to see if it is running, just check the variable (variables are global). Be sure to initialize the script as not running in your init script or the one that reads the value will fail if the one you are reading has not yet run.

example:

script you are checking


$IsImportantScriptRunning = "yes"
#do whatever your script needs to do
$IsImportantSctiptRunning = "no"

Script you are checking from:


if $IsIMportantScriptRunning = "yes"
then #do some stuff
Else #don't do some stuff
Endif

Alan

#8  

Thank You for your help. I saw this and saw the same thing. I needed another pair of eyes on it.