Agilent Technologies E1442-90003 Switch User Manual


 
98 Register-Based Programming Appendix B
/* scan channels 48-63 (register offset 16) */
for (k=0; k15; k++)
{
iwpoke ((unsigned short *)(base_addr + 0x16), ldexp(1,k));
delay (50);
}
/* set all bits to 0 to open last closed channel */
iwpoke ((unsigned short *)(base_addr + 0x16), 0);
/* close session */
iclose(e1442a);
} /* end of main */
Reset Function /**********************************************************/
void reset_sw(char *base_addr)
/* reset the module; open all relays (write a 1 to status bit 0) */
/* delay 100 ms for reset then set bit to 0 to allow closing of */
/* switches*/
}
/* this function resets the switch module */
iwpoke((unsigned short *)(base_addr + 0x04), 1);
delay (100);
iwpoke((unsigned short *)(base_addr + 0x04), 0); }
}