User`s manual

/* this function specifies a parameter opcode of 7 for the function */
/* parameter. This is a parameter out of range. */
/* write ’measurement function’ to command register, wait for */
/* ready bit = 1 */
while(!READY);
iwpoke((unsigned short *)(base_addr + 0x08),4);
/* write an opcode of 7 to parameter register, wait for ready bit = 1 */
while (!READY);
iwpoke((unsigned short *)(base_addr + 0x0A),7);
while (!DONE);
/* call function which reads the error if an error has occurred */
if(!NOERR) check_for_error(base_addr);
}
/*******************************************************/
void check_for_error(char *base_addr)
{
unsigned short error_code; /* variable for error code from the */
/* query response register */
/* write ’send error’ to command register, wait for */
/* qryrdy bit = 1 */
iwpoke((unsigned short *)(base_addr + 0x08),15);
while (!QRYRDY);
error_code = iwpeek((unsigned short *)(base_addr + 0x08));
printf("Error code = %x", (error_code & 0xFF));
}
Appendix C HP E1326B/E1411B Multimeter Register-Based Programming 233