Read With Abort Endpoint

Requires: Base Development System

Reads an element from a Messenger 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 Messenger 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 Messenger channel terminal or wire and selecting Create»Channel Reader»Messenger»Read With Abort.

Details  Example

timeout in ms is the time, in milliseconds, that this endpoint has to read the elements from the channel. The default value is -1, which means there is no time limit.
channel is the channel wire that connects this endpoint to a writer endpoint.
ack id specifies the ID number of a message to be acknowledged. This input allows the endpoint to acknowledge receiving the previous message. Use this input as an alternative to the Write Ack endpoint to enable acknowledgement in the channel. You can use Write Ack on every iteration after reading a message, or you can use this input so that the reader endpoint both acknowledges the previous message and reads the next message. The default is 0.
abort specifies whether to abort this channel. The default is FALSE. If abort is TRUE, this endpoint marks the channel as closed and ignores further calls to read. Meanwhile, the aborted? output returns TRUE on the next call of this endpoint.
timed out? returns TRUE if the amount of time specified by timeout in ms elapses.
element returns the data to read from the channel.
remaining returns the number of elements that remain in the channel after this read operation.
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

Example

Refer to the Channel Message Handler.lvproj in the labview\examples\Channels\Channel Message Handler directory for an example of using the Read With Abort endpoint.

 Open example  Find related examples