Input delay too big when using set_param to change value of constant block.
2 次查看(过去 30 天)
显示 更早的评论
I am using the set_param command to change the value of a constant block in a running Simulink model. The set_param command gets called within a callback in an app from Matlab App Designer. Unfortunately the delay after changing the value in the app until Simulink realises the change is too big. How can I fix this? Thanks for your help!
2 个评论
Luca Ferro
2023-4-5
is it acceptable for you to pause the simulink upon callback from the app, update the constant block and restart the simulation from where you left off?
回答(1 个)
Oguz Kaan Hancioglu
2023-4-6
There is always delay with communication between simulink and app designer. Maybe writing your reference to workspace and using the variable name in the constant block will reduce the delay.
3 个评论
Oguz Kaan Hancioglu
2023-4-7
Yes, we had the same problem and the problem still continue. We changed the model structure with time-based inputs. In the app, we set the execution time of the input using set_param. At least, we guarantee that Simulink receives the inputs at the desired time.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Model, Block, and Port Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!