MATLAB: Do I get an overflow message when multipling double precision numbers in Stateflow6.4 (R2006a)

doubleoverflowprecisionsimulinkstateflow

I have a Stateflow model where I want to multiply 256 by 256. However, in Stateflow, an overflow error occurs by the calculation.
Runtime Error: Data overflow error occured in chart instance Block sf_temp/Chart
All variables in the model are double precision. Why does overflow occur in Stateflow?

Best Answer

This error occurs because the hardware implementation of the model is set to 16-bit processor. To verify this, click on Configuration Parameters >> Hardware Implementation >> Device Type
Hardware Implementation Pane allows you to specify the characteristics of the hardware to be used to implement the system represented by the model. This in turn enables simulation of the model to detect error conditions that could arise on the target hardware, such as hardware overflow.
To avoid this error, make sure the data range in the model does not exceed the data range that the specified hardware can represent.