sim command says there are syntax errors in the MDL, but running MDL within Simulink works
3 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have a working MDL file that compiles and runs within Simulink, but when I call the model using the sim command I am recieving the following error:-
Error using runFAST
Error due to multiple causes.
Caused by:
Error using runFAST
The expression: u(strmatch('Azimuth',OutList))
in 'ROSCO/Cyclic Pitch controller/extract Azimuth'
has a syntax error
Error using runFAST
The expression: u(strmatch('BldPitch1',OutList))
in 'ROSCO/Extract Signals/Extract BldPitch1'
has a syntax error
The offending block is of type Fcn. I tried commenting out those blocks, but the same error arrives referencing a different (similar) block.
Why would the MDL work in simulink, but not with the sim command?
Matlab version is 2022b and OS is Windows 10 64 bit
Thanks,
Sahil
回答 (1 件)
Sarthak
2023 年 3 月 24 日
Hi Sahil,
As per my understanding, it is difficult to find the accurate reason for your error without the model in which the error is occurring. However, there may be a few reasons you are getting errors.
- One likely reason could be that Simulink model is using such variables or functions that are not defined in the MATLAB workspace. When you run a model in Simulink it automatically generates the required variables, however that is not the case with the sim command.
- It is also possible there are missing or incorrect model parameters or input data or a version mismatch between the MATLAB version and the Simulink version you are using.
If the issue persists after verifying the reasons mentioned above, share your model, or raise a service request for it.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!