HP (Hewlett-Packard) B Network Router User Manual


 
/****************************************************************************/
void main(void) /* run the program */
{
clrscr();
rst_clr(ADDR_G); /* reset generator digitizer */
rst_clr(ADDR_I); /* reset inserter digitizer */
rst_clr(ADDR_MEM); /* reset memory card */
configure(); /* configure the digitizers and the memory card */
initiate(); /* initiate the digitizers and the memory card */
/* retrieve the readings from the memory card */
}
/****************************************************************************/
void configure(void)
{
int length = 0, loop = 0;
/* use the "digitizer1" array to configure the generator digitizer */
char static *digitizer1[] =
{"CONF1:ARR:VOLT (10),5,(@3)", /* set 10 readings, 5V range, */
/* channel 1, input port 3 */
"CONF2:ARR:VOLT (10),5,(@4)", /* configure channel 2, port 4 */
"TRIG:STAR:SOUR ECLT0", /* set trigger source */
"VINS:LBUS:RES", /* reset the Local bus chip */
"VINS:LBUS:MODE GEN", /* set Local bus mode to GENerate */
"VINS:LBUS:FEED ’CONV:BOTH’", /* set Local bus feed (A/Ds) */
"VINS:LBUS:SEND:POIN 2; POIN:AUTO OFF"}; /* set number of readings per block */
/* send end-of-block and end-of frame */
/* after each reading */
/* use the "digitizer2" array to configure the inserter digitizer */
char static *digitizer2[] =
{"CONF1:ARR:VOLT (10),5,(@3)", /* set 10 readings, 5V range, */
/* channel, 1 input port 3 */
"CONF2:ARR:VOLT (10),5,(@4)", /* configure channel 2, port 4 */
"TRIG:STAR:SOUR TIM", /* set trigger source */
"TRIG:STAR:TIM 1E-6", /* set sample rate (1 MHz) */
"OUTP:ECLT0:FEED ’TRIG’", /* feed trigger to generator from ECLT0 */
"OUTP:ECLT0:STAT ON", /* enable feed */
"VINS:LBUS:RES", /* reset the Local bus chip */
"VINS:LBUS:MODE INS", /* set Local bus mode to INSert */
"VINS:LBUS:FEED ’CONV:BOTH’", /* set Local bus feed (A/Ds) */
"VINS:LBUS:SEND:POIN 2; POIN:AUTO OFF"}; /* set number of readings per block */
/* send end-of-block and end-of frame */
/* after each reading */
Continued on Next Page
Appendix D Local Bus Interleaved Transfers 409