(To clarify: I do know how to create the 1sec timer but not how to read out the signal value during runtime)
A good way to publish simulink values to GUI from a running model?
2 次查看(过去 30 天)
显示 更早的评论
I currently can affect a running model from my GUI, both start/pause/stop and update values that are inputs to the current model. I do this via workspace variables to constant blocks using set_param(...'update').
Now I need to show values from my running model in my GUI but I'm not sure of how I would do that? My plan was to use a 1 second timer and then read out signal values but I'm not sure of how to do that. Please let me know if you have a good way!!
Any thoughts are appreciated, thanks! //bjoern
采纳的回答
Guy Rouleau
2012-4-5
This is a good approach.
However with just that, your GUI will need a mechanism to poke at the model to get the data.
I would combine that with an event listener:
That way, the event listener can send the data from the runtime object to your GUI automatically every time the block output value is updated.
1 个评论
Craig
2012-9-14
How can this be done to the outputs about a subsystem (rather than specific internal blocks )? (in 2007b).
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Event Functions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!