How can I tune parameters inside a model reference using Speedgoat & Simulink Real-Time (SLRT)?

조회 수: 36 (최근 30일)
How can I tune parameters inside a model reference with Speedgoat & Simulink Real-Time (SLRT)?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2025년 10월 8일
편집: MathWorks Support Team 2025년 10월 8일
For R2025a and later
If the model reference only has a single instance, you can tune the parameter directly without creating a variable. See the release notes for R2025a: https://www.mathworks.com/help/slrealtime/release-notes.html?startrelease=R2025a&endrelease=R2025a&rntext=&groupby=release&sortby=descending&searchHighlight=#mw_008f8655-acd2-46ec-beda-92edace5180c
For R2020b - R2024b 
Only model-level parameters are supported for tuning with Speedgoat & Simulink Real-Time (SLRT). This means that you can tune workspace parameters, model arguments, and model instance parameters in referenced models. Tuning block parameters inside referenced models is no longer possible.
In order to tune parameters in referenced models, you can parameterize the references for the variables you want to control. For more information, see Parameterize Instances of a Reusable Referenced Model and Tunable Block Parameters and Tunable Global Parameters.
Note that structured parameters are supported as well, so it is possible to group many individual parameters together to simplify things.
For programmatic tuning with "setparam", note that the correct syntax for tuning parameters of reference model instances is:
>> tg = slrealtime;
>> tg.setparam({'top/model','sub/model'},'myParam',5);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Real-Time Parameter Tuning에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by