LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I control the run button of my project VI from a C# application onclick event?

We am working on a project on eye tracking. We run a labVIEW vi through which the co ordinates of the path of eye movenment are added to a txt file and we process the text file in run-time for getting the path in my C# application.

This requires us to run the VI when I click a button in the c# application window. and stop running it when I press another.
We haven't been able to interface the C# application with LabVIEW. The ready made app dll's didnt come of help because of our inexperience.
We have tried using the Process.start(in C# diagnostics) functions to run LabVIEW onclick,but still doesnt solve our problem clicking the run button in background.

Any stepwise guide would be appreciated,concerning labVIEW dll or,other.

Just to make things clear,
Our project GUI is a C# wpf application. We need to run a labVIEW vi in background. (need control over run)
Any help would be appreciated. Thanks a lot!

Our system:
Windows 8/8.1
NI LabVIEW 2014 Student edition(with Vision assistant,mathscript,Vision development module)
Microsoft Visual Studio 2013 Professional (WPF C# application)

0 Kudos
Message 1 of 5
(3,163 Views)

Hi sdadsa,

 

use some network communication (UDP, TCP) in both of your programs: in your LabVIEW Vi as well as in the C#-application.

 

Send commands (like "start" and "stop") from your C# app to your VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,144 Views)

LabVIEW executables also have an ActiveX interface you can turn on.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 5
(3,127 Views)

LabVIEW can generate an assembly that you can reuse in C#, that's the best .NET integration build we offer. You define the namespaces, classes and methods in the Application Builder, build the assembly and add it as a reference to your C# project 😃

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 4 of 5
(3,095 Views)
Your LabVIEW VI can be built as a dll which will run as soon as you call it. You can also build it as a .NET assembly.
0 Kudos
Message 5 of 5
(3,099 Views)