You can drag a shared variable from the Project Explorer window to the block diagram of a VI in the same project to create a Shared Variable node from which you can connect to VIs and functions.
You also can place a Shared Variable node on the block diagram and bind it to a shared variable. Complete the following steps to use a Shared Variable node to read and write shared variable values on the block diagram.
Once a Shared Variable node is bound to a shared variable, you can wire the Shared Variable node to VIs and functions.
When you drag a shared variable from the Project Explorer window to the block diagram or place a Shared Variable node on the block diagram, LabVIEW configures the Shared Variable node to read data. To configure the Shared Variable node to write data, right-click the Shared Variable node and select Change to Write from the shortcut menu.
To record a timestamp value each time a single-process shared variable reads data, you must first place a checkmark in the Enable timestamp checkbox on the Variable page of the Shared Variable Properties dialog box. To view the timestamp information and add a timestamp output to the Shared Variable node, right-click the Shared Variable node and select Show Timestamp from the shortcut menu. To hide the timestamp output, right-click the Shared Variable node and select Hide Timestamp from the shortcut menu. If you disable the timestamp and the Shared Variable node has a wired timestamp output, the timestamp terminal is hidden, potentially breaking the VI.
![]() |
Note The timestamp is always enabled for other types of shared variables. |
If you are using a network-published Shared Variable node that is configured to read data, you must run each Shared Variable node before the node subscribes and starts receiving buffered values.
You also can use the DataSocket VI and functions to read and write shared variable data programmatically using the NI Publish-Subscribe Protocol (NI-PSP).