LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB communication

My company are going to build a USB device. We hope that we can use LabVIEW as the user interface for customer to configure this USB device.
 
We hope after the device plug into the computer, the software (VI) can launch it out automatically. And the customer do not need to install any driver for the device.
 
Now I am facing the problem that I don't know how to use USB control in LaVIEW to commincate with the device.
I have studied the application note in the NI website, I found out there is 2 ways to work it out: USBTMC and USB Raw mode.
 
Many question arise after the study:
1. For USBTMC, is it mean that if the hardware is followed IEEE 488.1 standard, I can used NI-VISA to send commands to the device?
2. To use NI-VISA to send command to USB device, is there any standard command for the USB device or the command means anything that the device understand?
3. If I use USB Raw mode, is it mean that I need to use VISA driver development wizard to create INF file?
4. Since my company are going to produce plenty of this product, the INF file created before is compatible for all the device?
5. Is the communication in LabVIEW between USB is same as RS232?
6. As I mention before, the software will launch out automatically. How can I work it out?
7. Finally, I need to create a setup for the customer to install this application. Can I include the INF file into it? Is it user friendly to set it up?
0 Kudos
Message 1 of 11
(7,731 Views)
And if I used USB Raw mode, can I used NI-VISA to communicate with the USB device?
0 Kudos
Message 2 of 11
(7,727 Views)
If you want the end user to be comfortable programming the device, then the USBTMC class would be the way to go. Your device would interpret commands similar to GPIB instrument (i.e. *IDN?, *RST, etc) that would be sent with the VISA Write and data would be read with the VISA Read. You would then publish a list of the supported commands. That is why vendors with existing GPIB instruments, are using this with USB versions. You can get the class specifications here. You could just use the USB RAW and publish that data but USB RAW is tedious and an end user would probably appreciate something much easier to use. Now, if you intend to hide a lot of this and just provide a dll for the end user, it all depends on what you are comfortable developing with. Internally, you could use USBTMC, USB RAW, or not use VISA at all and just develop a driver with C++.
Message 3 of 11
(7,712 Views)
Then how to create a device in USBTMC?
 
Is it mean that I need to create a device in GPIB protocol, then it can use USBTMC to communicate with the device?
0 Kudos
Message 4 of 11
(7,652 Views)

Somehow the link to the class document got lost in the previous post I made. It can be found at http://www.usb.org/developers/devclass_docs#approved

From what I understand, you do not have to implement GPIB messages. There is a subclass of USBTMC for that. The subclass specifies such things as triggering and certain mandatory commands (i.e. *IDN?, *TST, etc). This subclass would be used by an instrument vendor that might already have a GPIB instrument and then adds a USB interface. A program written for the GPIB instrument would work with the USB instrument (in most cases).

At this point, I have no experience with writing firmware for a USBTMC device. My department has developed several custom USB instruments but we have not yet taken the next step to implement them as USBTMC. When (and if) we decide to commercialize them, we will probably do so but I'm afraid I can't help much with the actual details. There are USB discussion forums that are a better place for you to post your questions.

0 Kudos
Message 5 of 11
(7,644 Views)
Thanks for replying me.
 
Then if I use USB raw mode, can I use VISA to communicate to the device?
0 Kudos
Message 6 of 11
(7,629 Views)
Of course. As I said, you can use any number of methods yourself. It all comes down to what you want your customer to use.
0 Kudos
Message 7 of 11
(7,620 Views)

Iam using a pendrive for communication.So I have to follow USB raw configuration.Is'nt it??

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 8 of 11
(4,935 Views)

Whyt do you want to DO with the pendrive?

0 Kudos
Message 9 of 11
(4,928 Views)

I mean pendrive as my USB device

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 10 of 11
(4,908 Views)