LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

comunicate with a hid device directly

Hello,
someone can help me to explain how can I use (if possible) the hid.dll call lybrary function (or using the Input Device Control VIs http://digital.ni.com/public.nsf/allkb/CA411647F224787B86256DD000669EFE) to read/write by USB in my USB microcontroller HID device?
Thanks
0 Kudos
Message 1 of 7
(11,029 Views)

Dear Carlo,

This KnowledgeBase should provide a good starting point to solve your problem.

How Do I Communicate with My HID Compliant USB RAW Device in Windows Vista?

Please note the following.

1.You should have hid.dll in Windows XP too. Mine is located in C:\WINDOWS\system32

2. hid.dll is not supported by National Instruments you should ask Microsoft for issues specific to the use of this dll.

If you are new to dll calls in labview you can finde the proper manual here. It's a very good resource when dealing with external code in labview.

Using External Code in LabVIEW

Best Regards.

 

 

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
Message 2 of 7
(10,989 Views)
Just what I would have to ask microsoft for hid.dll?
I am able to work with external code, but if hid.dll is not supported by National Instruments, there is another type of dll which can I comunicate by external code in labview?

Best Regards.

 

Message 3 of 7
(10,981 Views)

Dear Carlo

I'm sorry for the misunderstanding.

You should be able to use hid.dll in Labview the same way you use any other dll through call library node.

What I meant is that since hid.dll isn't from NI we're not the best people who can answer questions that arises from that specific dll.

You can check Microsoft here http://msdn2.microsoft.com/en-us/library/Aa939487.aspx in order to dig down some infos about hid.dll

Best Regards

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
Message 4 of 7
(10,970 Views)

Thanks Filop for your answer,

in the Microsoft website there is:

 
"Primitive: Hid.dll

The Primitive: Hid.dll component provides the USB HID class driver.

Services

There are no services associated with this component.

Associated Components

No other components interact with this component.

Settings

There are no configurable settings for this component."

 

 

Then, Hidclass.sys and Hidspare.sys are the two function driver and bus driver for the HIDClass device and you can see it in the drivers when you plug your HID device. OK.

My question is: is possible to use Hid.dll or other dll (if it exist!!???) in order to permit me to call it in call lybrary function in Labview and communicate with my HID?

I do must compile a new dll? Or...     Where can I search this informations?

Thank you very much

 

 

 

0 Kudos
Message 5 of 7
(10,967 Views)
This page describes the HID.DLL API. I'm having a similar problem - I'm guessing you also bought a cheapo USB-GPIB adapter from Australia? ;) If I figure out the protocol, maybe I'll write a VI for it and post it on the web. http://www2.hawaii.edu/~hermany/api.htm
0 Kudos
Message 6 of 7
(10,816 Views)


@CTRInsurgent wrote:
This page describes the HID.DLL API. I'm having a similar problem - I'm guessing you also bought a cheapo USB-GPIB adapter from Australia? 😉 If I figure out the protocol, maybe I'll write a VI for it and post it on the web. http://www2.hawaii.edu/~hermany/api.htm

HID is just the generic protocol for slow Human Device Interfaces. As such you can look at it in a similar way to TCP/IP. It defines how messages are transported over the network, but not what messages. The "what messages" is the device specific protocol, and here every manufacturer is quite free to define it's own protocol. There are a few standardized ones such as for a pointing device (mouse) or a keyboard, but one can define it's own too.

HID is slow so your cheapo GPIB interfaces will be slow too and I mean really slow in comparison to a NI GPIB interface. The reason manufacturers sometimes use a HID based protocol is because there is already a HID device kernel driver, so that one does not need to develop its own kernel device driver, which is a somewhat intimidating experience. But I'm not sure I would like a hardware from someone who isn't able to develop a real kernel device driver for his industrial product.

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 7
(10,801 Views)