フィルターのクリア

tlc undefined identifier param

11 ビュー (過去 30 日間)
Brandon Phelps
Brandon Phelps 2016 年 9 月 1 日
編集済み: Govind 2023 年 1 月 12 日
I am trying to use the SParameter of a S-Function level 2 on a inline S-Function to obtain a value passed from the mask of a block in my tlc file. I run into the error message.
Error: File: \rtw\c\tlc\lib\paramlib.tlc Line: 22 Column: 24 Undefined identifier param.
Thus indicating I'm not correctly defining the Parameter.
My tlc file look something like.
%function Outputs(block, system) Output
%assign y = LibBlockOutputSignal(0, "", "", 0)
%assign out = LibBlockParameter(out, "", "", 0)
%<y> = %<out>;
%endfunction %%Outputs
Thus I get the error on the line 3rd line.
I opened the mask for the block and added an edit parameter and named it out. After this I was able to double click the block and add a value to the textbox shown. So I believe the number is being entered however I'm missing the step to get the value to the tlc part.
Thoughts?
  1 件のコメント
Baris Bitik
Baris Bitik 2022 年 8 月 31 日
Can you help me with this? I am having the same problem.

サインインしてコメントする。

回答 (1 件)

Govind
Govind 2023 年 1 月 12 日
編集済み: Govind 2023 年 1 月 12 日
For level 2 M-S functions you need to use LibBlockParameter(MSFcnParameter, ucv, lcv, sigIdx). You get this error because "Out" is not part of CompiledModel.ModelParameters.
Some more points to be noted
1) make dialog parameters tunable block.DialogPrmsTunable = {'Tunable'};
2) Register all tunable parameters as runtime parameters --> block.AutoRegRuntimePrms;
for detailed example look into sldemo_msfcn_lms

カテゴリ

Help Center および File ExchangeTarget Language Compiler についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by