CNVReadAsync

int CNVReadAsync (CNVAsyncReader asynchronousReader);

Purpose

Asynchronously reads the value of a network variable using an asynchronous reader connection.

When the asynchronous read operation completes, the data callback function for this connection is called with the read value. The first time you call this function, it reads the value the network variable had when the asynchronous reader connected to it. On subsequent calls, this function reads new values of the network variable.

Note Note  The throughput rate of data with reader and asynchronous reader connections is slower than with subscriber and buffered subscriber connections. If throughput rate is critical to your application, consider using a subscriber or buffered subscriber connection instead.
Note Note  To avoid deadlocks, do not call this function in a network variable callback function.
Note Note  In this operation, the library flushes all network variable connections in your program for better performance. This also affects writer connections by flushing any pending data.

Parameters

Input
Name Type Description
asynchronousReader CNVAsyncReader The handle that identifies the network variable asynchronous reader connection.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. One indicates that a next item was found, zero indicates that a next item was not found, and a negative number indicates that an error occurred.

You can call CNVGetErrorDescription to obtain a string that describes the error.

Additional Information

Library: Network Variable Library

Include file: cvinetv.h

LabWindows/CVI compatibility: LabWindows/CVI 8.1 and later

WAS THIS ARTICLE HELPFUL?

Not Helpful