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

Algorithmic closed loop controller
Table of Contents

Advertisement

}
return 0;
}
#if 0
/* Example algorithm that calculates 4 Mx+B values upon
* signal that sync == 1. M and B terms set by application
* program.
*
* filename: mxplusb
*/
static float M, B, x, sync;
if ( First_loop ) sync = 0;
if ( sync == 1 ) {
writecvt( M*x+B, 10 );
writecvt(-(M*x+B), 11 );
writecvt( (M*x+B)/2,12 );
writecvt( 2*(M*x+B),13 );
sync = 2;
}
Results from running this program with the following
syntax: <progname> mxplusb
Array contents: 5.678000, -5.678000, 2.839000, 11.356000
Array contents: 6.912000, -6.912000, 3.456000, 13.823999
Array contents: 8.146000, -8.146000, 4.073000, 16.292000
Array contents: 9.379999, -9.379999, 4.690000, 18.759998
Array contents: 10.613999, -10.613999, 5.307000, 21.227999
Array contents: 11.848000, -11.848000, 5.924000, 23.695999
Array contents: 13.082000, -13.082000, 6.541000, 26.164000
Array contents: 14.315999, -14.315999, 7.158000, 28.631998
Array contents: 15.549999, -15.549999, 7.775000, 31.099998
Array contents: 16.783998, -16.783998, 8.391999, 33.567997
#endif
402 Example Program Listings
/* Normal end of program */
Appendix G

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents