Open and Verify Variable Connection Function

Owning Palette: PSP Variable VI and Functions

Requires: Base Development System

Opens a connection to a shared variable and verifies 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.
timeout ms specifies the time, in milliseconds, that the function waits before timing out. The operation aborts if it does not complete within timeout ms. To disable timeouts, set timeout ms to -1.
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 and Verify Variable Connection Details

Use this function when you do not want to add code to wait explicitly for the connection to open before using the connection to read or write variables.