Can you progamatically call simulink snapshot in a real-time speedgoat application utilizing a GUI?

4 次查看(过去 30 天)
I am trying to access a scope block utilizng a GUI to control scope parameters in a real-time speedgoat application. I want to access a toggle button, which when pressed will cause a simulink snapshot to occur on the scope, thus pausing the scope while the program continues to stream data in real time. A small piece of pseudo code of what I would want to do is below:
function FreezeButtonSelectionChanged(app, event)
selectedButton = app.FreezeButton.SelectedObject;
scopeConfig = get_param([mdl, '/BPScope'], 'ScopeConfiguration');
scopeConfig.simulinkSnapshot = 'True';
end
Thanks for any help you can provide!

采纳的回答

Dimitri MANKOV
Dimitri MANKOV 2022-4-19
Hi Todd,
I think the easiest way would be to work with Simulink Real-Time instrument objects instead of Simulink Scopes. The instrument objects allow to stream data directly to your app (for example, to a UI axis), in which you can selectively enable/disable live streaming, thus giving you the same "freeze frame" functionality.
You can find examples of GUI designs for Simulink Real-Time here.
Best,
Dimitri

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 View and Analyze Simulation Results 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by