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

Algorithmic closed loop controller
Table of Contents

Advertisement

{
uint16
uint16
uint16
uint16
int32
int16
int16
int32
int32
int32
float64 test_range;
float64 tbl_range;
float64 center;
float64 temp_range;
float64 t;
float64 slope;
float64 absslope;
float64 exponent;
float64 exponent2;
float64 input[129];
float64 result[129];
/*
* First calculate the mid point of the range of values from the min and max
* input values. The offset is the center of the range of min and max
* inputs. The purpose of the offset is to permit calculating the tables
* based upon a relative centering about the X axis. The offset simply
* permits the run-time code to send the corrected X values assuming
* the tables were built symetrically around X=0.
*/
center = min_input + (max_input - min_input) / 2.0F;
*offset = center;
temp_range = max_input - center;
test_range = (temp_range < 0.0 )? -temp_range : temp_range;
/*
* Now calculate the closest binary representation of the test_range such
* that the new binary value is equal to or greater than the calculated
* test_range. Start with the lowest range(1/2^128) and step up until the
* new binary range is equal or greater than the test_range.
*/
tbl_range = two_to_the_N(128);
tbl_range = 1.0/tbl_range;
while ( test_range > tbl_range )
{
tbl_range *= 2;
}
*range = tbl_range;
Xofst = 157;
/*
* Now divide the full range of the table into 128 segments (129 points)
* scanning first the positive side of the X-axis and then the negative
* side of the X-axis.
Appendix F
uint16 *conv_array )
M[128];
EX[128];
Bhigh[128];
Blow[128];
B;
ii;
jj;
Mfactor;
Xfactor;
Xofst;
/* exponent bias for DSP calculations */
/* 2^28 */
Generating User Defined Functions
375

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents