Open and Verify Variable Connection
- Updated2025-07-30
- 4 minute(s) read
Opens a connection to a shared variable and verifies that the connection is opened successfully.

Inputs/Outputs
buffer size in elements
—
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
—
data type
—
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
—
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 (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
access
—
access specifies read access and write access settings for the shared variable connection.
shared variable refnum out
—
error out
—
error out contains error information. This output provides standard error out functionality. |
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.
buffer size in elements
—
shared variable refnum in
—
data type
—
timeout ms
—
error in (no error)
—
access
—
Read Access
—
shared variable refnum out
—
error out
—