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

Algorithmic closed loop controller
Table of Contents

Advertisement

/* Setup SCP functions */
INST_SEND(e1415, "sens:func:volt (@116)\n"); /* Analog in volts */
INST_SEND(e1415, "sour:func:cond (@141)\n"); /* Digital output
#if 0
/* Perform Calibrate, if necessary */
{
int cal_result;
cal_result = -1;
INST_QUERY(e1415, "*CAL?\n", "%d", &cal_result);
if (cal_result) {
}
}
#endif
/* Configure Trigger Subsystem and Data Format */
INST_SEND(e1415, "trig:sour timer;:trig:timer .001\n");
INST_SEND(e1415, "samp:timer 10e-6\n"); /* default */
INST_SEND(e1415, "form real,32\n");
/* Download Globals */
/* INST_SEND(e1415, "alg:def 'globals','static float x;'\n"); */
/* Download algorithms */
#if 1
/* Get an algorithm(s) from the passed filename(s). We assign sequential
* algorithm numbers to each successive file name: ALG1, ALG2, etc. when
* you execute this program as "<progname> lang1 lang2 lang3 ..."
*/
alg_num = 1;
while (argc > alg_num) {
algorithm = get_algorithm(argv[alg_num]); /* Read the algorithm */
/* Define the algorithm */
{
char
(void) sprintf(alg, "ALG%d", alg_num);
INST_SEND(e1415, "alg:def %S, %*B\n", alg,
/* Check for algorithm errors */
INST_QUERY(e1415,"syst:err?\n", "%d,%S", &error, string);
if (error) {
}
}
/* Free the malloc'ed memory */
400 Example Program Listings
/* Set to 1 to do calibration */
/* Result of E1415 self-test */
/* Make sure it gets assigned */
(void) fprintf(stderr, "E1415A failed calibration\n");
(void) fprintf(stderr, "Check FIFO for channel errors\n");
exit(1);
/* Set to 1 if algorithms passed in as files */
/* Starting algorithm number */
alg[6];
/* Temporary algorithm name */
strlen(algorithm) + 1, algorithm);
(void) printf("While loading file %s, syst:err %d,%s\n",
argv[alg_num], error, string);
exit(1);
*/
Appendix G

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents