Documentation

Byte Packing

Construct data frames

Library

Simulink® Real-Time™ Library for Utilities

Description

The Byte Packing block converts one or more Simulink signals of user-selectable data types to a single vector of varying data types. The output of this block is typically connected to an input port of a Send block.

Block Parameters

Output port (packed) data type

Specify the data type for the different signals. The block determines the sizes of the signals automatically. From the list, select an output port (packed) data type.

  • double

  • single

  • int8

  • uint8

  • int16

  • uint16

  • int32

  • uint32

  • boolean

Inport port (unpacked) data types (cell array)

Specify the data types of the input ports (unpacked) for the different signals as part of the block parameters.

  • double

  • single

  • int8

  • uint8

  • int16

  • uint16

  • int32

  • uint32

  • boolean

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.

Byte Alignment

The byte alignment field specifies how the data types are aligned. The possible values are 1, 2, 4, and 8. Each element in the list of signals starts on a boundary specified by the alignment relative to the start of the vector.

Was this topic helpful?