Chapter 7
Code Optimization
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. *****/
/* ----------------------------
/* {new..11} */
new_11_1 = var;
/* ----------------------------
/* {new..1} */
new_1_1 = var1;
/* ----------------------------
/* {new..12} */
new_12_1 = U->new_1 + new_1_1;
/* ----------------------------
/* {new..3} */
var = new_12_1;
/* ----------------------------
/* {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;}
AutoCode Reference
Read from Variable */
Read from Variable */
Sum of Vectors */
Write to Variable */
Sum of Vectors */
7-2
ni.com
Need help?
Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?
Questions and answers