Table Of Contents

Read Multiple Elements from Stream (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Reads an array of elements from a network stream. You can call this node from the reader endpoint only.

    connector_pane_image
    datatype_icon

    number of elements

    Number of elements you want to read from the stream. Use the Available Elements for Reading property of the Network Streams Property node to determine the number of elements in the stream.

    Default Value Behavior for -1

    If you use the default value for this input, the timeout in ms input is ignored, and this node immediately returns any data available for reading. However, if you use the default value for this input and there are no elements available for reading, this node returns an empty array.

    Error for Numbers Greater than read buffer size

    Specifying a number greater than the read buffer size of the Create Network Stream Reader Endpoint node will return an error visible in error out.

    Expiration of timeout in ms

    If timeout in ms expires before the elements are available, this node will also return an empty array.

    Default: -1 — Reads all available elements from the stream without timing out.

    datatype_icon

    endpoint in

    Reference to the endpoint. Obtain this reference by wiring the reader endpoint output of the Create Network Stream Reader Endpoint node to this input.

    Wiring endpoint in Causes Hidden Inputs

    The data type input becomes hidden when you specify a data type for endpoint in.

    datatype_icon

    data type

    Data type of the elements you want to read.

    Specifying the Data Type

    You must specify a data type when the node is unable to determine the data type of the stream element. If the node is able to determine the data type, the data type input becomes hidden.

    To specify a data type, click the Specify Data Type checkbox in the Properties section of the Item tab. The Specify Data Type checkbox will only appear after you wire in a constant or a reference that needs a data type to be specified. Once you specify the data type, the data type input becomes hidden.

    Errors Caused When Wiring Data Types

    Failing to wire the data type input while it is visible will result in a broken VI. Failing to wire the same data type used to create the network stream will result in a runtime error.

    datatype_icon

    timeout in ms

    Time, in milliseconds, that this node waits for data.

    Default: -1 — This node waits indefinitely.

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    endpoint out

    Reference to the endpoint specified by endpoint in.

    datatype_icon

    data out

    Data this node reads from the stream.

    Default Value Behavior for -1

    If you use the default value for this input, the timeout in ms input is ignored, and this node immediately returns any data available for reading. However, if you use the default value for this input and there are no elements available for reading, this node returns an empty array.

    Expiration of timeout in ms

    If timeout in ms expires before the elements are available, this node will also return an empty array.

    datatype_icon

    timed out?

    A Boolean value that indicates whether the timeout period elapsed before the node reads the incoming data.

    True The timeout period elapsed and data was not read.
    False The timeout period did not elapse and data was read.
    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics