National Instruments AutoCode NI MATRIX User Manual

Page 193

Advertising
background image

Chapter 7

Code Optimization

AutoCode Reference

7-2

ni.com

static RT_INTEGER iinfo[4];

/***** Local Block Outputs. *****/

RT_FLOAT new_11_1;

RT_FLOAT new_1_1;

RT_FLOAT new_12_1;

/******* Initialization. *******/

if (SUBSYS_PREINIT[1]) {

iinfo[0] = 0; iinfo[1] = 1;

iinfo[2] = 1;

iinfo[3] = 1;

SUBSYS_PREINIT[1] = FALSE;

return;

}

/***** Output Update. *****/

/* ---------------------------- Read from Variable */

/* {new..11} */

new_11_1 = var;

/* ---------------------------- Read from Variable */

/* {new..1} */

new_1_1 = var1;

/* ---------------------------- Sum of Vectors */

/* {new..12} */

new_12_1 = U->new_1 + new_1_1;

/* ---------------------------- Write to Variable */

/* {new..3} */

var = new_12_1;

/* ---------------------------- Sum of Vectors */

/* {new..5} */

Y->new_5_1 = U->new_1 - new_11_1;

if(iinfo[1]) {

SUBSYS_INIT[1] = FALSE;

iinfo[1] = 0;

}

return;

EXEC_ERROR: ERROR_FLAG[1] = iinfo[0];

iinfo[0]=0;}

Advertising