Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

communicate between C# window application and Labview

Hello all!

 

Now what I shall do is to use both labview application and C# window application for my project. Basically it's that the state change in labview triggers an event in C#. As a short description, my labview application receives UDP message from an external device and shows them on the front panel. I'd like that when the received message reaches for example 10, the C# application is triggered to implement a switch.

 

I got the idea to use .Net object in labview, a constructor node to get a reference to my C# app, and in my C# app expposing public methods telling the app something happened in the LV app. I think that would help but I don't know how.

 

Anybody could give me an example of that. The importance for me is to know how should I set the constructor node in labview, and what is to add in C#, like "using labview" in the header.

 

Thanks in advance!

 

Chao

Message 1 of 4
(7,410 Views)

Hi jcraffael,

 

I found some examples you can explore, in order to better understand how to include external code in LabVIEW:

 

Using External Code in LabVIEW

 

Calling .NET Assemblies From LabVIEW

 

Running a C DLL in LabVIEW

 

Hope above links will help you.

 

Best Regards.

 

Cla_CUP

NI Italy

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

Hi Cla_Cup,

 

thanks for the kind reply. I'm sure those help if my purpose is using external code in labview. However my purpose is in the contrary. I hope to transmit a data (the counted number in labview), or a state change (when the counted number reaches 10), from lv to C#. The C# app shall receive this change and react.

 

So what I need is to export data from LV (using sth like constructor node?), import data to C# (using specific headers and sentences?). I don't know if you can help me with that.

 

Thanks!

 

Chao

0 Kudos
Message 3 of 4
(7,390 Views)

For anyone reading this who is trying to do something similar, there are now examples provided with LabVIEW and a good tutorial on the developer center: Inter-Application Communication using TCP and .NET Remoting.

0 Kudos
Message 4 of 4
(3,514 Views)