03-17-2014 05:03 AM
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
03-18-2014 03:35 AM
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
Hope above links will help you.
Best Regards.
Cla_CUP
NI Italy
03-18-2014 03:50 AM
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
09-12-2019 03:47 AM
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.