RT FIFO Write

Writes an element to an RT FIFO. If the RT FIFO does not have empty elements, this node waits for an amount of time equal to the value of timeout in ms for an element to become available. If an empty element does not become available before the value of timeout in ms expires and overwrite on timeout is True, this node overwrites the oldest element in the RT FIFO and returns True in timed out?.

Note If you use an RT FIFO to transfer waveform data, the variant element of the waveform does not transfer because variants are variable-sized and therefore incompatible with the RT FIFO.
1378

Inputs/Outputs

datatype_icon

rt fifo

References an existing RT FIFO.

datatype_icon

element

The data to write to the RT FIFO. This data type changes to match the type of the value you want to write.

datatype_icon

timeout in ms

Time, in milliseconds, that the node waits for an empty slot to write the data in the RT FIFO. Wire a -1 to the timeout in ms input to wait infinitely.

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

overwrite on timeout

Defines whether to overwrite the oldest value in the RT FIFO if the FIFO does not have an available open slot and the value of the timeout in ms input expires.

Use the timeout in ms input to specify an amount of time to wait for an open slot before overwriting the oldest value.
TrueThe RT FIFO overwrites the oldest value and returns True in the timed out? output if the FIFO times out.
FalseThe RT FIFO does not overwrite the oldest value if the FIFO times out.

Default value: True

datatype_icon

rt fifo out

A reference to the RT FIFO defined in rt fifo.

datatype_icon

timed out?

A Boolean that indicates whether the FIFO times out before an empty slot becomes available for the write operation.

True The FIFO timed out before an empty slot became available.
False The FIFO did not time out.
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