Chapter 7
Code Optimization
7-10
ni.com
X->proc_22_S1 = 0.0;
X->proc_24_S1 = 0.0;
XD->proc_22_S1 = 0.0;
XD->proc_24_S1 = 0.0;
/* ---------------------------- Time Delay */
/* {proc..22} */
X->proc_22_S1 = 0.0;
/* ---------------------------- Time Delay */
/* {proc..24} */
X->proc_24_S1 = 0.0;
SUBSYS_PREINIT[1] = FALSE;
return;
}
/***** Output Update. *****/
/* ---------------------------- Time Delay */
/* {proc..22} */
proc_22_1 = X->proc_22_S1;
/* ---------------------------- Time Delay */
/* {proc..24} */
proc_24_1 = X->proc_24_S1;
/* ---------------------------- Sum of Vectors */
/* {proc..14} */
proc_14_1 = U->proc_1 - proc_22_1;
/* ---------------------------- Gain Block */
/* {proc..12} */
proc_12_1 = 2.0*proc_14_1;
/* ---------------------------- Sum of Vectors */
/* {proc..5} */
proc_5_1 = proc_12_1 - proc_24_1;
/* ---------------------------- Gain Block */
/* {proc..4} */
Y->proc_4_1 = 2.0*proc_5_1;
/***** State Update. *****/
/* ---------------------------- Time Delay */
/* {proc..22} */
XD->proc_22_S1 = proc_12_1;
/* ---------------------------- Time Delay */
/* {proc..24} */
XD->proc_24_S1 = Y->proc_4_1;
..
..