LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling .NET Assemblies From LabVIEW

Hi,

 

I am developing an application in the LabVIEW and everything is going as planeed so far 🙂

We recently bought an IR sensor from the irisys company and it provides us with .NET and Java API. I need to use the API to connect to the sensor and get/set data. Due to the fact that LabVIEW suports calling .NET assemblies, I decided to use the .NET APIs. The problem is that when I try to run the program in labVIEW, the whole labVIEW freezes! I do not know what the problem is. Is it beause of the API or because of the labVIEW itself. I used MS visual studio to check the code, and found no exeption or odd behaviour!

I have attached my vi and this is the .NET API which I am using (link). I will appreciate if you give me hint.

0 Kudos
Message 1 of 6
(3,131 Views)
0 Kudos
Message 2 of 6
(3,124 Views)

Thank you nyc for the link. But I think I used the correct blocks. I do not know what is the real problem (its from the labview or from .net API).

I have attached the C# code whitch is provided by the vendor. In the main method we have:

 

BlackfinEngine engine = new BlackfinEngine();
engine.StartEngine();

 

and I tried to implement it in labview using the .net blocks (the vi that I attached to my first post), but labview freezes and I should close the labview process from the task manager.

0 Kudos
Message 3 of 6
(3,084 Views)

Could it be that your .Net assembly is using .Net 4.x? See here for more info to this and how to do a workaround if this is your problem.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 6
(3,079 Views)

Yes, According to the documentation we should install .Net 4.x. I followed the instructions in the link you provided, and create a config file near labview.exe in C:\Program Files\National Instruments\LabVIEW 2011\LabVIEW.exe. but the freezing happened again.

 

The vendor also provides us other APIs (WinAPI, JavaAPI, LinuxAPI). can I check other APIs in the labview? does labview have a mechanism to inherently support WinAPI or JavaAPI?

0 Kudos
Message 5 of 6
(3,077 Views)

JavaAPI would seem unneccessarily involved. WinAPI most likely means DLL function exports which you can call with the Call Library Node, but some basic C knowledge about datatypes and such is definitely a huge advantage when going this road.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(3,074 Views)