Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI-VISA with USB webcam

Hello,

I want to use an usb webcam (creative labs).

I use the tutorial on the NI web site ("Using NI-VISA 3.0 to Control Your USB Device") to set up a USB webcam.

I got all device information from the manufacturer (Product ID, vendor ID, ect.) and the device still does not show up in MAX.

Under "Device and Interface", I have only PCMCIA-232-2, PXI system, Ports (serial & parallel), NI-IMAQ Devices.

I have no USB device.

Is there any way to troubleshoot this problem ?

Many thanks
0 Kudos
Message 1 of 7
(4,850 Views)
Hi,

I am having a very similar problem with a USB digital camera, no matter what I try, I cannot get MAX to recognize the camera. Have you had any luck with your webcam?

Chris
creyerson@arete.com
Chris Reyerson
Optical Systems Engineer
Arete Associates
Tucson, AZ
0 Kudos
Message 2 of 7
(4,840 Views)
Hello

No I have no chance with my webcam.

I hope understand and solve the problem.

If you have an idea ...

many thanks
0 Kudos
Message 3 of 7
(4,824 Views)
Have you deleted the manufacturer's driver? If that driver exists and detects the device, your driver that you make with the VISA wizard will not detect it.

However, there is very little use in getting camera devices to show up in MAX. I can't think of any reason to do this. Once you get it recognized, you'll have to communicate with it which will be even more difficult. You'll need to open a pipe (the right kind of pipe because there are 4) and write commands and read data from the camera. Unless you have very specific technical documentation from the vendor, I doubt that you know exactly how to do this. Figuring it out by trial and error is nearly impossible. Imagine trying to convert a string of numbers into a picture without knowing what encoding techniques the camera is using...That's going to be pretty hard.

If you want to interface your camera with LabVIEW or other applications, I would recommend using the manufacturer's driver and interfacing to it via a DLL call into the driver or something like that. This will still be difficult, but at least the camera driver can handle all the raw communication with the camera rather than you re-writing the driver.

Hope this helps.

Scott B.
GPIB Group
National Instruments
0 Kudos
Message 4 of 7
(4,821 Views)
Hello,

I have deleted the manufacturer's driver. And re-use the tutorial on the NI web site ("Using NI-VISA 3.0 to Control Your USB Device") to set up a USB webcam (Product ID, vendor ID, ect..., are re-encode)

The device still does not show up in MAX.

I have no USB device BUT under Port (serial & parallel), I have an new port Com, with an yellow exclamation mark.

" VISA returned this device when finding resources, and MAX could use VISA to parse the resource name. MAX could not succesfully open a VISA session to the device."

If I want to open an Visa session Max reply

Unable to open session to "ASRL8::INSTR"
Return value: 0xBFFF0072
Status name: VI_ERROR_RSRC_BUSY

The ressource is valid, but VISA cannot currently access it

Is there any way to troubleshoot this problem ?
0 Kudos
Message 5 of 7
(4,804 Views)
Once you have the device showing up in MAX, do you know what its communication protocol is? I really think you're on the wrong track to getting the webcam to do what you want (what do you want it to do, by the way?), and unless you have this information, getting the webcam to show up in MAX will be useless to you.

Scott B.
GPIB Software
National Instruments
0 Kudos
Message 6 of 7
(4,795 Views)
Here is a KB that main explain why the NI-VISA driver isn't linking with the device.

Why is NI-VISA not Working with my USB Device?

The main problem is that XP ships with a Windows Signed Driver for cameras and it doesn't like it when you try to link the camera to something else. There are some Windows DDK functions that you can use to force Windows to choose a non driver signed driver over their default one, but I wouldn't recommend it. If you all ready have a driver, use it. If you want to try anyways you might just want to select the "Install the setup information file for this operating system for me" option when using the VISA Driver Development Wizard and that should temporarily force the VISA driver to load over the signed one if the device is plugged in. If you remove the USB device and plug it back in it will probably choose the Windows one again. Your other option would be to delete the Windows inf file that is linking to the camera, but this could really mess up a system or at least mess up any classed USB device (USB mice, keyboards, memory sticks, any USB device Windows already has a driver for might quit working). Again, I would NOT recommend this!

I would search for a small utility called USB VIEW. You can run it to see what the actual VID and PID are for your device to make sure your INF file is correct.

I hope this helps out, but just know that NI-VISA was never designed to be used in this way and Microsoft was taken some steps to ensure that it is the only driver for classed USB devices. NI-VISA USB support was designed to be used to USBTMC (Test and Measurement) devices or to create drivers for devices like the NI 6008 (NI-DAQmx Base) that are not made on top of an existing USB class and Windows does not have default drivers for it.

The big question is what are you guys trying to do?

Josh Prewitt
National Instruments
0 Kudos
Message 7 of 7
(4,787 Views)