| Contents | Index |
Embedded Coder/ Embedded Targets/ Host Communication
Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C6000/ Target Communication
Simulink Coder/ Desktop Targets/ Host Communication
Byte Unpack is the inverse of the Byte Pack block. It takes a UDP message from a UDP receive block as a uint8 vector, and outputs Simulink data types in various sizes depending on the input vector.
The block supports all Simulink data types.

Containing a cell array, each element in the array specifies the dimension that the MATLAB size function returns for the corresponding signal. Usually you use the same dimensions as you set for the corresponding Byte Pack block in the model. Entering one value means that the block applies that dimension to all data types.
Specify the data types for the different input signals to the Pack block. The block supports all Simulink data types—single, double, int8, uint8, int16, uint16, int32, and uint32, and Boolean. The entry here is the same as the Input port data types parameter in the Byte Pack block in the model. You can enter one data type and the block applies that type to all output ports.
This option specifies how to align the data types to form the input uint8 vector. Match this setting with the corresponding Byte Pack block alignment value of 1, 2, 4, or 8 bytes.
This figure shows the Byte Unpack block that corresponds to the example in the Byte Pack example. The Output port data types (cell array) entry shown is the same as the Input port data types (cell array) entry in the Byte Pack block
{'uint32','uint32','uint16','double','uint8','double','single'}.

In addition, the Byte alignment setting matches as well. Output port dimensions (cell array) now includes scalar values and matrices to demonstrate entering nonscalar values. The example for the Byte Pack block assumed only scalar inputs.

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 |