United Kingdom
Asked — Edited
Resolved Resolved by DJ Sures!

Getcontrolvalue For Camerastart

Hello! I'm having a tinker with EZ Script and have a question about the GetControlValue function. Does anyone know if there is a GetControlValue for CameraStart? Ideally, I want to return a simple Boolean true or false if the camera status is started confused I was thinking something like this:

$CameraStatus = GetControlValue("Camera", "CameraStart")


ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

United Kingdom
#1  

Is GetControlValue a valid command? I've not come across it before (is it something I missed in a recent update? Totally possible as I have been away from it all for a few days). I'll have to have a look at the command:)

The camera control provides a whole range of variables such as $CameraIsTracking (amongst many others). ControlCommand can start and stop the camera also.

What do you want to do with the true/false response?

United Kingdom
#2  

Hi @Rich,

Quote:

Is GetControlValue a valid command?
Yeah, looking in the Script Help, the example is this:

$x = GetControlValue( "ADC Graph", "pause")

I'm actually connecting to the Script Interface via the SDK and using the "status" to enable or disable a control accordingly. Sadly, none of the built-in variables in EZB (that I can see) store the status of whether the camera device is started or not. Incidentally, you can check if it's paused using this:

$CameraStatus = GetControlValue("Camera", "Pause")

Cheers! :)

United Kingdom
#3  

Yeah, I just spotted the command, I guess I missed that one.

The documentation doesn't state that start or stop is a control value which you can get so I assume that means it isn't available.

I may be missing something but what is the benefit of having the camera stopped? Would having the camera control start automatically via a ControlCommand be a useable solution?

ControlCommand("Camera", CameraStart)
United Kingdom
#4  

I think you're right, it's not in the documentation so probably isn't available.

I'm not looking to have the camera permanently started (ideally) and wanted the status to be able to conditionally control things. As a pseudo example:

If CameraStatus equals Started then EnableColourTracking Else Say "Camera isn't started yet, would you like to start?"

I suppose I need to ask @DJ-Sures politely and request a new feature:D

PRO
Synthiam
#5  

Like, a variable that can be set in the Camera Control? $IsCameraActive or $CameraStatus?

United Kingdom
#6  

Pretty much exactly that yes, I can't think of another way round it other than controlling the camera through the SDK rather than ARC... I was thinking better in ARC and if the ControlCommandValues were available, it would simply return a Boolean true or false:

$CameraStatus = GetControlValue("Camera", "CameraStart")

That or set the $CameraStatus variable when the camera control is started (such as the ControlCommand Rich mentioned in post #4) and remove (or set to false) when it's stopped? Does that make sense or am I being bonkers? blush

Thanks:)

United Kingdom
#8  

@DJ-Sures, that's perfect! Thank you so much:D