From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(4,234 Views)
assign it to U32. see page 2-25 of the lvexcode.pdf manual.
0 Kudos
Message 2 of 7
(4,227 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,041 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,025 Views)

Nadim your link is broken

0 Kudos
Message 5 of 7
(1,205 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
(1,194 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
0 Kudos
Message 7 of 7
(1,168 Views)