Simulink Signal Size Error from Switch to Sum
2 次查看(过去 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.
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Configure and View Diagnostics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!