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.


icon

Inputs/Outputs

  • ci32.png timeout in ms (-1)

    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.

  • cqueuern.png channel

    channel is the channel wire that connects this endpoint to a writer endpoint.

  • ci32.png number to read (-1, available)

    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.
  • ibool.png timed out?

    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.

  • i1di16.png elements

    elements returns the array of data that the endpoint reads from the channel. This output returns an empty array if the channel aborts.

  • ibool.png last element?

    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.

  • ii32.png count

    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.

  • Related Information

    Write Multiple

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Channels\Stream String Processing\Channel - String Processing.lvproj