Write Endpoint

Requires: Base Development System

Writes an element to a High Speed Stream channel. If the channel is full, this endpoint waits until space is available or a timeout occurs. You can use this endpoint to signal a normal stop when the last element is written to the queue or to signal an immediate stop when abort occurs.

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

Details  Examples

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.
size specifies the maximum number of elements that can be buffered in the channel. The default is unlimited. The channel size is initialized on the first call to the writer endpoint, after which the endpoint ignores the size input.
element specifies the data to write to the channel.
element valid? specifies whether the element is valid. If TRUE, the endpoint records the element valid? flag. If FALSE, the endpoint ignores the value of element. The endpoint does nothing if both element valid? and last element? are FALSE. The default is TRUE.
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.
abort status specifies the abort status of this endpoint. The default is no abort.

0No abort
1Abort now
2Abort if timeout
channel is the channel wire that connects this endpoint to a reader endpoint.
timed out? returns TRUE if the amount of time specified by timeout in ms elapses before the endpoint writes the data specified in element to the channel.
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.

Write Details

Related Information

Read

Examples

Refer to the following VIs for examples of using the Write endpoint: