MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manual de Serviço Página 119

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 282
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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.
Vista de página 118
1 2 ... 114 115 116 117 118 119 120 121 122 123 124 ... 281 282

Comentários a estes Manuais

Sem comentários