MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manual de servicio Pagina 86

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 282
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 85
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
Vista de pagina 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 281 282

Comentarios a estos manuales

Sin comentarios