LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Checking for running applications on remote machines

I am trying to check for application running on remote machine - it could be LV or some other application.

I have Server and Client applications (developed in LV) running as .exe on separate computers. Only LV-Runtime is installed. They exchange data via Datasockets. The problem I have is that if Client is launched before the server the (Client) takes ownership of certain sockets which causes Server to fail on startup. All the remote Clients have to be shotdown before Server can be started again properly.

I was wondering if anyone has run into a similar problem.
0 Kudos
Message 1 of 7
(3,605 Views)
Hi Slawek,

I have attached an example VI that uses a LabVIEW Code Interface Node to make calls to the Windows API to enumerate the processes running on a system.

Hopefully this will solve your problem. Good luck!

Kileen C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,605 Views)
When the client app starts, it can try to open TCP connections to port 3015(Datasocket) and port 3363 (default TCP VI Server) to see if they are listened to by the server. If the connections fail the server is not running. If they succeed, close them.

You could also set the server to reply to some UDP broadcast request when it is running. That allows to identify which servers are online on the network without knowing their IP.


LabVIEW, C'est LabVIEW

0 Kudos
Message 3 of 7
(3,605 Views)
Thank you for your suggestion. I like the UDP idea although I am not sure if it will work in my case - I have firewalls and such between the Server and Client.

As to the first option, would I have to have TCP 3363 open on the Server all the time?
0 Kudos
Message 4 of 7
(3,605 Views)
How can apply this to query a remote machine?
0 Kudos
Message 5 of 7
(3,605 Views)

Hi Slawek,

Yes, you would want to have port 3363 (or whichever port you decide to use for TCP/IP communication) open while you are expecting information to be send from your client application.

For more information regarding TCP/IP and UDP in LabVIEW:
KB 21O937LI. When to Use UDP Instead of TCP
Using LabVIEW with TCP/IP and UDP

Best of luck.
Kileen C.
Applications Engineer
National Instruments

0 Kudos
Message 6 of 7
(3,605 Views)

Hi Slawek,

I would suggest using Remote Front Panels in LabVIEW. Remote front panels allow you to view and control a VI front panel remotely, either from within LabVIEW or from within a web browser, by connecting to the LabVIEW built-in web server. There is a tutorial Developer Zone: Remote Panels in LabVIEW -- Distributed Application Development that will provide you with more information.

Also, there are example programs in LabVIEW that walk you through how to programmatically connect to a remote front panel. Go to LabVIEW >> Help >> Find Examples >> Networking >> General >> RemotePanelMethods-Client/Server.vi.

Hope
this helps and good luck!

Kileen C.
Applications Engineer
National Instruments

0 Kudos
Message 7 of 7
(3,605 Views)