| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → xPC Target |
| Contents | Index |
| Learn more about xPC Target |
xPC Target Library for RS232
The FIFO Read Binary block reads multiple binary headers from a FIFO. This block identifies and separates data by finding unique byte sequences (headers) that mark the data. Each header indicates the start of a fixed length binary message.
Note If the same header has arrived in the FIFO more than once since the block was last executed, the block will discard the older data and only return the latest instance of the header. In this way, the block catches up with data that arrives faster than the block executes. |
The xpcdemos directory contains the following demos that illustrate how to use the FIFO Read HDRS block: xpcserialbinarytest and xpcserialbinarysplit.
Enter the headers that you want the block to look for in a block of data from the FIFO. Enter each header as an element in a cell array either as a quoted string or a concatenation with char(val) for non-printable byte patterns.
Enter the message length of each byte of data as bytes of data. Include the header in the length.
From the list, select the behavior of the block if the FIFO has no new data. Select Zero output if no new data if you want the block to have no output if there is no new data. Select Hold last output if no new data if you want the block to keep the output from the last FIFO message.
This check box enables or disables a FIFO read. Select this check box to turn on a new input that takes Boolean signals that enable or disable the read.
Enter the largest desired read size in bytes. This parameter specifies the width of the output vector and the maximum number of elements to return. See Output vector type for more information about data formats.
From the list, select count+32 bit int, count+32 bit uint, count+16 bit int, count+16 bit uint, 8 bit int null terminated, or 8 bit uint null terminated. This parameter specifies the output vector type. The 8-bit data types produce a null terminated string in the output vector. For 16- and 32-bit data types, the first element contains the number of elements to expect in the rest of the output vector.
Base sample time or a multiple of the base sample time.
![]() | FIFO Read HDRS (Composite) | Modem Control (Composite) | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |