Simulink Signal Size Error from Switch to Sum

7 次查看(过去 30 天)
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.

回答(1 个)

Gobiha Duraisamy
Gobiha Duraisamy 2022-10-20
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.

类别

Help CenterFile Exchange 中查找有关 Configure and View Diagnostics 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by