Write simple data streams
Simulink Real-Time / RS232
The FIFO Write block is the write side of a FIFO read/write pair. Use this block to generate simple data streams.
D — Data to write to FIFO
Vector containing the data to write to the FIFO.
To determine the data type of this vector, set the parameter Input vector type.
F — FIFO vector
Connects to the FIFO that writes data to the serial port.
True if new data is present in the FIFO
If data is present in the FIFO, returns
To make this port visible, set parameters Max and Min read size ports and Enable passthrough.
Size — Size of FIFO, in bytes
1024 (default) | integer
Enter the number of elements that can be held in the FIFO at one time. If a write operation to the FIFO causes the number of elements to exceed Size, an error occurs.
Input vector type — Specify input data type
8 bit uint null
terminated (default) |
count+32 bit int |
count+32 bit uint |
count+16 bit int |
count+16 bit uint |
8 bit int null terminated
For the 16-bit and 32-bit data types, include as first element the number of elements to expect in the rest of the input vector. The count controls how many bytes that the block copies into the FIFO. The block does not copy the count itself into the FIFO.
For the 8-bit data types, provide a NULL-terminated character vector in the output vector. The block copies data into the FIFO up to, but not including, the NULL terminator.
For more information, see RS-232 Legacy Drivers.
Data present output — Enables output
off (default) |
Select this check box to create the Boolean output
If data is present in the FIFO,
true. The transmit side of the send/receive subsystem
uses this output. This output is given to the Enable TX block, which enables
the transmitter buffer empty interrupt.
This setting makes the output port
ID — Identifier for overflow messages
Enter a user-defined identifier for FIFO overflow messages.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2020b