LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there anyway to convert a dll to regular LabVIEW code?

I am using SiUSBX.dll to communicate with a usb device. Instead, I want to communicate with the usb device using regular LabVIEW code. For example, I need to write an array to the device to activate the channels.

 

P.S. I used this link to help create a raw USB connection to my device which seems to work. http://zone.ni.com/devzone/cda/tut/p/id/4478#toc0

Message 1 of 7
(2,793 Views)

No, you cannot convert a DLL to LabVIEW code. You can import the DLL (assuming you have the header file). This will create VIs that call each of the exported functions. These VIs act as wrappers around each DLL function.

 

While you may have created a raw USB connection, do you have the actual information as to the protocol? It's quite rare for companies to provide this information. If you have a DLL you're usually better off sticking with that.

0 Kudos
Message 2 of 7
(2,784 Views)

Thanks .

 

I found a .h file on the web that i think is the correct one. The reason i'm doing this is so i can use the same usb device on a Mac. As you probably know, the .dll will not work on a Mac. I am currently trying to use the utility you mentioned.

0 Kudos
Message 3 of 7
(2,772 Views)

 


@kevmi2ca wrote:

Thanks .

 

I found a .h file on the web that i think is the correct one. The reason i'm doing this is so i can use the same usb device on a Mac. As you probably know, the .dll will not work on a Mac. I am currently trying to use the utility you mentioned.


The import utility will not help at all with this.  It generates nice LabVIEW wrapper VIs around calls to the DLL, but it still calls the DLL.

 

0 Kudos
Message 4 of 7
(2,757 Views)

Indeed. If this is going to be used on a Mac, then the import operation won't help you. As I indicated, it still calls the exported functions ... which are in the DLL. of course

 

What is this device that you're trying to communicate with?.

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

Yep, just realized this won't work.

 

The hardware: I have a custom made sensor package which contains a pressure transuder and an accelerometer. The sensor transmits the data wirelessly to a USB receiver which uses the an SI Labs microprocessor. We use the SiUSBx.dll ti read the data into LabVIEW. The commands are fairly basic: Open, Init, read, Write, Close.

 

The data is a simple array of int.

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

You could run the device on a Win PC. Use an usb sniffer to get the commands send on usb. Replicate them with VISA.

Well, I see the flaw, inbetween you have the microprocessor. So cut this guy out or get Mac drivers for it.

 

Felix

0 Kudos
Message 7 of 7
(2,725 Views)