
Download and install the latest ARC robot programming software to experience these updates.
Get ARCThis 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
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
Now I have an IF statement to see if the camera is already running, and no more issues.
Alan
Thanks again.
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:
I don't see anywhere to do that.
Alan
I'll figure it out....
Alan
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
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.
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
Alan
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
While I was testing, you released version 2014.11.18.00 so I installed it and re-tested with the same results.
Alan