How can I tune S-Function parameters in Simulink Real-Time?

2 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2023 年 3 月 29 日
回答済み: MathWorks Support Team 2023 年 3 月 30 日
When I enter a literal value in the S-Function parameters dialog, the parameter doesn't show up in the Simulink Real-Time Explorer.
This happens even though I configured the S-Function parameter to be tunable and I set the Default parameter behavior to Tunable.
What is the right way to make an S-Function parameter tunable in Simulink Real-Time?

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 3 月 29 日
First confirm that the parameter is configured to be tunable. You can use the sfun_runtime1.c demo from the S-Function Examples as a starting point. 
Then you have 2 options to make the parameter tunable in SLRT
1) Use a variable for the parameter, and pass the variable to the S-Function
2) Create a mask on top of the S-Function, and create a mask parameter to pass down to the S-Function. This is a good option if you want to use a literal expression instead of creating a variable.

その他の回答 (0 件)

タグ

タグが未入力です。

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by