Documentation

Digital I/O Bit-Packing

Construct data frames (not recommended)

Library

Simulink® Real-Time™ Library of Drivers No Longer Recommended for Use

Description

This block constructs data frames. Its output port is typically connected to an input port of a digital I/O block. The block has one output port of data type uint32 (a scalar), which represents the data frame entity constructed by the signals entering the block at its input ports. The number of input ports depends on the setting in the block's dialog box. See CAN Bit-Packing for an example of how to use a bit-packing block.

Block Parameters

Bit Patterns

Specify bit patterns. The data type entered in the control 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 uint32 value (data frame).

From a data type perspective (input ports), the block behaves like a Simulink Sink block. Therefore, the data types of the input ports are inherited from the driving blocks.

This block inherits the sample time of the driving blocks.

Was this topic helpful?