RT FIFO Read

Reads the oldest element in an RT FIFO.

If no new data exists in the RT FIFO or if the RT FIFO is empty, this node waits for the amount of time specified in timeout in ms for new data. If the value of timeout in ms expires, the node returns the value wired to element in the element out output and returns True in the empty? output.

1378

Inputs/Outputs

datatype_icon

rt fifo

References an existing RT FIFO.

datatype_icon

element

Sets the default return value of an empty RT FIFO. This data type changes to match the type of the default return value you wire.

datatype_icon

timeout in ms

Time, in milliseconds, that the node waits to receive a new value if the RT FIFO is empty. Wire a -1 to the timeout in ms input to wait indefinitely.

Default value: 0

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

Default value: No error

datatype_icon

rt fifo out

A reference to the RT FIFO defined in rt fifo.

datatype_icon

element out

The data read from the RT FIFO. If the node does not read new data, the node returns the default element.

datatype_icon

empty?

A Boolean that indicates whether the RT FIFO is empty when you read it.

True The RT FIFO is empty and the FIFO timed out.
False The RT FIFO is not empty.
datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

datatype_icon

number of elements

Number of elements remaining in the RT FIFO after the read or write operation.

Programming Patterns