LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does any body have step by step instructions to create network shared variables?

My application involves communicating between two labview programs running on two different computers connected over ethernet. Two computers send system status data, which contains several numeric variables to another master computer in the network. After recieving the data from both the computers the master computer processes the real time data and sends some commands to both the computers. The commands are in the form of a boolean, a string and two numeric variables. Does anybody have any step by step instructions on how to create network shared variables for an application such as this? I am using labview 8.6 on all computers.

 

Thanks for the help!

 

Shyam

0 Kudos
Message 1 of 5
(2,217 Views)

You can combine everything to a cluster and transfer the data using shared variable. For tutorials and materials on shared variables you can find here.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 5
(2,210 Views)

Thank you for your reply. But I looked through those examples already. I am unable to find an example which specifically talks about sharing data between two computers. I am looking for some step by step instructions on how to link two shared variables. For example in one of the examples the following screenshot is posted where the user seems to have added another computer/device RT-8196 to the project.

untitled.PNG

 

I am not able to do that in my project.

 

Shyam

0 Kudos
Message 3 of 5
(2,186 Views)

Ok I'll try to explain Step by step please correct me if I make any mistake because I have not played much with shared variables.

 

To create a shared variable to an RT target go to the target if tou have already otherwise add an RT target by right clicking the Project>>Add targets and Devices

 

Then in the target Right clikc and select the variable as shown below.

 

Select Variable.png

 

Then once the Shared variable settings window opens Enter a variable name and then Select the type "Network Published"

 

Basic Variable Setting.png

 

In the right side you can select the data type for the shared variable and even you can choose your custome controls.

 

After selecting the data type go for the Network and select buffering if required else leave it if you are planning to use the variable just for display purpose.

 

 

Then you can enable the RT FIFO if required (Not able to explain how it works and why it is used).

 

Then after completing the Shared variable setup you can access the variable in the VI in both the Host and the RT.

 

You can bind the variable to a control so that if any data from the RT is coming you can read the data from that control.

 

Data Binding 1.png

 

 

Data Binding 2.png

 

 

Data Binding 3.png

 

 

Select Shared Variable BD.png

 

 

Variable in BD.png

 

 

Final Shared Variable.png

 

Once you have placed your shared variable in the BD you can change the access typr to read or write depending on your need.

 

This might not explain the complete shared variable concept but I believe that this would defenelty give you a kick off to start using the shared variable. Please correct or add more comments if anybody know better.

 

Good luck.

 

 

-----

The best solution is the one you find it by yourself
Message 4 of 5
(2,176 Views)

There is still one problem.I do not have an RT target. I am trying to communicate between two computers. My project explorer looks like this.

 

untitled.PNG

 

My question was how to add another computer as a target.

 

Shyam

0 Kudos
Message 5 of 5
(2,167 Views)