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

  • 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 118
Loop Rolling
3-45
The outputs function for the Gain block is:
%% 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
The generated code will roll depending on the block’s RollRegion (specified in
the RTW file) and
RollThreshold (specified at the command line). If there are
any regions in
RollRegion that are greater than the value specified by
RollThreshold, then those regions will roll. However, any regions in
RollRegion that are less that the value specified by RollThreshold will be
expanded.
Vue de la page 118
1 2 ... 114 115 116 117 118 119 120 121 122 123 124 ... 281 282

Commentaires sur ces manuels

Pas de commentaire