Could not load/create parameter sets for "Tunable block and global parameter" in real-time application speedgoat

조회 수: 3 (최근 30일)
Platform: MATLAB 2021a, Simulink, speedgoat (OS QNX)
But when I use my own Simulink real-time applications (includes many library blocks, reference subsystems, reference models, variant subsystem), I could not even load/create the parameter sets. Are there any configuration that I am missing or there are limitations on "Tunable block and global parameter" that will not work on my application? Please help. Thank you.
Following are some example commands and error messages:
example 1:
>> slbuild(mdlName);
........
>> tg = slrealtime('TargetPC1');
>> tg.stop
>> load(tg,mdlName);
>> paramSetName = 'outportTypes';
>> saveParamSet(tg,paramSetName);
>> loadParamSet(tg,paramSetName);
Dot indexing is not supported for variables of this type.
example 2:
>> myParamList = listParamSet(tg,'mdlName')
myParamList =
5×1 cell array
{'autoSaveOnStop'}
{'autoSaveOnStop'}
{'autoSaveOnStop'}
{'myParamSet' }
{'autoSaveOnStop'}
>> tg.status
ans =
'loaded'
>> paramSetName = 'myParamSet';
saveParamSet(tg,paramSetName);
>> myParamSet = importParamSet(tg,paramSetName);
Error using slrealtime.Target/importParamSet
Dot indexing is not supported for variables of this type.

채택된 답변

Stefanie Schwarz
Stefanie Schwarz 2022년 8월 23일
This appears to be a bug which occurs if a bus object has a boolean type bus element and the bus is used as a parameter in the application.
There are 2 workarounds:
  • Don't use boolean bus elements if possible, especially if the bus type is used for a parameter. Use a numeric data type instead and convert the signal in Simulink to a boolean with a Data Type Conversion block if necessary. Obviously this workaround might not scale depending on how many such parameters or bus types there are.
  • If the parameter with bus data type does not actually need to be tuned in the application, exclude it from tunable parameters. This can be done by changing default parameter behavior from tunable to inlined and then specifying the parameters that need to be tuned with Simulink.Parameter objects.
  댓글 수: 1
Hai Zeng
Hai Zeng 2022년 8월 23일
Thank you for the official answer, though it has been 5 months since the question proposed.
I did some trial and error to get it solved by changing boolean elements.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by