04-17-2013 09:29 AM
Hello,
I am trying to find the best way to check the connectivity of an external camera with my computer using Labview 2011. More specifically, I would like to check the camera's connectivity while it is in use to make sure that it remains connected to the computer throughout the whole run of the program. Any help would be greatly appreciated!
Thanks!
04-17-2013 11:15 AM
I cannot think of a specific command or VI that helps you monitor/check connection. You should wire error terminals throughout your application and have an error handling system. This should throw an error anytime you correspond with the camera and it's not connected.
04-17-2013 11:24 AM
Hey Adnan,
Thanks for the reply. The error handling is definitely one thing that I need to continue using, however, what I'm looking for is a way to turn on and off an LED (LED located inside program) to let the user see that connection is lost and provide a message as well. I'm attempting to create a program which continuously processes images from an external device (realistically, it is just a camera but it is one of our products that we are designing for consumers). I need to be able to make sure that the correct device is connected, meaning not just some random camera, and remains connected throughout the session.
04-17-2013 11:33 AM - edited 04-17-2013 11:34 AM
I understand what you are saying.
The way we usually design our software is to have a module that is dedicated to image acquisition. This module is based on a state machine architecture. At the start of the application, the module establishes connection in the 'Initialize' state, then proceeds to 'Acquisition', 'Analysis' etc. When any of the latter states get an error, it goes to an 'Error' state that has an Error tracking VI (module) that stores the error info. Then this state loops back to the 'Initialize' state to restablish connection. If there is an error, it goes to the 'Error' state and so on.
The Error tracking VI (module) can be used in the GUI VI to turn the LED off or on.
Of course, the explanation is quite simple and needs to be modified based on the specs of your application.