Arduino simulink serial receive vector uint8

I've installed the Arduino support package for Simulink. I'm trying to send a uint8 vector from my laptop via usb to the serial port on the Arduino due. After that I'm trying to demux the vector into 2 scalars, but according to Simulink the dimensions of the output of the Arduino serial receive block is not a vector. I get the following error
Invalid setting for input port dimensions of 'PhaseoneReduced2/Controller 1/Demux'. The dimensions are being set to 1. This is not valid because the total number of input and output elements are not the same
Component: Simulink | Category: Block error
Error in port widths or dimensions. Output port 1 of 'PhaseoneReduced2/Controller 1/Serial Receive' is a one dimensional vector with 1 elements.
When using the normal serial receive block in simulink there is an option to define the data size of the incoming data. However, this option is not available with the Arduino serial receive block. Any workaround here?

Answers (0)

Categories

Products

Asked:

on 18 Apr 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!