Writes an element to a Real Time Stream channel. If the channel is full, this endpoint defaults to jitter-free operation but can be configured to wait until space is available or a timeout occurs.

You can drop this endpoint on the block diagram by right-clicking a terminal or a wire and selecting Create»Channel Writer»Real Time Stream»Write.


icon

Inputs/Outputs

  • ci32.png timeout in ms (-1)

    timeout in ms is the time, in milliseconds, that this endpoint has to write the specified data to the channel. The default value is -1, which means there is no time limit.

  • ci32.png size (10)

    size specifies the maximum number of elements that can be buffered in the channel. The default is 10. Space for all the elements is allocated on the first call to this endpoint and will stay the same during subsequent calls until the channel is reset. Reset occurs when the common caller VI of both the writer endpoint and the reader endpoint begins another iteration.

  • cdbl.png element

    element specifies the data to write to the channel.

  • cbool.png element valid? (T)

    element valid? specifies whether the element is valid. The default is TRUE. If element valid? is FALSE, the endpoint writes the default value of the transmission data type to the channel instead of the value of element, and signals the reader that the element is not a valid data.

  • cbool.png last element? (F)

    last element? specifies whether this is the last element that the endpoint writes to the channel. The default is FALSE. If TRUE, the endpoint marks the channel as closed and ignores further calls to write. The reader endpoint can continue reading data until the last element? output of the reader endpoint returns TRUE.

  • ci32.png elements in array (1)

    elements in array is the number of elements in the array for each RT FIFO element. The default is 1.

    This input applies only if the RT FIFO elements are arrays. RT FIFOs do not support multi-dimensional arrays.

  • ci32.png datapoints in waveform (1)

    datapoints in waveform is the number of datapoints for every element of the array of waveforms. This input applies only if the RT FIFO elements are waveforms.

  • cenum.png abort status (no abort)

    abort status specifies the abort status of this endpoint. The default is no abort.

    0No abort
    1Abort now
    2Abort if timeout
  • cnclst.png r/w modes (polling, polling)

    r/w modes specifies the read and write modes for a new RT FIFO. The read and write modes define the way you read a value from an empty FIFO or write a value to a FIFO that does not have an empty slot. An RT FIFO can wait until an empty slot becomes available for a write operation or wait until a value is available for a read operation.

    You can specify one of the following modes for reads and writes:
    • polling—Use this mode to optimize the throughput performance of read and write operations. The polling mode continually polls the FIFO for new data or an open slot. The polling mode responds quicker than the blocking mode to new data or new empty slots, but requires more CPU overhead. Use the timeout in ms input of the Read or Write endpoint of the Real Time Stream channel to specify the amount of time that a write operation should poll for an empty slot or the amount of time a read operation should poll for new data.
    • blocking—Use this mode to optimize the utilization of the CPU during read and write operations. The blocking mode allows the thread of the VI to sleep while it waits, allowing other tasks in the system to execute. Use the timeout in ms input of the Read or Write endpoint of the Real Time Stream channel to specify an amount of time a read operation can wait for a new value or an amount of time a write operation can wait for an empty slot.
  • cenum.png read mode

    read mode specifies the read mode for the RT FIFO.

  • cenum.png write mode

    write mode specifies the write mode for the RT FIFO.

  • iqueuern.png channel

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

  • ibool.png timed out?

    timed out? returns TRUE if the amount of time specified by timeout in ms elapses.

  • ibool.png done?

    done? returns TRUE if the endpoint has written the last element or if the channel aborts on either endpoint. This output returns FALSE if a timeout occurs.

  • Related Information

    Read