HP VXI E1476A User's Manual And Programming Manual page 116

64-channel, 3-wire multiplexer module
Table of Contents

Advertisement

for (k=0; k<=15; k++)
{
iwpoke ((unsigned short *)(base_addr + 0x24), ldexp(1,k));
/* take measurement here after each iteration of the loop */
}
/* set all bits to 0 to open last closed channel */
iwpoke ((unsigned short *)(base_addr + 0x24), 0);
/* scan channels 48-63 in bank A (register offset 0x26) */
for (k=0; k<=15; k++)
{
iwpoke ((unsigned short *)(base_addr + 0x26), ldexp(1,k));
/* take measurement here after each iteration of the loop */
}
/* set all bits to 0 to open last closed channel */
iwpoke ((unsigned short *)(base_addr + 0x26), 0);
/* close HP SICL session */
iclose(e1476a);
} /* end of main */
Reset Function
/************************************************************/
void reset_mux(char *base_addr)
/* reset the mux to open all relays (write a 1 to status bit 0)*/
/* delay 100 ms for reset then set bit to 0 to allow closing*/
/* switches
{
/* this function resets the multiplexer */
iwpoke((unsigned short *)(base_addr + 0x04), 1);
delay (100);
iwpoke((unsigned short *)(base_addr + 0x04), 0); }}
Program Output
Appendix B
*/
/* must wait at least 100 usec before writing a "0" */
Printout from example program:
ID register = 0xFFFF
Device Type register = 0x 218
Status register = 0xFFBE
Channels 00-15 register = 0xFFFF
Channels 16-31 register = 0x 0
Channels 32-47 register = 0x 0
Channels 48-63 register = 0x 0
Channels 90-94 (tree) register = 0xFF01
HP E1476A Register-Based Programming 115

Advertisement

Table of Contents
loading

Table of Contents