/
******************************************************
/
void set_dmm_counts(char *base_addr_dmm, int command, long parameter)
{
/* this function sets the multimeter trigger count, trigger delay, and */
/* sample count */
/* parameter variables */
unsigned short parm1 = 0, parm2 = 0, parm3 = 0;
/* convert count or delay to three bytes */
parm1 = parameter >> 16;
/* upper byte */
parm2 = parameter >> 8;
/* middle byte */
parm3 = parameter;
/* lower byte */
/* write command to command register */
/* wait for mm ready bit = 1 */
while(!READY);
iwpoke((unsigned short *)(base_ad 0x08),command);
/* write upper byte to parameter register */
/* wait for mm ready bit = 1 */
while (!READY);
iwpoke((unsigned short *)(base_ad 0x0A),parm1);
/* write middle byte to parameter register */
/* wait for mm ready bit = 1 */
while (!READY);
iwpoke((unsigned short *)(base_ad 0x0A),parm2);
/* write lower byte to parameter register */
/* wait for mm ready bit = 1 */
while (!READY);
iwpoke((unsigned short *)(base_ad 0x0A),parm3);
while(!DONE); /* wait until mm is done before sending the */
/* next command and parameters */
if(!NOERR) check_for_error(base_addr_dmm);
/* check for configuration errors */
}
Continued on Next Page
Appendix C
HP E1326B/E1411B Multimeter Register-Based Programming 257
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com