Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

interfacing usb to labview using visa

hey i am having  problems  interfacing  labview to my usb using visa.Could  someone  just direct me  the exact procedure  of  how  to interface usb using visa. Thank you
0 Kudos
Message 1 of 5
(4,410 Views)

It's a USB what? Is it an instrument, keyboard, mouse, camera, serial converter, etc? That's an important detail that you have left out. You should also provide the make and model of the USB device.

For such things as USB-RS232 converters, you have to first install a driver that comes with the device. After that and assuming that it shows up in the system as a com port, you are usually good to go.

Message 2 of 5
(4,397 Views)
To quote a very knowledgeable NI developer, for RAW USB here is a good place to get started:

A good place to start is with this USB Instrument Control Tutorial (http://zone.ni.com/devzone/cda/tut/p/id/4478). It covers most of the basics in order to create the USB INF file, so the device will show up in the Windows Device Manager and MAX as a NI-VISA USB Raw device. An important note that a lot of people over look, is that in order for you to use NI-VISA to control the USB device, NI-VISA will be the sole driver. aka, if your device already has a driver you won't be able to use it and NI-VISA at the same. Programming a USB device is more similar to register level programming a PCI device, you can't just send ASCII messages to it like a serial port unless your device complies with something like the USBTMC or USB488 spec. You may already be aware of this, but I figured I would just throw it out there.

Here are a few other documents that you may want to get familar with if you are going to communicating with a USB device through VISA.

http://www.beyondlogic.org/usbnutshell/usb-in-a-nutshell.pdf - read this one front to back before starting

http://www.usb.org/developers/docs/ - If you need more details then what is covered by the usb-in-a-nutshell document. I would suggest reading chapters 1-5 and 9.

http://www.hhdsoftware.com/Products/home/usb-monitor.html - Similar to NI-Spy, but it actually snoops the data being sent of the USB port. You can use it to verify that you did indeed send what you thought you sent and to see if the instrument is sending back what you thought it should. I highly recommend purchasing a copy of this if you really intend to create a USB driver.

LabVIEW ChampionLabVIEW Channel Wires

Message 3 of 5
(4,391 Views)
it is  c8051f320 micro processor  and  it  has no driver available  at present.
0 Kudos
Message 4 of 5
(4,322 Views)
Hi,

In case you're building your own device or using some kind of 8051 development kit, you'd have to create firmware that either presents itself as a RAW device or as a USBTMC device.
When using a RAW device, you can use the NI software to generate an INF file for you and you can than use the device in VISA.
Note, your firmware needs to be fully implemented so that communication also works well of course.

Regarding USBTMC, you're need to set the USB class correctly in the device descriptor and of course need to comply to the rest of the USBTMC specification.

regards,
Marcel
0 Kudos
Message 5 of 5
(4,244 Views)