使用APP Designer调用Simulink模型重复打开的故障
Mostra commenti meno recenti
我参考了这个链接:
实现了通过APP designer设计的APP打开simulink模型,并实时访问模型运行中的数据。但是问题在于,当我从app界面点击“开始”,即运行
set_param('mymodel','SimulationCommand','start');%开始运行模型
此时会重新打另一个同样的app界面。
后来我发现直接开始运行simulink模型,会自动打开一个模型并开始运行。
但我不想这样,我想通过app界面设置好模型参数后,再点击“开始”,来运行模型,并实时获取数据。
经过测试发现其中的
hApp = TrialApp;
是问题所在,就是这句代码导致界面的重复打开。但当我删了以后,就相当于断开了appdesigner和simulink的连接,这个监听程序无法运行。
我尝试了很多方法,仍然无法解决这个重复打开界面的问题,期待大佬们的回复,也欢迎同样遇到问题的朋友们一起交流,非常感谢!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su 交互式模型编辑 in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!