Simulink Realtime Saved Parameter set does not contain all parameters

I am running a Simulnk Real-Time application on a SpeedGoat system.
My application has a lot of parameters (>200), I can view & set them all OK in slrtExplorer, and get/set them using a Matlab application GUI.
I am trying to use the Parameter set commands to save and load parameters, but I noticed that not all all parameters are being loaded correctly.
e.g.:
saveParameterSet(tg, 'myParametersH1',0)
myps=importParameterSet(tg,'myParametersH1')
explorer(myps)
But when the Parameter Explorer opens, I can only see ~70 parameters (alphabetically the first 70). So it looks like I cannot access all my parameters!
Does anyone know if there is a limitation on the number of parameters? I tried accessing different 'memory pages' 0 & 1 gave the same results, and >1 resulted in error (getNumPages(tg) = 2)

Answers (1)

Hi, Sandra,
  1. Speedgoat target only has two memory pages, page 0 and page 1, as the error message indicated.
  2. Not all block parameters are run-time tunable. You can use slrealtime.Application.getTunableParameters() to display all the tunable parameters in your application. Which block and which parameter are you looking for?

4 Comments

Hi Chris,
thanks for this.
that command did not work, I get "The class slrealtime.Application has no Constant property or Static method named 'getTunableParameters'. "
But, I can see all my parameters in the slrtExplorer tab, and I can use 'getparam' and 'setparam' to access my parameters.
The majority of the parameters I am accessing by name, not block:
setparam(app.tg,'','imC_flg_offlineMode',false);
Hi, Sandra,
Sorry, my bad. Can you try the followings?
app = slrealtime.Application('yourAppName');
tunables = app.getParameters();
This method will give you all the run-time tunable parameters in your application.
If you can tune the parameter value by using tg.setparam, then it should be available in parameter set command.
Hi, thanks for this.
Tthose commands worked and 'tunables' contains a struct with 682 tunable parameters, and you're right I can access these through tg.setparam.
But my problem is I do not get all these parameters when I perform 'saveParameters' - I only get 70!
So either one of the commands I listed in my orginal message (save/import/explorer) are not accessing all the parameters.
Any further help much appreciated,
regards,Sandra
Hi, Sandra,
Please reach out our customer support. We would like to know what caused the issue and we can provide further support. Thanks!

Sign in to comment.

Products

Release

R2021b

Asked:

on 18 Aug 2022

Commented:

on 24 Aug 2022

Community Treasure Hunt

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

Start Hunting!