LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the call library function using a dll for HID communication

Hello,

 

under http://helmpcb.com/software/usb-hid-template-for-visual-basic-2005 you will find a template for "Visual Basic" to set up a hid communication with a usb device.

 

I want to use the included mcHID.dll to communicate with a hid device by labview. Now I have some problems to configure the call library function node for the dll to set up the hid communication. The API of the dll is describe in the file mcHIDInterface.dll.

 

Maybe someone could set up the first functions in an example. I am using LabView 2012.

 

Thanks a lot an best regards,

Michael

Download All
0 Kudos
Message 1 of 6
(5,893 Views)

The solution is very simple. I found a complete LabVIEW Library which includes the mcHID.dll. I hope it is okay to attached the library.

 

Now it is totaly easy to start a USB HID communication with labview. I tried it and it works fine.

 

Best regards,

Michael

0 Kudos
Message 2 of 6
(5,874 Views)

sorry to have awaken this old beast, however, I have downloaded this library and I have this for the HID device:

First let me make sure that I understand the process correctly and the first thing I need to get is a handle?

Capture.JPG

 

The VI's provided in this library have inputs as unsigned integers, however the VID and PID are Hexadecimal values - this is confusion number 1

Confusion number two: I tried converting the controls to HEX and trying to aquire a handle, I also tried converting the hex vals to decimal nad still get 0 (nothing?) for a handle

 

For VID I have used 5A7 (or 1447), for PID I have used 40FE (16638)

 

any help is appreciated.

0 Kudos
Message 3 of 6
(5,300 Views)

Michael,  i didnt get it to work

0 Kudos
Message 4 of 6
(4,541 Views)

Hi Michael,

Can you please advise what should be the value for pHostWin. I have assigned the correct PID and VID. For pHostWin i leave it at 0. However i get nothing at the read buffer array.

 

Thank you.

 

Best regards,

Crystal

0 Kudos
Message 5 of 6
(3,523 Views)

Hi 

 

I am trying to communicate with the HID device that has a proprietary driver, could you send me an example of a simple communication VI for testing? I created this topic describing my problem.

 

https://forums.ni.com/t5/LabVIEW/I-cannot-communicate-between-Labview-2019-and-HID-Compliant/m-p/408...

0 Kudos
Message 6 of 6
(3,005 Views)