Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB Instrument Communication help

I pocess an instrument our group  developed with an USB OTG connector and I wanting to use Labview to control the instrument.  I have used the USB tutorial to create an inf file with the VISA wizard, but I am having difficutly talking to the instrument.  The instrument has its own serial commands to control the instrument from a pc which has been successful with another inf file usb driver and software that is specfic to this instrument.

This is the attributes for the instrument using the VISA wizard and got the VISA to see the instrument.

Timeout Value = 2000
Maximum Queue Length = 50
Termination Character = 0x0A
Termination Char Enable = VI_FALSE
IO Protocol = 1
Suppress End on Reads = VI_FALSE
USB Maximum Interrupt Size = 1
USB Control Pipe = 0x0000
USB Bulk-Out Pipe = 0x0001
USB Bulk-In Pipe = 0x0082
USB Interrupt-In Pipe = 0xFFFF
USB Alternate Setting = 0
USB Bulk-Out Pipe Status = 0
USB Bulk-In Pipe Status = 0
USB Interrupt-In Pipe Status = -1
USB End Mode for Reads = 5

I noticed this -1 and was told I could not do bulk transfers and that just leaves control and interupt pipes left.  However, I am not usb expert  and I do not know how to set the usb control in and control out VIs so that I can send commands to the instrument from labview. I have read through alot of articles talking about endpoints, but I do not have any idea where to find them. I have looked at the example VIs NI has posted on their USB tutorial section and I can't make heads or tales of the control and interrupt VIs.  It seems to me Bulk pipe transfers would be ideal for my application, but that doesn't seem it will work. 


Is there any additional information or examples about control or interrupt pipes (i.e. USB control block setups)? 

Thanks


0 Kudos
Message 1 of 6
(4,067 Views)
Hi

for the USB OTG you can use visa and the virtual serial port.
In that case it will run easily at 115K baudrate, mostly sufficient for communication.
greetings from the Netherlands
0 Kudos
Message 2 of 6
(4,043 Views)
Hi,

So would I use the VISA USB driver I/O  to interface to the virtual serial port or use the inf driver that was originally designed for our instrument?
Also, how would set the I/O to the Virtual serial if the only 2 option for I/O on my computer are COM 1 and LPT1 and the intrument has USB OTG?

Thanks,

Rick
0 Kudos
Message 3 of 6
(4,021 Views)
Hi

if it is really usb-otg than you should have an extra serial port in your list probably com 3 or com 4, depending on an infrared port yes or no.
This port can be used to send data (strings) asif this port is serial.
So you don't see usb but serial.

greetings from the Netherlands
0 Kudos
Message 4 of 6
(4,013 Views)
Hi,

I guess it must not be truly USB OTG from your conversation because I reloaded the driver and it came up USB drivers and not in the serial port section.
0 Kudos
Message 5 of 6
(3,994 Views)
Hi

I'm sorry I was foooled by a circuit that is used in our place and has an old style (square ) usb connector on one side
a simple microprocessor and some additional logic on board and has a serial driver included.
I looked a bit more on the web and saw a lot of documentation on USB OTG but especially a lot of definitions now.

did you check the pages from NI completely on USB drivers?

greetings from the Netherlands
0 Kudos
Message 6 of 6
(3,989 Views)