FIFO Read HDRS (Composite)

www.kxcad.net Home > CAE Software Index > MATLAB Index >


Your Ad Here

FIFO Read HDRS block

Library

xPC Target Library for RS232

Description

The FIFO Read HDRS block identifies and separates ASCII data streams that have embedded identifiers. The data following a particular header might have varying lengths, but all have a common termination marker such as <CR><LF>. While you can attain this same functionality with the sample FIFO Read block, doing so requires a complicated state machine.

The xpcdemos directory contains the following demos that illustrate how to use the FIFO Read HDRS block: xpcserialasciitest and xpcserialasciisplit.

Block Parameters

Header

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.

Terminating string

Enter the terminating string for the data. Enter as many characters as needed to define the end of string. This is typically one or two characters.

Output behavior

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.

Enable input

Select this check box to turn on a new input that takes Boolean signals that enable or disable the read.

Maximum read size

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.

Output vector type

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.

SampleTime

Base sample time or a multiple of the base sample time.

  


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments

Your Ad Here