Technical data
3 
Writing Target Language Files
3-12
7
This convention creates consistent variables throughout the TLC files. For 
example, the Gain block contains the following 
Outputs function:
%% Function: Outputs ===========================================
%% Abstract:
%% Y = U * K
%%
%function Outputs(block, system) Output
/* %<Type> Block: %<Name> */
%assign rollVars = ["U", "Y", "P"]
%roll sigIdx = RollRegions, lcv = RollThreshold, block,...
"Roller", rollVars
%assign y = LibBlockOutputSignal(0, "", lcv, sigIdx)
%assign u = LibBlockInputSignal(0, "", lcv, sigIdx)
%assign k = LibBlockParameter(Gain, "", lcv, sigIdx)
%<y> = %<u> * %<k>;
%endroll
%endfunction
Table 3-5: TLC Global Variables Specifying RTW Global Functions
Description TLC Global Variable Default Value
Log variable create function
tCreateLogVar rt_CreateLogVar
Log variable update function
tUpdateLogVar rt_UpdateLogVar
Zero-crossing function
tZCFcn rt_ZCFcn
 Note 3
 Note 1
 Note 5
 Notes 4, 6
 Note 2










