LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HID.dll and "Call Library Function Node" to read from device (PS60 Scale)

Hi Jeff,

 

Thanks for the response. Unfortunately if I use VISA, it removes the Scale from HID, and then the device is not useable for any other application but Labview. My goal is to allow access for other applications besides Labview.

 

It appears the only choice is to create a hid.h header file. Since I have never created a header file...where do I begin?

I know if I read the hid.dll in the Call Library Reference Node...it shows all of the "function names". I guess I could use that as a guide to create hid.h file, but since I have no idea what I am doing...how do I know if I am on the right track?

It sounds like hid.dll is only part of the solution, and I will need to address setupapi.h and setupapi.dll too. Then each dll has 50 or more functions with dozens of parameters.

 

The odds of success are nearly impossible, unless you are an experienced API programmer, or you have some kind of an example to reference.  Any Labview example would help.  I'll revist the hostname.vi example and see if I can make some sense out of that...it should have header files too.

 

I'll keep trying, but this does leave a sting.

 

Doug

0 Kudos
Message 11 of 15
(2,983 Views)

You do not create header files unless you have written the according DLL. The HID.H file is part of the Windows SDK just as the setupapi.h file. Many of those functions have parameters that you can not interface with the Call Library Node directly.

 

Writing an intermediate DLL is the only sensible solution here both because of these parameters, but even if that would be not the case trying to do so many APIs all inside LabVIEW directly is going to be a nightmare to support in the long run.

 

Rolf Kalbermatter

 

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 12 of 15
(2,974 Views)

Hi Rolf,

 

Thank you for your reply.  I started searching for a command line utility to grab the information.  Most of the utilities I have found simply echo the system details, and don't read the device.

 

I think your right...going through Labview will be very difficult at best.  I have never tried C# before, but I am going to look and see if there is a possible function I could address the USB device.

 

Still searching for a solution...

 

Doug

0 Kudos
Message 13 of 15
(2,972 Views)
You may be able to get the header from the manufacturer of the device. I would contact them.
Jeff | LabVIEW Software Engineer
0 Kudos
Message 14 of 15
(2,956 Views)

Probably too late to the party here to be of any value, but...

 

In other legacy RS-232 devices that eventually added USB support, I've seen manufacturers use virtual serial ports in Windows to allow unmodified software to access the "USB" data. It's basically as if you're communicating with the external serial device using a USB to serial adapter.

 

Might be worth a look at the setup in the FedEx, UPS, DHL software that uses the PS60 via USB to see if that's how they're doing it. You'd probably still have to deal with contention for the serial device if you're running your application simultaneously, but you might be able to just tie into the virtual serial port using good ol' standard RS-232 handling code.

0 Kudos
Message 15 of 15
(2,865 Views)