LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to communicate with the USB?

is there someone who knows or have a code to communicate via USB? similar to the reads, writes, initiatise and close of GPIB or serial ports
0 Kudos
Message 1 of 3
(3,079 Views)
Communicating via USB can be somewhat tricky. You may have to consider multiple endpoints (both IN and OUT), and transfer types (bulk, int, etc.). In addition you have to have some sort of system driver in place to handle device enumeration. What is your application?
0 Kudos
Message 2 of 3
(3,079 Views)
Garry,
For now, there are no VI's designed to communicate through USB. The reason is this: It is best not to think of USB as a serial port, but rather as a bus. It is like asking when we will have "PCI Read.vi" and "PCI Write.vi". The protocol for talking to a USB device is specific to each device. You have to open up some channels to the device (how many is specific to the device), and then you have to peek and poke values over those channels in a device-dependent way.
I have heard of some users trying to use USB by direct register access or by accessing the windows low level USB API, but I don't know how successful they were
You may try to create wrapper VIs that expose the low-level USB API to users. A good place to start looking for general inform
ation on driver development is our KnowledgeBase.
Zvezdana Stojakovic
National Instruments
0 Kudos
Message 3 of 3
(3,079 Views)