Deconstruct data frames
Simulink® Real-Time™ 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 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.
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
The output ports (packed) can be of arbitrary 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
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 (
int32), the block performs sign extension. For
example, if the bit pattern is
[0:4], and the data
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.