From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple client-server example?

Hi,

I'm looking for a very simple example of how to use the client-server possibilities
offered in LabVIEW 6i. I would like to control a VI on one machine from another.
Both machines are connected to our LAN.
0 Kudos
Message 1 of 4
(2,917 Views)
Hi Anna,
you can find a numerios of examples in
Labview/examples/comm/datasktx
I hope it help you.

Mike Manzheliy

Anna Soderlund wrote:

> Hi,
>
> I'm looking for a very simple example of how to use the client-server possibilities
> offered in LabVIEW 6i. I would like to control a VI on one machine from another.
> Both machines are connected to our LAN.
0 Kudos
Message 2 of 4
(2,917 Views)
Anna,

There's a tutorial in NI Developer Zone on setting up a Client Server application. If you go to ni.com/zone and search on "Client Server" you should find a tutorial titled "Connecting Multiple TCP Clients to One Server in LabVIEW".

This has a screen shot of what you could put in place in order to support multiple clients. It's pretty simple since it's a FIFO (First in First Out) system which processes one client at a time. If you wanted to process mutiple clients at the same time things could get a little more complex.

As Mike mentioned you should also be able to find a number of examples through the online help in LabVIEW as well.

Regards,
Kamran
An
0 Kudos
Message 3 of 4
(2,917 Views)
Anna,

Sorry for the follow up, after reading your question again, there may be a better solution to what you are trying to do. If what you want to do is control a VI you may be better off using VI Server ... if you go the the Resource Library in NI Developer Zone: http://zone.ni.com/libraries/ and follow LabVIEW to LabVIEW>Connectivity>VI Server you should find a few examples that may prove useful. There are also some VI server examples that ship with LabVIEW that you can use.

Many examples refer to accessing a VI on your own system however by setting up the preferences correctly you can give access to other machines so they can control VIs on the server.

With VI Server you won't have to worry about defining your own interface and parse commands etc. You
can simply create a VI that performs the function you're interested in and then call it remotely ... one example that sounded interested was titled "VI Server and Semaphores over a Network". I haven't tried to run it but the description seemed like it may be what you need.

Kamran
An
0 Kudos
Message 4 of 4
(2,917 Views)