NI產品與技術 討論區

cancel
Showing results for 
Search instead for 
Did you mean: 

USB HID compliant device

我需要和Mastervolt 的MasterBus - USB设备通信,该设备属于USB HID compliant device。我通过NI-VISA Driver Wizard制作了一个USB VISA接口,但无论怎样都不能成功的实现通信。报告错误的内容较多,比如"visa: (hex 0xbfff003a)"等。 在制作USB VISA之前,bus hound能监测到该设备的通信。在制作USB VISA之后就检测不到了。这是为什么?有其他的办法实现吗?

0 Kudos
Message 1 of 2
(69 Views)
Highlighted

You should not use VISA USB Raw to try to talk to a USB HID device. VISA does not know anything about USB HID. The USB Raw mode is the lowest level USB protocol level, comparable to the IP level in TCP/IP and you don't want to communicate on IP level to implement a higher level protocol like SNMP.

 

Instead you should try to get drivers for your instrument in form of a DLL and access this DLL. In the worst case you should interface to the Windows HID API, but for that you need to know the actual data format that the HID messages should contain. This is something the device manufacturer has to provide to do, and in many cases they can't or don't want to do that. Also the Windows HID API is absolutely not LabVIEW friendly and writing an intermediate DLL in C/C++ that translates between the Windows HID API and a more friendly LabVIEW interface is definitely advisable.

 

But a manufacturer really should provide a DLL for his own devices!!!! This you can then fairly easily call from LabVIEW using the Call Library Node.

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 2 of 2
(38 Views)