LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing VB.NET functions in Labview

Hi,
 
I am hoping someone may be able to help me with an issue that is causing me great confusion.
I have very little programming experience, so please be gentle....
 
I have developed an application in VB.Net to control a device under test (DUT) via the PC parallel port. In order to autonomise some of the tests required, we wish to create a simple library of the functions used in my VB.Net software which can be called by labview to control the DUT, whilst labview sets up the test equipment surrounding the DUT.
 
We have successfully used this process before; the functions were apparently written in VB6.0 and exported as a .dll. I have tried exporting my VB.Net functions as a .dll using the 'class library' template, however labview doesn't seem to be registering these functions.
 
Is there a reasonably straight-forward method of accessing VB.net functions from labview, or creating a .dll in VB.Net similar to those created in VB6.0
 
Any suggestions would be appreciated.
 
Many Thanks
 
Tom
0 Kudos
Message 1 of 2
(2,836 Views)
As long as you are using LabVIEW 7.0 or later, you can do this easily. Look for the .NET palette and drop down the constructor node.

This generates a dialog that lets you pick from all the .NET assemblies (what .NET calls a DLL) that we know about. You'll need to click browse and then locate your DLL.

You should then see your VB.NET class - pick the constructor you want to use.

After that, you use the invoke nodes and property nodes to access the class' methods and properties. Make sure you close the .NET reference returned by the constructor when you are finished with it.

I'll stop there since that should get you started, but feel free to ask more questions. The .NET enviornment is different from LabVIEW, so there are going to be various points where you need to understand them.
0 Kudos
Message 2 of 2
(2,826 Views)