LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recommended machanism to control labview over network

Solved!
Go to solution

Hello,

a rather general question but I hope to get some recommendation.

I really searched a lot but somehow lost my orientation.

 

I am building a labview2013 executable which can be used on a local PC as any normal programm.

 

But I also want to be able to access the labview executable from a remote PC and set controls and run VIs.

The controlling application on the remote PC will be developed in C# (VS2010 or VS2013)

 

So I'd like to ask which is the best way to remote control a labview executable over the network with C#?

 

Kind regards,

Ralf

0 Kudos
Message 1 of 11
(3,013 Views)
Solution
Accepted by topic author Pechmann

Hi Pechmann,

 

I can suggest using network communication (UDP, TCP) to send commands to your LabVIEW program( acting as server) and to send data to your client/remote control…

 

Best regards,
GerdW


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

I second the use of TCP/IP.  You can make up your own command structure that both LabVIEW and C# can handle.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 11
(2,999 Views)

If you are bound to using C# on your remote, consider setting up your local LabVIEW app to use LabVIEW Web Services. Then, you will be able to send commands from the remote and receive messages back from the local. This could be done simply in a browser or you could write a C# to communicate using basic HTTP protocol. Tools for doing this are built into both LabVIEW and Visual Studio.

 

Or, if you can install the LabVIEW Run-Time Engine on the remote, then you can use Remote Front Panels on the local. The VI can be seen and controlled in a web browser. 

 

Both of these methods are built into LabVIEW and C# and are easily accessible. Google "restful web'' plus C# or LabVIEW to see some examples and tutorials.  

 

 

JohnCS

0 Kudos
Message 4 of 11
(2,973 Views)
Depending upon how comfortable you are with c# you could also create a small .NET assembly in LV that handles the network communications. The C# program, would call the .NET assembly that would then handle the comm with the LV application.

The advantage of this approach is that it would open up your options for communicating with the remote application.

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 5 of 11
(2,954 Views)

Hello Gerd,

did I get it right that you did not mean a built-in web-service or something but instead to program a tcp listener with the tcp lib-vis in the labview application?

 

Greetings,

Ralf

0 Kudos
Message 6 of 11
(2,939 Views)

@Pechmann wrote:

Hello Gerd,

did I get it right that you did not mean a built-in web-service or something but instead to program a tcp listener with the tcp lib-vis in the labview application?

 

Greetings,

Ralf


That's exactly what I recommend


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(2,934 Views)

Hallo Ralf,

 

as crossrulz and I said:

You need to program some communication on both sides: LV program and C client…

Best regards,
GerdW


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

Thanks for your replies.

I'm going to use the TCP approach in C# and LabView.

 

Another advantage is that I don't need a labview runtime on the client side.

 

Regards,

Ralf

 

0 Kudos
Message 9 of 11
(2,850 Views)

@Pechmann wrote:

Thanks for your replies.

I'm going to use the TCP approach in C# and LabView.

 

Another advantage is that I don't need a labview runtime on the client side.

 

Regards,

Ralf

 


...and the disadvantage is that if that when that protocol changes you are now modifying two separate applications written in two different languages.

 

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 10 of 11
(2,801 Views)