MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuel de service Page 86

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 282
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 281 282

Commentaires sur ces manuels

Pas de commentaire