Windows Release 2014.11.10.00

Download and install the latest ARC robot programming software to experience these updates.

Download ARC
Software Information
This is a small release with one new feature for the camera control

Changes:

- new Camera Variable: $IsCameraActive which returns the status of the camera. Can be configured to a custom variable name in the camera config dialog
#1  
Hi DJ. Its awesome to see the updates rolling out, I know you and your team have been busy. :)
#2  
This is very useful. I had a camerastart ControlCommand() in my init script, and if the camera was already running, it would crash ARC (no errors in the debug log).

Now I have an IF statement to see if the camera is already running, and no more issues.

Alan
#3  
please dont foreget about the the virtual ports to match the digital ports
#4  
Sorry just downloaded ,, thought i had it ,, Thank you @DJ Sures for the update I have been waiting for this so i can continue and once again you come through!

Thanks again.
#5  
Hmm.... Actually, $IsCameraActive is only initialized once the camera has been started at least once. So if I have just opened the project, and haven't started the camera yet, I get an error in the log "Variable Not Defined $isCameraActive".

If I have started the camera at least once, then the IF statement to check if it is active or not works.

Also, you said:

Quote:

Can be configured to a custom variable name in the camera config dialog


I don't see anywhere to do that.

Alan
#6  
@Alan... Can you set it to 0 in an init logon script? That way you won't get variable not defined error...
#7  
I tried (actually, since the whole issue is I am trying to see if the camera is on or off, and 0 is off, I set it to 2 then had the IF statement looking for != 1) but I guess since the IF statement is also in the Init script, it is still seeing it as undefined. I guess I need to create another script, and call it with control command.

I'll figure it out....

Alan
#8  
Calling the script that checks to see if the camera after setting the IsCameraActive variable to 2 eliminates the undefined variable error, but if the camera is active, when the init script runs, it sets the variable to 2, and then the script causes the nasty error that sometimes crashes ARC when I run the ControlCommand() to start the camera.

This is the error:
11/17/2014 6:07 PM - Camera Initialized: EZB://192.168.1.105 @ 320x240
11/17/2014 6:07 PM - Camera Initialized: EZB://192.168.1.105 @ 320x240
11/17/2014 6:07 PM - EZ-B v4 Camera Error: System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at EZ_B.EZBv4Video.()
11/17/2014 6:07 PM - Camera Disabled
11/17/2014 6:07 PM - Camera Disabled

Usually crashes ARC without the error getting written, but this last time it just threw the error without crashing.

Alan
Synthiam
#9  
The variable is set here:
User-inserted image


If using the latest ARC, the variable is set soon as the camera is loaded. does not matter if the camera has been activated or not, the variable is set. Never, ever set a variable that is automatically set by a control. The variable is set by the control, not by you.
User-inserted image
#10  
I knew about where to find the list of various control variables, but thanks for letting me know not to mess with setting them via initialization type scripts... Good to know... thanks:)
United Kingdom
#11  
Have you added any delay prior to the IF to make sure the camera control is loaded before checking if it's running? As DJ said, the variables are there on the control being loaded.
#12  
That's a really good point @Rich.... Some complex controls I assume need extra time to load... ARC being a multi threading program means that running scripts may not wait for those controls to load...
#13  
Yes, there is several seconds of delay throughout my initialization script, and I was attempting this on the last step.

I have figured out the sequence of events that causes the issues.

1) If I start ARC and open my project before starting Roli, the camera fails to initialize, so the variable is not initialized (none of the camera variables appear in variable watcher, and the script using the IF statement fails).

2) If on the other hand, Roli is started before opening the project, the camera initializes and starts, but if I run ControlCommand("Camera", CameraStart) and the camera has already started, then ARC intermittently crashes.

There does not seem to be a way to use the variable to check the camera status if the camera has not already been run at least once in this session.

However, I think I found a solution.

Running ControlCommand("Camera", CameraStop) when the camera is not running records errors in the log, but so far has not crashed ARC, so I will add this to the end of my initialization script:

ControlCommand("Camera", CameraStop)
sleep(1000)
ControlCommand("Camera", CameraStart)

That way, if the camera was not running, it will start, and if it was running, it will stop, wait a second, and re-start. Avoiding the issue with the variable.

Alan
United Kingdom
#14  
From memory (which is fuzzy at best right now) is there a toggle for the camera start/stop? Possibly use the ControlCommand for toggle twice in quick succession may kick the variables in for the camera and allowing the IF to work and avoiding stopping a stopped or starting a started camera control.
#15  
There is not a documented CameraToggle (there are toggles for tracking, recording, etc). But now I can't find where CameraStart and CameraStop were documented other than forum posts by DJ and others. They aren't in the list of ControlCommand parameters in the script reference.

Alan
Synthiam
#16  
Alan, certain you have the most recent version of ARC?

I'm unable to reproduce similar results. The code initializes the variables when the camera control is added to the project - whether active or not...
#17  

Quote:

Alan, certain you have the most recent version of ARC?

I'm unable to reproduce similar results. The code initializes the variables when the camera control is added to the project - whether active or not...


Yes, I have the latest version.

Are you opening an existing project with a camera in it, or adding the camera to a new project? I am seeing it when I open my existing project.

If you think it might be project related, mine is on the cloud. name is "myroli" (original, I know) and it is tagged as rovers, incomplete.

I can test later today on different computers. The one I was doing most of the testing on is Windows 7 Professional (64 bit), but I can try on my Windows 8.1 tablet later.

Alan
#18  
I confirmed that opening my existing project on Windows 8.1 has the same issue. Adding a new camera to a new project, all the Camera variables do appear, but when I save that project, stop ARC, restart ARC and load that project, no Camera variables appear until the first time I successfully start the camera for that session.

While I was testing, you released version 2014.11.18.00 so I installed it and re-tested with the same results.

Alan