LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem differentiating between two identical USB cameras

Hi all,
 
I hope someone can help me solve this perplexing complication using two identical USB cameras with the IMAQ USB Camera driver.
 
We have two identical Videology USB 2.0 cameras on a desktop PC. The LabView code IMAQ USB Enumerate Cameras.vi, as provided with the USB Camera driver software, lists them both as "Videology USB Camera". The subsequent vi, IMAQ USB Init.vi, designed to establish communication with the device, requires only a camera name. As both cameras are identical it will always establish a connection with the first camera.
 
We read in another thread that renaming the second camera in Device Manager can resolve this issue, but there is no option to rename devices in Device Manager.Smiley Indifferent
 
What we would prefer to do is to call the library ImaqDirectShowDll.dll from within IMAQ USB Init.vi using something other than a camera name, such as a USB index counter, thereby allowing a distinction between the two cameras. Inspecting the Call Library Function it can be seen that the function name is LV_imgDShowInterfaceOpen2, which suggests that perhaps there is also a LV_imgDShowInterfaceOpen1 that may, or may not, identify the cameras in another way. Does anyone have any knowledge of this, or know how we can attempt to determine the functionality of this library?
 
NI quite frustratingly indicate that they do not provide any Application Engineer support for these drivers as the drivers are provided with documentation. The documentation is only 9 pages long, and incredibly brief. Smiley Mad
 
Many thanks for reading this, hope somebody can help us! Smiley Happy
0 Kudos
Message 1 of 17
(4,614 Views)
USB devices should have serial numbers.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 17
(4,600 Views)
And that helps me how? Smiley Indifferent
0 Kudos
Message 3 of 17
(4,591 Views)

Can you rename the second camera in Measurement and Automation Explorer (MAX)?

 

Regards,

mlloyd

0 Kudos
Message 4 of 17
(4,586 Views)

You might be able to read some registry values to get a unique number for each camera after they are plugged into the USB port. I've done this for comm port adapters.

http://forums.ni.com/ni/board/message?board.id=170&message.id=143153&view=by_threading&page=1

What will happen if you have to replace one of the cameras?? Will the labview code need to be modified??

Message 5 of 17
(4,583 Views)
Hi mlloyd,
No, unfortunately MAX cannot do this. Besides, I would really like to be able to automate whatever solution works such that a user does not have to maunally make changes to the system before they can start the software. Smiley Indifferent
Regards
0 Kudos
Message 6 of 17
(4,579 Views)
Hi unclebump,
Interesting suggestion. I don't normally work with the registry, so I'm unfamliar with what options are available to me. I followed your link and ran the sample code to enumerate the COMM ports, which worked, but I'm not sure how I can use this to try enumerating USB port devices? Is this possible? Furthermore, I wonder if any information from this can be used subsequently in the USB camera drvier libraries? If you can help me to use this code to determine USB port devices I will try to work the rest out. Smiley Happy

In the mean time I discovered a link to a thread discussing DevCon, a Microsoft Device Manager alternative that works from the command line. With this I've been able to disable / enable individual cameras, allowing me to connect to one or the other, but not both simultaneously. Although I can live with using them alternately, switching between them one at a time by repetatively disabling and enabling alternate cameras, it would be nice to keep them both enabled and keep simultaneous communications open...

Thanks,
0 Kudos
Message 7 of 17
(4,575 Views)
Where do the cameras show up in device manager?? as a hard drive, comm port, mouse, HID device?? What is your operating system?
Message 8 of 17
(4,554 Views)
The cameras appear under the category of Imaging Devices, as Videology USB Camera and Videology USB Camera #2
I'm using Win XP, recent installation with all necessary updates.
0 Kudos
Message 9 of 17
(4,527 Views)
Hi

The forum below states you can alter the camera names (windows registry) so that they can be seen as different cameras in the 'Enumerate Camera'. It isnt actually possible otherwise to use more than one camera of the same make due to the fact they are referenced as the same name. NI distinguises each camera by driver layers. The drivers are not written by NI due to the fact there are 1000s of USB cameras out there and it would not be possible, so instead the IMAQ USB reads the driver that WIndows uses but not in as much detail. The best bet would be to use different camera makes, this will enable you to see each camera separately in Measurement and Automation Explorer (MAX). Another idea would be to change to firewire cameras which with a firewire enabled DAQ card from NI or using a Compact Vision System , you would be able to connect more than
one camera to your system. Below are links to more information regarding firewire products.

FORUM : http://forums.ni.com/ni/board/message?board.id=170&message.id=216513#M216513

http://sine.ni.com/nips/cds/view/p/lang/en/nid/10008

Kindest Regards

YatinM
NIUK & Ireland
Message 10 of 17
(4,526 Views)