|LabVIEW 2016 Help|
|LabVIEW 2017 Help|
|LabVIEW 2018 Help|
|LabVIEW 2019 Help|
|LabVIEW 2020 Help|
When you bind a shared variable to an existing data source, the shared variable receives the same updates as that data source. Possible data sources for shared variables include DAQ channels; NI Publish-Subscribe Protocol (NI-PSP) data items, such as other shared variables; and data items from I/O servers that are defined in a separate project.
Bind a shared variable to an existing data source if you need to leverage shared variable features for a data source that does not support those features. For example, assume that you need to set logging and alarming properties for a shared variable on a CompactRIO target. Because real-time targets do not support logging and alarming, you must create a new shared variable on your development computer, bind that shared variable to the shared variable on the CompactRIO target, and configure the shared variable on the development computer for logging and alarming. When the shared variable on the CompactRIO target sends new data to the Shared Variable Engine (SVE), the SVE updates the value of the shared variable on your development computer, and that shared variable performs the logging and alarming tasks.
|Note When you bind a shared variable to an existing data source across a network, LabVIEW does not track configuration changes to the data source. Therefore, in the example above, if you change the name of the variable on the CompactRIO target, you also must update the configuration of the shared variable on your development computer, or that shared variable breaks.|
Complete the following steps to bind a shared variable to an existing data source.
|Note If the data item is on a computer that is not on the local subnet, you must select Tools»Shared Variable»Register Computer to register that computer. After you specify the computer name or the IP address of the computer, you can bind shared variables to data sources on that computer.|