| Contents | Index |
xPC Target Library for Utilities
This block is used to extract data frames. Its input port is typically connected to an output port of a Receive block or Digital Input block.
The block has one input port, which represents the data frame entity from which the signals are extracted and leaving the block at its output ports. The number of output ports and the data type of each output port depend on the settings in the block's dialog box.
Specify bit patterns. The data type must be a MATLAB cell array vector. The number of elements in the cell array define the number of input ports shown by this block instance. The cell array elements must be of type double array and define the position of each bit of the incoming value (data typed input port) in the outgoing double value (data frame). From a data type perspective, the block behaves like a Sink block. The Input port (packed) data types specify the data type of the input port.
From the list, select an input port (packed) data type.
double
single
int8
uint8
int16
uint16
int32
uint32
boolean
Specify the dimensions of the input port (packed). Enter this as a vector. Specify the size of the port using a format compatible with the MATLAB size command.
The output ports (packed) can be any data type. The number of elements in the cell array define the number of output ports shown by this block instance. The data types can be
double
single
int8
uint8
int16
uint16
int32
uint32
boolean
Specify the dimensions of each output port (unpacked). Enter this as a cell array of vector sizes.
Select this check box to enable sign extension. If you select this check box and unpack the data frame into a signed type (int8, int16, or int32), the block performs sign extension. For example, if the bit pattern is [0:4], and the data type is int8, you are extracting 5 bits into an 8-bit wide signed type. In this case, bits 5, 6, and 7 are the same as bit 4, resulting in sign extension. This functionality enables you to pack and unpack negative numbers without losing precision.

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