LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nugget: 2 of n : USB Control transfers using VISA

Hello Shane,

                            I am communicating USB device which is customized device having SH2A Renesas Microcontroller with segger USB HID Device stack type is interrupt.Raw USB detected in NI VISA while reading the data from device  i got an error " Unable to start operation because set up is invalid(due to attributes being set to an incosistant state).Please help me out to solve this error in read and write operation.error is attached.

0 Kudos
Message 31 of 36
(1,012 Views)

The IDN request is not a HID request. Why are you trying to issue a T&M request to a HID device?

0 Kudos
Message 32 of 36
(993 Views)

Thanks for respond, if i sent controller command also i got same error.i need write and read operation through USB. if i used get interrupt vi i m getting timeout error.please help me out to achieve write and read operation.

0 Kudos
Message 33 of 36
(968 Views)

If your device is a HID device you'll have to implement the HID protocol on top of USB raw. That's a considerably lower level protocol than the T&M protocol used to control for instance USB oscilloscopes, who would have understood your "IDN?" query. HID is normally fully binary and what needs to be sent in the data messages will be very specific to your device. I'm pretty sure it could be done through VISA but in the past I directly called into the Windows Setup and device driver API to access HID devices.

And helping you with your specific device will be pretty hard, since we do not have that device here with us and you do apparently need quite a bit more assistence with this than a few quick tips. I would search for alternative solutions in your case, or hire someone who has the knowledge to make this work.

Rolf Kalbermatter
My Blog
0 Kudos
Message 34 of 36
(964 Views)

Firstly, which commands do you need to be able to send and receive?  You must have documentation somewhere about your device, right?

 

If you don't know this, then either find out or give up because each device can implement its own commands beyond the standard ones supported by the device class it belongs to (HID).  Devices which belong to one class will not (except for VERY rare cases) understand anything about commands from different device classes.  So make yourself familiar with what a HID even is (Documentation can be found on www.usb.org) before trying to do anything else.  If the documentation is too complicated, then please find someone else who can help you with this specific device of just use the OS-support for HIDs.

 

I fear you have not done the basic level of research in trying to uderstand what a HID even is because your attempt to send a Test and Measurement device command shows that you are not yet familiar with the different classes of USB devices.  Without this knowledge, you will not make any progress.  It's a steep learning curve.

0 Kudos
Message 35 of 36
(954 Views)

Thank you..i m sending wrong command due to that it was showing error.i have to send in hexadecimal format.problem solved .device reading properly..

 

0 Kudos
Message 36 of 36
(937 Views)