LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using existing c code for usb-hid communication in labview

Solved!
Go to solution

Hello,

 

I want to write a simple temperatrue logger using labview and a external hardware which communicates over usb-hid. The external hardware uses an ATMEL 90USB162 µC and DS18B20 sensors.

 

Link to the hardware:

http://www.diamex.de/dxshop/USB-Temperatur-Sensor-Tester-fuer-DS18B20

 

The source of a a simple command line tool is available (see attachement), which reads out the temperature value of the connected sensors.

 

Is it possible to include this c-code in the labview application to simplify the communication?

 

Thanks a lot and best regards,

Michael

 

 

 

 

0 Kudos
Message 1 of 3
(2,800 Views)

I'm not that experienced at this personally (in terms of compiling C code into DLLs), but I believe the process you need to go down to call your C code in LabVIEW is to compile the C code into a DLL which you can then call from LabVIEW using a Call Library Function node (or you can try to use the "Import Shared Library" wizard to automatically generate SubVIs).

 

There's more information here:

http://digital.ni.com/public.nsf/allkb/DCB90714981A1F148625731E00797C33

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 3
(2,776 Views)
Solution
Accepted by topic author MichaGue_01

Hello,

 

I stopped using the exisitng code and change to http://ahidlib.com/index.php/ahid-dll-and-labview. This works fine for me.

 

Best regards,

Michael

0 Kudos
Message 3 of 3
(2,632 Views)