Read Multiple Endpoint

Requires: Base Development System

Reads multiple elements as a block from a Stream channel. You can configure how and when the channel waits for multiple elements.

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

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.
number to read specifies the number of elements the endpoint returns each time. The default is -1.

negative numberThe endpoint returns as many elements as there are in the channel, if any, without any waiting.
0The endpoint waits for the last element and then returns all elements. If a timeout occurs before the last element is available, the endpoint returns all the available elements in the channel.
positive numberThe endpoint waits for the specified number of elements to be available and then returns them. If the last element is transmitted or a timeout occurs before the specified number of elements are available, the endpoint returns all the available elements in the channel.
timed out? returns TRUE if the amount of time specified by timeout in ms elapses. If timed out? is TRUE, last element? will be FALSE.
elements returns the array of data that the endpoint reads from the channel. This output returns an empty array if the channel aborts.
last element? returns whether this is the last element that the endpoint reads from the channel. last element? can be TRUE even if element valid? is FALSE, which means that the last element was already written to the channel during the previous iteration or the channel closes without a valid last element. This output returns FALSE if a timeout occurs or if the channel aborts.
count returns the number of elements in the channel after this endpoint updates the channel. Use this output to monitor the relative writing and reading speed of the channel endpoints and make adjustments, if necessary.

Read Multiple Details

Related Information

Write Multiple

Example

Refer to the Channel - String Processing.lvproj in the labview\examples\Channels\Stream String Processing directory for an example of using the Read Multiple endpoint.

 Open example  Find related examples