Open Variable Connection in Background Function

Owning Palette: PSP Variable VI and Functions

Requires: Base Development System

Opens a connection to a shared variable in the background. This function does not wait to verify that the connection is opened successfully.

Details  

 Add to the block diagram  Find on the palette
buffer size in elements specifies the number of elements to include in the client-side buffer for the variable connection. The default is 0, which specifies no buffering. When you wire a value of 2 or greater to this input, the function creates a read buffer, a write buffer, or both, depending on the read and write access settings you specify using the access input. If you wire a value of 1 to this input, the function returns an error.
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.

Open Variable Connection in Background Details

Use this function when you need to open a large number of PSP Variable connections quickly. For large quantities of PSP Variables, this function is more efficient than the Open and Verify Variable Connection function. However, when you use this function, you must add code to wait explicitly for the variable connection(s) to finish opening before using the connection(s) to read or write variables. If you do not add code to wait explicitly for the connection(s) to open, the read and write function(s) might return errors on the first one or more iterations.