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 function waits for the amount of time specified in timeout in ms for new data. If the value of timeout in ms expires, the function returns the value of element in the element out output and returns TRUE in the empty? output.

![]() |
rt fifo is a reference to an existing RT FIFO. | ||||||
![]() |
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. | ||||||
![]() |
timeout in ms indicates how many milliseconds the function waits to receive a new value if the RT FIFO is empty. Wire a -1 to the timeout in ms input to wait indefinitely. The default is 0, which indicates to return immediately. | ||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||
![]() |
rt fifo out is a reference to an existing RT FIFO. | ||||||
![]() |
element out is the data read from the RT FIFO. If the VI does not read new data, the VI returns the default element. | ||||||
![]() |
empty? is set to TRUE if the RT FIFO is empty when you read it and the value of timeout in ms has expired. | ||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
| ||||||
![]() |
# elements returns the number of elements remaining in the RT FIFO after the read or write operation. |