MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Servisní příručka Strana 119

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 282
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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.
Zobrazit stránku 118
1 2 ... 114 115 116 117 118 119 120 121 122 123 124 ... 281 282

Komentáře k této Příručce

Žádné komentáře