Open Variable Connection Function

Owning Palette: Shared Variable Node, VI, and Functions

Requires: Base Development System

Opens a connection to a shared variable.

You cannot buffer data that you read or write with this function. To enable buffering, use the Open and Verify Variable Connection or Open Variable Connection in Background function instead.

 Add to the block diagram  Find on the palette
shared variable refnum in is the reference to the shared variable or I/O variable container. You can right-click this input terminal and select Create»Control or Create»Constant to create this reference. You then can click the control or constant and select Browse to display the Browse Variable Objects dialog box. You also can find variable references programmatically. This input terminal accepts string values too. If you know the exact NI-PSP variable address, you can type the address into a string control and directly wire that string control to this input terminal.
data type specifies the data type of the shared variable or I/O variable container. For I/O variable containers, you must specify an array data type. This input is available only if the data type has not been previously specified. You can specify a data type by placing a checkmark in the Specify Data Type checkbox on the Configuration page of the Properties dialog box for the variable refnum. If you specify the data type upon opening the connection, this terminal is unavailable on subsequent read and write functions.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
access specifies read access and write access settings for the shared variable connection.
Read Access specifies read access settings.

0Allowed—You can use the shared variable connection to read the value of the shared variable.
1Required—You must use the shared variable connection to read the value of the shared variable. If you set this option and LabVIEW cannot open the variable connection for reading, the function returns an error.
2None—You cannot use the shared variable connection to read the value of the shared variable.
Write Access specifies write access options.

0Allowed—You can use the shared variable connection to write to the shared variable.
1Required—You must use the shared variable connection to write to the shared variable. If you set this option and LabVIEW cannot open the variable connection for write, the function returns an error.
2None—You cannot use the shared variable connection to write to the shared variable.
shared variable refnum out is the reference to the shared variable or I/O variable container.
error out contains error information. This output provides standard error out functionality.