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

  • 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 133
LibBlockParameter
4
-12
Note: Case 4 maintains the parameter even though InlineParameters is
selected.
Do not use this function if you’re using the result to get the address of a
parameter. The reason is that when you’re inlining parameters you’ll end up
referencing a number (i.e.,
&4.55). To avoid this situation use library function
%<LibBlockParameterAddr(param, ucv, lcv, sigIdx)>
Example
Assuming Gain is the second block parameter, these are equivalent
%assign param = LibBlockParameter(Gain, "", "", 0)
%assign param = LibBlockParameter(Parameter[1], "", "", 0)
This routine does not work for matrix parameters. Use
LibBlockMatrixParamter when accessing a block’s matrix parameter. If a
matrix parameter is accessed via this routine, the reported error message is:
%exit %<Type> block %<Name> must access %<param.Name> via
LibBlockMatrixParameter.
Case Rolling InlineParameters Type Result P Needed in Memory
1 0 1 scalar 4.55
no
2 1 1 scalar 4.55
no
3 0 1 vector 4.55
no
4 1 1 vector p_Gain[i]
yes
5 0 0 scalar rtP.blk.Gain
no
6 1 0 scalar rtP.blk.Gain
no
7 0 0 vector rtP.blk.prm[0]
no
8 1 0 vector p_Gain[i]
yes
Vue de la page 133
1 2 ... 129 130 131 132 133 134 135 136 137 138 139 ... 281 282

Commentaires sur ces manuels

Pas de commentaire