 |
connection in identifies the data source to read.
connection in can be a string that describes the URL, a shared variable control, a connection id reference parameter output from a DataSocket Open function, or a connection out parameter output from a DataSocket Write function.
|
 |
type (Variant) specifies the type of data you want to read and defines the type of the data output terminal. The default type is Variant, which can be any type.
Wire any data type to this input to define the output data type. LabVIEW ignores the value of the input data.
|
 |
ms timeout specifies how long to wait for a value update to become available in the connection buffer.
The function ignores this input and does not wait if wait for updated value is FALSE and an initial value arrived. The default is 10,000 ms (10 seconds).
|
 |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
 |
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
|
 |
code is the error or warning code. The default is 0.
If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
|
 |
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
|
|
 |
wait for updated value causes the function to wait for an updated value if set to TRUE.
If the connection buffer contains unprocessed data, the function returns the next available value immediately. Otherwise, the function waits ms timeout milliseconds for an update. If an update does not occur in the timeout period, the function returns the current value and timed out is TRUE. If wait for updated value is FALSE, the function returns the next available value in the connection buffer or the last value read if no data is available.
|
 |
status reports warnings or errors from a PSP server or FieldPoint controller. If the 31st bit is 1, status indicates an error. Otherwise, status indicates a status code.
|
 |
quality is the data quality of the data read from a shared variable or an NI Publish-Subscribe-Protocol data item. Use the value of quality for information for debugging a VI.
The following table lists some of the possible quality values.
| Bit Number | Description | | 1 | The value from this shared variable might not be the most current value from the data source. | | 2 | Sensor failure. | | 3 | General device error response. | | 4 | Server failure. | | 5 | General communications failure. | | 6 | Unable to locate variable in the Shared Variable Engine. Deployment of this variable may have failed. | | 7 | The shared variable has no known value. | | 8 | The shared variable is inactive. | | 10 | Low Limited. | | 11 | High Limited. | | 12 | Constant. | | 13 | Sensor inaccurate. | | 14 | Engineering unit limits exceeded. | | 15 | Generic OPC Error. | | 16 | Math error. | | 17 | Communications link failure. | | 18 | NI-PSP has not connected to the server yet. | | 19 | DNS lookup failed for the server. | | 20 | The server is not reachable. | | 21 | Service lookup failed for the server. | | 22 | The connection to the server was disconnected. | | 23 | The process was not found or is not responding. | | 24 | Failed to resolve URL for this shared variable. | | 25 | Read access is denied to the shared variable. | | 26 | Invalid URL for this shared variable. | | 30 | Point has an active alarm. | | 31 | Subscription failed. | | 32 | Quality bit greater than 32 is set, or there is an error/status reported. | | 33 | The shared variable client-side read buffer is full. | | 34 | The shared variable client-side read buffer overflowed. | | 35 | The shared variable server-side write buffer is full. | | 36 | The shared variable server-side write buffer has overflowed. |
|
 |
connection out is the data source that specifies the data connection.
|
 |
data is the result of the read. If this function times out, data returns the value that this function last read. If this function times out before reading any data or if the type of data is incompatible, data returns a value of 0, empty, or an equivalent value.
|
 |
timed out returns TRUE if the function timed out waiting for an update or an initial value.
|
 |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
 |
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
|
 |
code is the error or warning code.
If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
|
 |
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.
|
|
 |
timestamp returns the timestamp data for shared variables and NI-PSP data items.
|