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

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Deployment, 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