Read With Abort Endpoint

Requires: Base Development System

Reads a value from a Tag channel or signals the channel to abort. This endpoint is the same as the Read endpoint except that it has an abort input and an aborted? output. You can use the abort capability of the Tag channel to close a channel abruptly, ignoring any data left in the channel buffer. You must use this endpoint together with the Write With Abort endpoint.

You can drop this endpoint on the block diagram by right-clicking a Tag channel terminal or wire and selecting Create»Channel Reader»Tag»Read With Abort.

Details  Examples

timeout in ms is the time, in milliseconds, that this endpoint has to read the elements from the channel. The default is 0.

0 or moreThe endpoint waits for a new element but no longer than the specified number of milliseconds.
-1The endpoint waits until a new element is written since the last time the endpoint read from the channel.
channel is the channel wire that connects this endpoint to a writer endpoint.
abort specifies whether to abort this channel. If abort is TRUE, this endpoint will not perform further read operations until the whole channel is reset. Reset occurs when the common caller VI of both the writer endpoint and the reader endpoint begins another iteration.
missed returns the number of times that the element from the channel has been overwritten.

-1The element has not been overwritten since the last successful read operation. Or the element has not been written at all if this is the first time the element was read. Or the channel was aborted from any endpoint.
0The element is newly written since the last successful read, even if the newly written element is the same as the previous element.
positive numberThe element has been overwritten the specified number of times between this endpoint's last read operation and this read operation.
element returns the data that this endpoint reads from the channel. If a timeout occurs or the channel aborts, the data will be the last value that this endpoint reads from the channel.
aborted? returns TRUE if abort occurred on this endpoint or the writer endpoint connected to the channel. If aborted? is TRUE, further calls to this endpoint will do nothing except returning aborted? TRUE again.

Read With Abort Details

Related Information

Write With Abort

Examples

Refer to the following VIs for examples of using the Read With Abort endpoint: