Borrar filtros
Borrar filtros

tlc undefined identifier param

11 visualizaciones (últimos 30 días)
Brandon Phelps
Brandon Phelps el 1 de Sept. de 2016
Editada: Govind el 12 de En. de 2023
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 comentario
Baris Bitik
Baris Bitik el 31 de Ag. de 2022
Can you help me with this? I am having the same problem.

Iniciar sesión para comentar.

Respuestas (1)

Govind
Govind el 12 de En. de 2023
Editada: Govind el 12 de En. de 2023
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

Categorías

Más información sobre Target Language Compiler en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by