フィルターのクリア

Running an Arduino Ontarget simulink file from the workspace

1 回表示 (過去 30 日間)
Bardia
Bardia 2013 年 6 月 18 日
Hi There,
I'm trying to execute my on-target simulink file entirely from the workspace. I remember for a previous A2D card all I had to do was do something like this.
set_param('Lab3hardOne','SimulationMode','external');
set_param('Lab3hardOne','SimulationCommand','connect');
set_param('Lab3hardOne','SimulationCommand','start');
pause(10);
set_param('Lab3hardOne','SimulationCommand','stop');
set_param('Lab3hardOne','SimulationCommand','disconnect');
I'm not sure, where I even came up with the code to do this as it was few years ago since used the code. I'm guessing there is something different, or a little tweak that I might have to do to get this working for an Arduino (mega).
Any suggestion or references would be greatly appreciated.
Thanks in advance!
  2 件のコメント
Kaustubha Govind
Kaustubha Govind 2013 年 6 月 18 日
Do you mean that you want to download the model onto the Arduino, or do you simply want to run a model on the host machine in external mode? (Note how you set SimulationMode=external in your code). Also, what version of MATLAB are you on?
Bardia
Bardia 2013 年 6 月 18 日
I will be using both 2012B and 2013a.
I want to do both if possible. For example, this will be used to communicate with an Arduino which will be connected to a servo motor.Say if I want to change the gain of the system 5 times, I rather not have to hit the run button 5 times. Rather Run a for loop in a script, and have all the results at the end..

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

回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by