
HP E1563A and E1564A Register-Based Programming
133
Appendix B
/* read all 7 readings from all channels */
/* comment the channel 3/4 lines out if running the 2-channel E1563A */
for (i=0; i<7; ++i)
{
err=ViIn16(digitizer,VI_A16_SPACE,0x08,&cache_reg);
if (err<VI_SUCCESS) err_handler(digitizer,err);
reading = (double)cache_reg*4/32768;
printf(“channel 1 = %lf Volts\n”, reading);
err=ViIn16(digitizer,VI_A16_SPACE,0x0A,&cache_reg);
if (err<VI_SUCCESS) err_handler(digitizer,err);
reading = (double)cache_reg*4/32768;
printf(“channel 2 = %lf Volts\n”, reading);
/* E1564A only for channels 3 and 4 -- comment out for E1563A */
err=ViIn16(digitizer,VI_A16_SPACE,0x08,&cache_reg);
if (err<VI_SUCCESS) err_handler(digitizer,err);
reading = (double)cache_reg*4/32768;
printf(“channel 3 = %lf Volts\n”, reading);
err=ViIn16(digitizer,VI_A16_SPACE,0x0A,&cache_reg);
if (err<VI_SUCCESS) err_handler(digitizer,err);
reading = (double)cache_reg*4/32768;
printf(“channel 4 = %lf Volts\n”, reading);
} /* end of if statement */
/* reset the digitizer */
reset(digitizer,err);
printf(“\nHP E1563A/E1564A is reset”);
/***** Close session *****/
ViClose(digitizer);
ViClose(defaultRM);
}
Reset Function
/************************************************************/
void reset(ViSession digitizer, ViStatus err)
/* reset the digitizer (write a 1 to status bit 0) delay 1 second for reset */
/* then set bit back to 0 to allow module to operate */
{
/* write a “1” to the reset bit then set the bit back to “0” */
err=ViOut16(digitizer,VI_A16_SPACE,0x04,1);
/* set reset bit to “1” */
if (err<VI_SUCCESS) err_handler(digitizer,err);
wait(1);
err=ViOut16(digitizer,VI_A16_SPACE,0x04,0);
/* set reset bit to “0” */
if (err<VI_SUCCESS) err_handler(digitizer,err);
return;
}
Summary of Contents for E1563A
Page 8: ......
Page 24: ...24 Digitizer Module Set up ...
Page 84: ...84 Digitizer Command Reference ...
Page 110: ...110 ...
Page 138: ...138 HP E1563A and E1564A Register Based Programming Appendix B ...
Page 156: ...156 HP E1563A and E1564A Verification Tests ...