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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 282
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 281 282

Komentarze do niniejszej Instrukcji

Brak uwag