How do I retrieve Simulink parameter names from the rtp structure generated by the RSIMGETRTP function in Real-Time Workshop 6.4 (R2006a)?

2 views (last 30 days)
I am generating code with Real-Time Workshop 6.4 (R2006a) for Rapid Simulation Target. I want to tune parameters within the generated executable without rebuilding the code. For that, I use the "rsim" target and retrieve parameter values from my Simulink model using the RSIMGETRTP function.
I can retrieve parameter values from the rtp structure without information about the parameter names corresponding to the values I retrieve. When building code for the "rsim" target, I would like to know how I can map values in the rtp structure to the names of parameters in my Simulink model.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 9 Jan 2017
You can retrieve parameter name information from your Simulink model in the structure generated by the RSIMGETRTP function by enabling the following option:
rtp = rsimgetrtp('modelname','AddTunableParamInfo','on')
You must enable "Inline parameters" in the Simulink Configuration Parameters pane, and specify as "Tunable parameters" those whose values you want to change during execution without rebuilding the model.
For more information about this option you can read the documentation at the following location and run the following Real-Time Workshop demo:
web([docroot,'/toolbox/rtw/ref/rsimgetrtp.html'])
rtwdemo_rsim_param_tuning

More Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Products


Release

R2006a

Community Treasure Hunt

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

Start Hunting!