LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared variable over the network

 

I have a labview executable deployed in three to four PC's detecting whether one particular process is running or not.

This ON/OFF condition of each processes in each PC is to be transmitted onto another PC.

 

All the Pc's are connected via LAN with specific static ip.

 

The ON/OFF status is to be updated every 10 minutes in the master PC.

For this i should be using a shared varibale right?

 

So now, i want to share that particular boolean variable (ON/OFF status) of 4 processes to the master PC.

 

Please do suggest a way to perform this.

Regards
Grugh Mike

Success is Everything !!
0 Kudos
Message 1 of 4
(2,191 Views)

Hi Mike!

 

You are on the right track with using a shared variable to communicate the Boolean values to a master PC; specifically you will want to use a network-published shared variable.  Do you have any experience in using these?

 

The way you create the variable is similar to building a single-process shared variable into a project.  This link gives a fairly in-depth overview of shared variables, including publishing them to the network.

 


The ON/OFF status is to be updated every 10 minutes in the master PC.


To achieve this you could poll how much time has elapsed since the code started; when you reach 10 minutes, update the variable value and restart the timing.  Alternatively you might consider triggering a write to the shared variable when your process changes state.

 

Hopefully this helps you get started!  If you have any other questions I'll be happy to help.


Regards,

Peter D

0 Kudos
Message 2 of 4
(2,172 Views)

Thank you Pete.

 

I dont have any experience in using shared variable.

I am using it for the very first time.

 

I would be happy if you could attach some vi for each server and client dealing with the network published shared variable. 

 

Thank you in advance.

Regards
Grugh Mike

Success is Everything !!
0 Kudos
Message 3 of 4
(2,156 Views)

Hi Mike

 

Thanks for getting back to me about this.  I have put together a demo of network-published shared variables and have tested it here in the office this morning.

 

Instructions

 

  1. Open Publish and Subscribe.lvproj on both the server and client computer
  2. On the server PC, right-click Shared Data.lvlib and select Deploy
  3. On the client PC, right-click the Stop shared variable and select Properties
  4. Select Enable Aliasing.  Under Bind to, select PSP URL
  5. Click Browse... and navigate to <Computer Name>»Shared Data.lvlib»Stop
  6. Repeat steps 3-5 for the Data shared variable
  7. On the server PC, run the Publisher VI
  8. On the client PC, run the Server VI

Use the Stop button on the Subscriber (Client).vi to stop both VIs.

 

Hope this helps!


Regards,

Peter D

Message 4 of 4
(2,143 Views)