Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
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

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
#1  
The specific values depend on the Control you are trying to Command.

Typical syntax is:

Code:


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:

Code:


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

Code:


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

Code:


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


Script you are checking from:

Code:


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.