05-19-2008 03:33 PM
05-20-2008 02:13 PM
Hi jaiba-
Communicating with the USB-6009 (and most "newer" USB DAQ devices) directly via VISA is fairly complicated. This is due to the fact that those devices only communicate using an NI proprietary protocol. In other words, they do not respond to standard IVI, IEEE 488.2, or other commands. There is no programmer's manual available to help with VISA programming for the USB-6009.
Is there a reason why you need to use VISA rather than NI-DAQmx? If you really want to tinker around with VISA communication, you can install NI-DAQmx Base and LabVIEW and poke around in that code. Most of the device-level communication is exposed via the red-colored USB I/O nodes in NI-DAQmx Base (you'll have to dig a few levels into the NI-DAQmx Base VIs to find them). Those nodes use NI VISA under the hood, and they represent the lowest-level form of "documentation" that is externally available for the USB communication.
Regardless, I would strongly suggest that you use NI-DAQmx on your Windows machine rather than attempting to communicate over NI VISA.
Hopefully this helps-
05-20-2008 10:52 PM
05-20-2008 11:16 PM
05-20-2008 11:31 PM
05-21-2008 08:55 AM
05-21-2008 06:53 PM
05-21-2008 09:58 PM - edited 05-21-2008 10:01 PM
For USB, you can do a bulk transfer with VISA Read and Write, and the Instrument I/O>VISA>VISA Advanced>Bus Interface Specific>VISA USB palettes has functions for control and interupt pipes. There is a tutorial at http://zone.ni.com/devzone/cda/tut/p/id/4478 that explains some of this and you can do a search of the developer zone for generic examples of the control and interupt functions. The difficultly with USB is that outside some predefined classes (ie HID, TMC), the developer of USB hardward has a lot of freedom in deciding how to implement an interface and the commands and pipes used. That is why I am finding it difficlut to answer your question. Each and every USB device would require a different set of VISA functions and the data being passed by each function.
When you get a USB development kit, it includes the ability to create the firmware for your device and then you will know exactly how to implement a VISA driver for it. It is this low level information that is often so hard to get. Just like NI does not publish the low level information for it's USB DAQ devices. Just like NI does with DAQmx, most vendors will provide a dll that you can use for their USB device. LabVIEW is not a development environment for device drivers.
You keep mentioning a USB mouse. As far as LabVIEW is concerned, it is no different than a mouse plugged into the dedicated mouse port. To read a mouse, you can use the Connectivity>Input Device Control functions. These functions can also be used for keyboards and joysticks (USB or not).
To get a good understanding of USB, I would recomend starting at www.usb.org.