LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to retrive data from a Global Variable?

Here is what I want to do,
 
I have several PC's that run different types of tests. I want to use a global variable, running on a single PC, that acts like a sever that can be accessed by the other PC's in my lab. This Global variable will store the hostnames of the different PC's that are currently running each test, along with a description of the test.  Then, a user can access this Global variable to read the different values and select the PC and connect to it's desktop using Remote Desktop in Windows.
 
Is it possible to write data to the Global variable that is running on the single PC?
 
What is the best way to do this? Does anyone have a sample VI?
 
What is the best way to then read the data from the Global variable?
 
(I will probably use an array\cluster to store the hostnames.) 
0 Kudos
Message 1 of 6
(2,385 Views)
if you are going to be talking across computers then i recomend useing the tcp functions
0 Kudos
Message 2 of 6
(2,372 Views)

The lv8 shared variable is perfectly suited for this task.

 

greetings from the Netherlands
0 Kudos
Message 3 of 6
(2,358 Views)

So using LabView 7.1, it seems like the best solution is to use a single PC that has a constantly running VI, acting as a server module. Then using TCP or UDP communication, recieve values and send values.

 

 

0 Kudos
Message 4 of 6
(2,339 Views)
LV 7.1? You could try using DataSocket to publish and read your data. Examples ship with LabVIEW. Look at the "DS Reader" and "DS Writer" examples.
0 Kudos
Message 5 of 6
(2,320 Views)
Another pre-LV8 idea...
 
A functional global can be accessed using VI-Server and called using "call by reference".
 
This approach harnesses the TCP functionality built into the VI-Server to manage the conncetion.
 
This can be pretty quick and (if the functional global is written correctly) will support buffered- mixed data types. (Try to do that with the Shared Variable Smiley Wink ).
 
Just another idea,
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 6
(2,282 Views)