MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Instrukcja Obsługi Strona 119

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 282
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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.
Przeglądanie stron 118
1 2 ... 114 115 116 117 118 119 120 121 122 123 124 ... 281 282

Komentarze do niniejszej Instrukcji

Brak uwag