LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use the timestamp of a Network published global variable to reduce network traffic?

Solved!
Go to solution

I would like to use a couple of network-published global variables that will contain large clusters of data.  I want to host them on one device but read them from several - consider a distributed control system.  The data will update very infrequently, but, when it does, I want all my HMIs to know quickly.  I can have all the HMIs just read the data 4x/second (that would be fast enough) but I was wondering if there is a more elegant solution (still using global variables).  If I read only the timestamp 4x/second from each of the HMIs, compare it to the last read, and then poll the whole variable only if the timestamps are different, will that require less resources than just grabbing the whole variable every time?  In other words, does reading the timestamp use the same amount of resources as reading the whole variable?

 

With really simple code, assuming the "Setup Data" cluster is quite large, does....

 

 

...get me any advantage over...

 

0 Kudos
Message 1 of 4
(2,925 Views)

Nope, that won't help you.  The shared variables are only published when there are updates.  Each reader already has their own copy of the data and it only gets updated when the new values are published.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,917 Views)

So that means they are already doing what I want anyway, right?  If the reader only gets updated when the writer changes it, I can poll it as often as I want without increasing traffic, correct?

0 Kudos
Message 3 of 4
(2,911 Views)
Solution
Accepted by topic author mark3545

@mark3545 wrote:

So that means they are already doing what I want anyway, right?  If the reader only gets updated when the writer changes it, I can poll it as often as I want without increasing traffic, correct?


That is correct.

GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(2,901 Views)