National Instruments AutoCode NI MATRIX Reference page 169

National instruments ni matrixx reference manual
Table of Contents

Advertisement

Chapter 6
Vectorized Code Generation
Example 6-3
Generated Code for Poorly Connected Gain Block (for Figure 6-1)
void subsys_1(U, Y)
struct _Subsys_1_in *U;
struct _Subsys_1_out *Y;
{
static RT_INTEGER iinfo[4];
/***** Parameters. *****/
static RT_FLOAT R_P[5];
RT_INTEGER cnt;
static const RT_FLOAT _R_P[5] = {1.2, 2.3, 3.4, 4.5, 5.6};
/***** Algorithmic Local Variables. *****/
RT_INTEGER i;
/******* Initialization. *******/
if (SUBSYS_PREINIT[1]) {
iinfo[0] = 0;
iinfo[1] = 1;
iinfo[2] = 1;
iinfo[3] = 1;
for( cnt=0;cnt<5;cnt++ ) {
R_P[cnt] = _R_P[cnt];
}
SUBSYS_PREINIT[1] = FALSE;
return;
}
/***** Output Update. *****/
AutoCode Reference
Figure 6-1. Poorly Connected Gain Block
6-6
ni.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Autocode ni matrixx

Table of Contents