Event triggered update of simulink.parameter in model deployed to target (Speedgoat) to signal within model
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Derry Lapin
am 22 Sep. 2022
Beantwortet: Dimitri MANKOV
am 27 Sep. 2022
Hello,
There's some functionality that I would like to implement in a model we run on a speedgoat target machine.
I commonly use Simulink.Parameters within our deployed models, and use the simulink realtime explorer to tune those parameters in realtime.
There is one parameter which I would like to be tuned to the value of a sensor signal on occurence of an event. For example, this could be updating the simulink paramter which defines a position reference for a position controller. On enabling the position controller, the reference would be set to the presently sensed position.
The write parameter block doesn't seem to work with Simulink.Parameters, otherwise that would offer the perfect functionality.
Any recommendations for concisely achieving this funcitonality would be appreciated.
Best,
Derry
0 Kommentare
Akzeptierte Antwort
Dimitri MANKOV
am 27 Sep. 2022
Hi Derry,
I would recommend modelling that behaviour, i.e., working with signal values rather than parameters. In the scenario you describe, this could for example be achieved by feeding the measured signal through an enabled subsystem or a Unit Delay Enabled Synchronous block that would hold the value of its output until the next "enable" pulse.
Best,
Dimitri
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Model Preparation for Real-Time Simulation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!