How can I use the scope in my model while running a the host model?

1 回表示 (過去 30 日間)
Irfan Guven Comezoglu
Irfan Guven Comezoglu 2022 年 4 月 10 日
回答済み: Keyur Mistry 2022 年 5 月 18 日
I'm trying to use the Field Oriented Contol of PMSM using hall sensor, https://www.mathworks.com/help/mcb/gs/foc-pmsm-using-hall-sensor-example.html, and want to add scopes to variables in the model so that I can see how they change in real time. The model and the host model works fine but I can't seem to get the scopes to work. After I add scopes to the main model, when I try to run the host model and see what the scopes are showing, all I get is the simulation results. They do not change according to me running the kit in real time.

回答 (1 件)

Keyur Mistry
Keyur Mistry 2022 年 5 月 18 日
To observe variable in real time, we are supposed to send variable data from controller to MATLAB host model via serial communication.
Pleaes ensure the variable you want observe in real time is being sent through "SCI Transmit" block in target model (main model) and being received thorugh "Host Serial Receive" block in host model.

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by