How to "Monitor and Tune" Simulink Model from MATLAB

16 ビュー (過去 30 日間)
Blake Stevenson
Blake Stevenson 2020 年 11 月 15 日
コメント済み: Blake Stevenson 2020 年 11 月 28 日
I have a Simulink model that controls a DC motor's position. The angular position for the motor to rotate to comes from a constant block, which I write to in a Matlab script using set_param. I've seen how set_param('modelName', 'SimulationCommand', 'start') can be used to start a simulation within Simulink, but is there a similar command to run the model [on hardware] in the "Monitor and Tune" mode?
I want to run the model on the hardware connected to my PC (Arduino Mega), but at certain points in the script, I need the motor to move to a different position. Thus, I still need to be able to write to the model using set_param, so I cannot just build and deploy the model to hardware.
Any advice is appreciated.

採用された回答

Chaitanya Mallela
Chaitanya Mallela 2020 年 11 月 26 日
You can try out this command for Monitor and Tune mode
set_param(gcs, 'SimulationMode', 'external')
  1 件のコメント
Blake Stevenson
Blake Stevenson 2020 年 11 月 28 日
Thanks, that's just what I was looking for.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by