ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Libusb and Labview

Hi,

I have a usb device which I I want to control via labview. I have a
Windows dll that uses the libusb library. That dll contains a function
that returns a device handle of type usb_dev_handle.

It is defined a:
struct usb_dev_handle;

I then want to use this handle as a input for other functions but of
course labview doesn't know about the usb_dev_handle structure. Is
there a way around this.

Thanks

0 Kudos
Message 1 of 7
(5,173 Views)
assign it to U32. see page 2-25 of the lvexcode.pdf manual.
0 Kudos
Message 2 of 7
(5,166 Views)
Hi.
I have tried the same thing with labview and libusb and had the same problem, you had.
Do you have an answer to that problem of communicating with an libusb-device by calling the library-function in labview?
if you have a working solution could you please help me and send it to me?
That would be very nice.
Thanks ang good by.
0 Kudos
Message 3 of 7
(4,980 Views)
Hi,

A great lengthy document concerning calling external code in LabVIEW can be found here.  It states the calling convention of how to handle different datatypes.

I hope this helps,

Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 4 of 7
(4,964 Views)

Nadim your link is broken

0 Kudos
Message 5 of 7
(2,144 Views)

It's here now:

https://www.ni.com/docs/en-US/bundle/370109b/resource/370109b.pdf

 

Also you're replying to a thread last posted to in 2007, it's not at all surprising.

0 Kudos
Message 6 of 7
(2,133 Views)

And the information about using an int32 for such a variable is wrong now. You should use a pointer sized integer to allow the program to work in LabVIEW 64-bit too.

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