Owning Palette: DataSocket VI and Functions
Requires: Base Development System
Dequeues the next available data value from the client-side buffer associated with the connection you specify in connection in and returns the data.
Note Client-side buffering also applies to other protocols, such as opc and file. However, in some cases these servers might lose data. |
Add to the block diagram | Find on the palette |
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 node runs. This input provides standard error in functionality. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 (NI-PSP) data item. Use the value of quality for information for debugging a VI. The following table lists some of the possible quality values.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. This output provides standard error out functionality. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timestamp returns the timestamp data for shared variables and NI Publish-Subscribe Protocol (NI-PSP) data items. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Path to the VI. |
Refer to the Simple DataSocket.lvproj in the labview\examples\Data Communication\DataSocket\Simple DataSocket directory for an example of using the DataSocket Read function.