50
Using the Multiplexer
/* Pause until ready */
errStatus = viQueryf(E8462A, “*OPC?\n”,”%t”,opc_int);
if(VI_SUCCESS > errStatus){
printf(“ERROR: viQueryf() returned 0x%x\n”,errStatus);}
/* Start Scan */
errStatus = viPrintf(E8462A, “INIT\n”);
if(VI_SUCCESS > errStatus){
printf(“ERROR: viPrintf() returned 0x%x\n”,errStatus);}
/* Get readings from Multimeter */
errStatus = viQueryf(E1412A, “FETC?\n”,”%,10lf”,readings);
if(VI_SUCCESS > errStatus){
printf(“ERROR: viQueryf() returned 0x%x\n”,errStatus);}
for (ii=0;ii<10;ii++) {
printf (Reading %d is: %lf\n”,ii,readings[ii]); }
/* Reset E8462A to open all channels*/
errStatus = viPrintf(E8462A,”*RST\n”);
if (VI_SUCCESS > errStatus) {
printf(“ERROR: viPrintf() returned 0x%x\n”,errStatus);}
/* Close the E8462A Instrument Session */
errStatus = viClose (E8462A);
if (VI_SUCCESS > errStatus)
printf(“ERROR: viClose() returned 0x%x\n”,errStatus);
/* Close the Multimeter Instrument Session */
errStatus = viClose (E1412A);
if (VI_SUCCESS > errStatus)
printf(“ERROR: viClose() returned 0x%x\n”,errStatus);
/* Close the Resource Manager Session */
errStatus = viClose (viRM);
if (VI_SUCCESS > errStatus)
printf(“ERROR: viClose() returned 0x%x\n”,errStatus);
return VI_SUCCESS;
}
Summary of Contents for E8462A
Page 2: ...x...
Page 10: ...8 Notes...
Page 11: ...9 Notes...
Page 12: ...10 Notes...
Page 15: ...Configuring the Agilent E8462A Multiplexer 13 Figure 1 1 Agilent E8462A Simplified Schematic...
Page 68: ...66 Using the Multiplexer...
Page 104: ...102 Agilent E8462A Relay Multiplexer Command Reference...
Page 118: ...116 Agilent E8462A Relay Multiplexer Command Reference...
Page 126: ...124 Agilent E8462A Scanning Voltmeter Application Examples Chapter 4 Notes...
Page 146: ...144 Register Based Programming...
Page 156: ...154 Index...