キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

implementing a .net function within labview

I haven't even a basic knowledge of .net interface within Labview (or .net in general).  I have a thrid party programmer writing a function for me that wants to deliver it as a .net DLL.   I will call the DLL from within Labview 8.5 and send in a string of info into the DLL and the DLL will pass back a string of info after it does its thing.   

 

I found the .net hooks in Labview and have read as much as is readily available but I still have no idea how to make this happen.  It seems everything that I find to read assumes you have some background already.

 

Can anyone suggest a document that walks through this process " a tutorial for total dummies" that doesn't require an indepth knowldege for implementation.

0 件の賞賛
メッセージ1/5
3,232件の閲覧回数

I am not sure if you'll be able to find that kind of tutorial on the NI website but you should be able to find examples that show you how to call these assemblies from LabVIEW. What I first think you should do is to understand how .NET actually works. You can do this by searching for a tutorial on the Internet. Next, try to find tutorials on the Internet (again) to understand how they are called and work with programming languages in general. Then, I believe the implementation in LabVIEW will start making more sense to you.

 

If you have a particular example that you did like to understand, be sure to share that with us over here and we can try to help you out. Good luck!

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 件の賞賛
メッセージ2/5
3,217件の閲覧回数

Assuming the programmer is creating a private assembly, you'd first place the .NET assembly in the same folder as your project/VI. .NET has specific rules on how it finds dependent assemblies. Thus, if the only dependent assemblies are the "standard" ones that ship with .NET, then you would only need the single assembly the programmer created. Otherwise  you would need to also place any other required assemblies in the same location.

 

To call a .NET method for a class, the basic steps are:

  1. Use a Constructor to create an object of the required class - when you place the contructor on the block diagram a dialog pops up asking you to select the assembly. You'd click the "Browse" button to select the private assembly. Then, in that same dialog you'd select the class that needs to be instantiated. I can't tell you what that will be since it's dependent on how the assembly was written.
  2. Use an Invoke Node to select the method you want to call - just connect the constructor node to the Invoke Node and then left-click on the Invoke node to display a popup that lists the available methods. Select the one you need. The parameters for it should be automatically populated. Wire up the appropriate constants/controls/indicators.
  3. Use a Close Reference to close the object.

If the programmer who is giving you the .NET assembly created a static method, then step (1) would be skipped - you'd select the .NET class directly for the Invoke Node.

 

 

0 件の賞賛
メッセージ3/5
3,208件の閲覧回数

Thanks for the help so far.

 

Can anyone tell me what .net Framework is supported by LV 8.5.  I have 4.0 loaded on my machine but the NI Help that I downloaded alludes to the 1.1 service pact.

 

I am trying to use the Constructor to point to my .Net  DLL but it does not recognize the DLL as a .net assembly.  The assembly was created as a 4.0 and I wonder if I have a version conflict with the .Net Framework.

 

 

0 件の賞賛
メッセージ4/5
3,182件の閲覧回数
LabVIEW 8.5 supports up to .NET 2.0.
0 件の賞賛
メッセージ5/5
3,178件の閲覧回数