Clear Filters
Clear Filters

Simulink Signal Size Error from Switch to Sum

7 views (last 30 days)
I have a subsystem with 12 switches feeding into sum blocks. I ran this last night and it was working perfectly in the test bench. When I implemented it into the larger system I'm getting an error saying the input into sum11 is unknown size, however the output from switch13 that feeds into the sum block is showing a signal size 1, and theres no error on the other 11 instances of this. Does anyone know why I'm getting this error or of a solution for it? I've tried using a signal specification block and it didn't solve the issue.

Answers (1)

Gobiha Duraisamy
Gobiha Duraisamy on 20 Oct 2022
During compilation, Simulink makes the best guess of the dimension of each signals based on its source. However, when there are algebraic loops or if-else statements involved, Simulink might struggle to find the signal dimension.
In these situations, enable 'warning' or 'error' diagnostics for the underspecified signal dimensions, as suggested in the error message. This displays additional messages to help debug the issue. To enable this diagnostics, press Ctrl+E from the Simulink model, this opens the Configuration Parameters for the model, click Diagnostics > Data Validity > Unspecified dimensions and change the diagnostics from 'none' to 'warning' or 'error'.
For the blocks with underspecified signal dimension, you can also manually specify it through Block Parameters > Signal Attributes > Port Dimensions.

Categories

Find more on Configure and View Diagnostics in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!