Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Need sample USB program

I need to read the info from a USB barcode scanner. Is there a sample program that I can use so that I can do basic read or write? According to the vendor, the barcode scanner speaks USB Raw. Although there are 2 functions in the library that do USB Control in and Control out, they do not show explicitly the synopsis of the functions. A sample USB program will be helpful so that I can test drive the application quickly.
0 Kudos
Message 1 of 5
(4,660 Views)
I.S.,

NI-VISA for USB Raw supports Control, Interrupt, and Bulk transfers. You may want to check with the manufacturer to see which transfer type your scanner uses. There is an example in development using interrupt data transfers which I can forward to you if this is transfer type that you device requires. For more information regarding this topic see the following link:

http://digital.ni.com/public.nsf/websearch/E3A2C4FE42D7ED0D86256DB7005C65C9?OpenDocument
Regards,

Shea C
Applications Engineering
National Instruments
0 Kudos
Message 2 of 5
(4,660 Views)
I am actually looking forward to use a sample program that will allow me to try basic read and write to the scanner. The USB configuration does not seems straight forward to me as it requires some detail steps. It will not be easy for first time user like me. I hope CVI has a sample program just like those on TCP/IP and RS232. Attached is the vendor info w.r.t. the device. Thanks and hope to get some help soon!
0 Kudos
Message 3 of 5
(4,660 Views)
After reading through your vendor info it looks as though your device supports control pipe transfers. As I mentioned the example that I have, uses interrupt transfers and is written in LabVIEW. The VISA refernce manual is a great resource for programing VISA devices. Pay close attention to CH5 were it starts talking about the viUsbControlIn command for control pipe trnasfers. A link to the reference manual can be found below.

http://www.ni.com/pdf/manuals/370132c.pdf

We hope to have more example programs available to demonstrate USB communication in the future.

Regards,

Shea C
Applications Engineering
NI
0 Kudos
Message 4 of 5
(4,660 Views)
As an aside, the USB Barcode scanner I use is from Symbol and has an OPOS driver that allows me to interface to it using ActiveX calls in LabVIEW. I didn't have too many problems writing an event driven driver for it. Also LabVIEW has ActiveX examples for Microsoft Excel & IE.
This ment I didn't have to worry about writing a low level USB driver for it.
0 Kudos
Message 5 of 5
(4,660 Views)