National-instruments AutoCode NI MATRIX Manual de usuario Pagina 121

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 250
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 120
Chapter 5 Generated Code Architecture
© National Instruments Corporation 5-13 AutoCode Reference
Note If you specify a specific partition with the %var name in the block form (that is,
A.GAIN), that %var is directly used, not indirectly referenced.
Example 5-1 Relevant Code to Support Partitioned %vars Within a Procedure
/* Xmath variable definitions. */
VAR_FLOAT A_GAIN;
VAR_FLOAT B_GAIN;
/******** Procedures’ declarations ********/
/******* Procedure: foo *******/
/***** Inputs type declaration. *****/
struct _foo_u {
RT_FLOAT foo_1;
};
/***** Outputs type declaration. *****/
struct _foo_y {
RT_FLOAT foo_2_1;
};
/***** Info type declaration. *****/
struct _foo_info {
RT_INTEGER iinfo[5];
VAR_FLOAT *GAIN;
};
/******* Procedure: foo *******/
void foo(U, Y, I)
struct _foo_u *U;
struct _foo_y *Y;
struct _foo_info *I;
{
RT_INTEGER *iinfo = &I->iinfo[0];
/***** Output Update. *****/
/* ---------------------------- Gain Block */
/* {foo..2} */
Y->foo_2_1 = (*I->GAIN)*U->foo_1;
iinfo[1] = 0;
Vista de pagina 120
1 2 ... 116 117 118 119 120 121 122 123 124 125 126 ... 249 250

Comentarios a estos manuales

Sin comentarios