Technical data
3
Writing Target Language Files
3-24
For an example of this function, see gain.tlc.
Note 1: Do not use this function to build the address of a parameter. For
example,
%assign paramAddr = "&%<LibBlockParameter(Gain, ...)>"
This may produce a reference to a constant number, for example &4.95 if the
value of
Gain is 4.95, and RTW is configured to inline parameter values. Use
LibBlockParameterAddr to avoid this undesirable behavior.
Note 2: Code generation exits if this function is passed a matrix parameter.
(see LibBlockMatrixParameter).
LibBlockParameterAddr(param, ucv, lcv, sigIdx)
This function returns the appropriate address of a block’s parameter. The
function works similarly to
LibBlockParameter except that its returned value
is independent of the inline parameter values configuration. That is,
LibBlockParameterAddr(Gain, "i", "", sigIdx) will return &rtP.Gain[i]
regardless if RTW is configured to inline parameter values. For an example of
this function, see
lookup2d.tlc.
Note: Calling this function will force the parameter to stay in memory
regardless of the value of
InlineParameters.
LibBlockMatrixParameter(param, rowUcv, rowLcv, rowSigIdx, colUcv,
colLcv, colSigIdx)
This function is similar to LibBlockOutputSignal, except it returns the
appropriate reference to a block’s matrix parameter. These are user control
variables, loop control variables, and signal indices for both the rows and