LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview C# interface

I currently have a complex system that is control mainly by LabVIEW but one other smaller component run by a C# code. I would like to control a code written in C# with LabVIEW. (The C# code was written in Microsoft Studio). Is this possible? How would I go about doing this?
0 Kudos
Message 1 of 5
(4,460 Views)

This has been asked many times. Have you tried a search on how to call .NET from LabVIEW?

 

If the C# code is an assembly then simply use the .NET functions. Note that depending on your LabVIEW version you will have limitations on which versions of .NET is supported. Check your LabVIEW documentation. If the C# code is an application then you can either compile the relevant code into a separate, reusable C# assembly or use a more general method for controlling applications. This has also been discussed many times in the forum.

0 Kudos
Message 2 of 5
(4,457 Views)

I have a sitation that is sort of the other way around. I am deveoping a C# based application but I want to integrate a LabView window into that app.

Calling a c# DLL isn't the goal, It is more along the lines of calling LabView from c#.

 

Any ideas?

 

Bob.

0 Kudos
Message 3 of 5
(3,660 Views)

We understand that you are new to the forum, but its not cool to hijack someone else's post from 5 years ago. Please post a new one.

 

If you need some guidelines to using this forum, please read this:

http://forums.ni.com/t5/Feedback-on-NI-Discussion-Forums/Quick-Introduction-to-the-Forums-for-New-Us...

 

Secondly just a search should give you enough results. http://search.ni.com/nisearch/app/main/p/bot/no/ap/global/lang/en/pg/1/q/call%20a%20labview%20dll%20...

 

Examples like these should help:

http://www.ni.com/example/26685/en/

 

You can build a dll using LabVIEW which can be called by your application.

 

Building Interop Assemblies: http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/building_a_net_assembly/

 

Also there is an example that ships with LabVIEW which may help with data passing: C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\dll\data passing

 

Hope this helps.

 


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 5
(3,648 Views)

Thanks for this info.

 

Bob.

0 Kudos
Message 5 of 5
(3,641 Views)