/* write command to command register */
/* wait for mm ready bit = 1 */
while(!READY);
iwpoke((unsigned short *)(base_ad 0x08),command);
/* write parameter to parameter register */
/* wait for mm ready bit = 1 */
while (!READY);
iwpoke((unsigned short *)(base_ad 0x0A),parameter);
/* save aperture time, range, and function for reading conversion */
if (command == 0)
aper = parameter;
else if (command == 2)
rng = parameter;
else if (command == 4)
func = parameter;
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 */
}
/
******************************************************
/
void set_sample_period(char *base_addr_dmm, int command, unsigned
short parameter)
{
/* this function sets the multimeter sample period */
/* parameter variables */
unsigned short parm1 = 0, parm2 = 0;
/* convert parameter (sample period) to two bytes */
parm1 = parameter >> 8;
/* upper byte */
parm2 = parameter & 0xFF; /* 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 lower byte to parameter register */
/* wait for mm ready bit = 1 */
while (!READY);
Continued on Next Page
Appendix C
HP E1326B/E1411B Multimeter Register-Based Programming 241
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com