在SimulinkModel生成C代码时变量尺寸不匹配问题
Afficher commentaires plus anciens
在生成C代码显示错误:
The signal dimensions of the data input ports of Multiport Switch block 'Cosmartor/SemiactiveControlSoftware/Controller/SemiActiveModule/ParameterScheduling/Multiport Switch20' are different. To support a variable-size output signal, on the "Signal Attributes" pane of the block dialog, select the parameter "Allow different data input sizes (Results in variable-size output signal)".
Component:Simulink | Category:Block diagram error
Error in port widths or dimensions. 'Output Port 1' of 'Cosmartor/SemiactiveControlSoftware/Controller/SemiActiveModule/ParameterScheduling/From18' is a [1x3] matrix.
于是我Allow different data input sizes
显示:
Simulink cannot propagate the variable-size mode from the 'Output Port 1' of 'Cosmartor/SemiactiveControlSoftware/Controller/SemiActiveModule/VerticalModule/VerticalDampingFL/scheduling_ratio' to the 'Input Port 3' of 'Cosmartor/SemiactiveControlSoftware/Controller/SemiActiveModule/VerticalModule/VerticalDampingFL/Lookup Table Dynamic'. This input port expects a fixed-size mode. The variable-size mode originates from 'Cosmartor/SemiactiveControlSoftware/Controller/SemiActiveModule/ParameterScheduling/Multiport Switch20'. Examine the configurations of 'Cosmartor/SemiactiveControlSoftware/Controller/SemiActiveModule/VerticalModule/VerticalDampingFL/Lookup Table Dynamic' for one of the following scenarios: 1) the block does not support variable-size signals; 2) the block supports variable-size signals but needs to be configured for them.
不会了,求解
1 commentaire
Réponses (1)
Alan
le 11 Sep 2023
0 votes
Hi,
I have used a translator to understand your question because I do not understand Chinese. I shall try my best to answer in English. Feel free to use a translator to translate it to Chinese.
I understand that you are facing an issue while variable-sized inputs are fed to a block in your model.
It seems like the variable-sized input mode has propagated through the model to a block which may not be capable for variable sized inputs, or it is capable but not yet configured for variable sized inputs. I would suggest you to check whether the block causing the error ( Cosmartor/SemiactiveControlSoftware/Controller/SemiActiveModule/VerticalModule/VerticalDampingFL/Lookup Table Dynamic) is capable of taking a variable-sized input. This documentation could help you for that: https://www.mathworks.com/help/simulink/ug/variable-size-signal-basics.html#bsf5sez
If it is compatible, enable variable-sized inputs in that block just like you have enabled in the previous block ( Cosmartor/SemiactiveControlSoftware/Controller/SemiActiveModule/ParameterScheduling/From1)
Catégories
En savoir plus sur 信号 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!