App Designer interaction with SIMSCAPE?

33 ビュー (過去 30 日間)
Stone
Stone 2024 年 10 月 21 日
回答済み: Aniket 2024 年 11 月 19 日 4:53
I use this code to interact App Designer with simulink can work well,but can not work in simscape,why?
how can I interacr App Designer with simscape?
code:
  1. simInp = Simulink.SimulationInput('untitled');
  2. simInp = simInp.setVariable('a',app.EditField.Value);
  1 件のコメント
Aravind
Aravind 2024 年 10 月 22 日
Hi @Mary,
Interaction between App Designer and Simscape can be achieved in a similar fashion to normal Simulink models. Could you please describe your problem in more detail, with the supporting model files if possible? This will help in identifying and debugging the issue.

サインインしてコメントする。

回答 (1 件)

Aniket
Aniket 2024 年 11 月 19 日 4:53
Hi @Stone,
As Aravind mentioned, the interaction between App Designer and Simscape is similar to interaction with Simulink.
Please refer to the following MATLAB article for detailed instructions on using the "sim" command within App Designer.
I've also attached an MLAPP file (RC_app.mlapp) and a Simscape model (RC_simscape.slx). You can configure the resistance and voltage settings from the app and view the plot directly within it. This should provide guidance on how to proceed.
Hope this helps!

カテゴリ

Help Center および File ExchangeStatics and Dynamics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by