LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

usb interrupt

I have a USB RAW device.
 
I successfully created a basic driver for the device using NI-VISA Driver Development Wizard.  (I was also able to set up the Windows HID driver as well, but I'm a little less sure how to interact with this driver--a Call Library Function Node, presumably, but I do not yet know the function prototypes so for the moment I am using the NI-VISA driver.)
 
The device appears in MAX where I can open an NI-VISA session and obtain basic information about the device on the Template tab.  On the Interface I/O tab...Control In tab if I use the following inputs I obtain the expected return value:
 
inputs:
Request Type: 0x80 (Device to Host, Standard Type, Device Recipient)
Request: 0x00 (GET_STATUS)
Value: 0x00
Index: 0x00
Length: 0x02
 
return:
\x00\x00
 
I wrote a VI that does much the same thing.  Also, I know the device uses interrupt mode to communicate with the USB host.
 
What I do not know is where to go from here.  The read functions do not return data (Error Code: VI_ERROR_INV_SETUP [Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state).]).
 
What do I need to do to read data from the device?
 
Thanks!
 
Paul
 
 
0 Kudos
Message 1 of 6
(3,511 Views)
The following url will take you to some example code that shows how to pull data from the USB Raw device once you have developed your driver in the VISA Driver Developement Wizard.

http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_answer=&p_guid=DC76651CD1522404E034080020E74861&p_node=DZ52363&p_rank=&p_source=Internal&p_submitted=N

That should give you a good start to a LabVIEW application to do the communication you want to do.

Regards,
Matt S.


LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
0 Kudos
Message 2 of 6
(3,484 Views)

Matt,

Thanks for the information!  I just tried the link but I get an error: Network Error (tcp_error) .  (I doublechecked the link.)

Paul

0 Kudos
Message 3 of 6
(3,477 Views)
I'm sorry Paul... I posted the wrong link. Try this one.

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=DC76651CD1522404E034080020E74861&p_node=DZ52363&p_source=External

-Matt S.

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
0 Kudos
Message 4 of 6
(3,472 Views)

Matt,

That link works.  The downloaded code looks like what I need to get this to work.  I will try it with the hardware.  Thanks!

Paul

0 Kudos
Message 5 of 6
(3,471 Views)
Glad to hear that's what you were looking for. Good luck with the project!

-Matt

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
0 Kudos
Message 6 of 6
(3,463 Views)