LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does "Open Variable Connection" have any effect on a locally-hosted Shared Variable?

http://zone.ni.com/reference/en-XX/help/371361M-01/lvcomm/sv_dynamic_read/ says, "Caution  If you use this function to access a shared variable without first opening a connection to the variable, LabVIEW automatically opens a connection to the variable. However, this implicit open operation can add jitter to the application. Therefore, National Instruments recommends that you open all variable connections with the Open Variable Connection function before accessing the variables."

 

This makes sense for variables hosted on a different machine on the network.

 

However, I was wondering about variables hosted on the machine that performs the reading. Does opening the connection beforehand provide any advantages? (ignore the possibility of reusing the same code on a different machine).

Certified LabVIEW Developer
0 Kudos
Message 1 of 2
(2,616 Views)

Hello JKSH,

 

Even when accessing the variable through the host machine opening the connection is recommended. These types of variables need to be addressed and connected to, it may take less time to connect to the variable from the host machine, but it still can add jitter to your program execution.

 

 

0 Kudos
Message 2 of 2
(2,559 Views)