HP VXI 75000 C Series User's And Scpi Programming Manual page 378

Algorithmic closed loop controller
Table of Contents

Advertisement

/* Choose the smallest exponent -- maximize resolution */
if (exponent2 < exponent) exponent = exponent2;
Xfactor = (int32)(exponent);
if ( t != 0 )
Mfactor = round32f( two_to_the_N(Xfactor)*slope );
if ( Mfactor == 32768 )
if ((Mfactor<=32767) && (Mfactor>= -32768) )
} /* end for */
/*
* Build actual tables for downloading into the E1415 memory.
*/
for ( ii=0 ; ii<128 ; ii++ )
/*
*/
return;
}
/* Main program */
/*ARGSUSED*/
int main(int argc, char *argv[])
{
/* Main program local variable declarations */
char
int
char
int32
378 Generating User Defined Functions
{
int32 ltemp = round32f( log10( t ) / log10( 2.0 ) );
if ( (Xfactor + ltemp) > 30 )
{
Xfactor = 30 - ltemp;
}
}
{
/* There is an endpoint problem. Re-compute if on endpoint */
Xfactor--;
Mfactor =round32f( two_to_the_N(Xfactor)*slope );
}
{
/* only save if M is within limits */
/* Adjust EX to match runtime.asm */
EX[jj] = (uint16)(Xofst - Xfactor );
M[jj] = (uint16)(Mfactor & 0xFFFF);
B = round32f( two_to_the_N(Xfactor )*result[ii-1] );
Bhigh[jj] = (uint16)((B >> 16) & 0x0000FFFF);
Blow[jj] = (uint16)(B & 0x0000FFFF);
}
{
/* copy 64 sets of coefficents */
conv_array[ii*4] = M[ii];
conv_array[ii*4+1] = EX[ii];
conv_array[ii*4+2] = Bhigh[ii];
conv_array[ii*4+3] = Blow[ii];
printf("%d %d %d %d %d\n",ii,M[ii],EX[ii],Bhigh[ii],Blow[ii]);
}
/* Keeps lint happy */
*algorithm;
/* Algorithm string */
alg_num;
/* Algorithm number being loaded */
string[333];
/* Holds error information */
error;
/* Holds error number */
/* remove leading 1's*/
Appendix F

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents