48
Using the Multiplexer
{
ViStatus errStatus;
/*Status from each VISA call*/
ViSession viRM;
/*Resource mgr. session */
ViSession E8462A;
/* Module session */
ViSession E1412A;
/* Multimeter session */
viSetAttribute (E1412A,VI_ATTR_TMO_VALUE,268435456)
/* multimeter timeout value */
int ii;
/* loop counter */
char opc_int[21]
/* OPC? variable */
double readings [10];
/* Reading Storage*/
/* Open the default resource manager */
errStatus = viOpenDefaultRM ( &viRM);
if(VI_SUCCESS > errStatus)
printf(“ERROR: viOpenDefaultRM() returned 0x%x\n”,errStatus);
/* Open the Module instrument session */
errStatus = viOpen(viRM,INSTR_ADDR, VI_NULL,VI_NULL,&E8462A);
if(VI_SUCCESS > errStatus)
printf(“ERROR: viOpen() returned 0x%x\n”,errStatus);
/* Open the Multimeter instrument session */
errStatus = viOpen(viRM,MULTI_ADDR, VI_NULL,VI_NULL,&E1412A);
if(VI_SUCCESS > errStatus)
printf(“ERROR: viOpen() returned 0x%x\n”,errStatus);
/* Reset the Multimeter, clear status system */
errStatus = viPrintf(E1412A, “*RST;*CLS\n”);
if(VI_SUCCESS > errStatus)
printf(“ERROR: viPrintf() returned 0x%x\n”,errStatus);
/*Configure Multimeter for DCV measurements, 12 V max, min resolution */
errStatus = viPrintf(E1412A, “CONF:VOLT 12,MIN\n”);
if(VI_SUCCESS > errStatus)
printf(“ERROR: viPrintf() returned 0x%x\n”,errStatus);
/* Set multimeter trig input TTLT0 Trigger Line */
errStatus = viPrintf(E1412A, “TRIG:SOUR:TTLT0\n”);
if(VI_SUCCESS > errStatus)
printf(“ERROR: viPrintf() returned 0x%x\n”,errStatus);
/* Enable Measurement Complete on TTL2 */
errStatus = viPrintf(E1412A, “OUTP:TTLT1 ON\n”);
if(VI_SUCCESS > errStatus)
printf(“ERROR: viPrintf() returned 0x%x\n”,errStatus);
/* Enable Trigger Delay */
errStatus = viPrintf(E1412A, “TRIG:DEL 0.001\n”);
if(VI_SUCCESS > errStatus)
printf(“ERROR: viPrintf() returned 0x%x\n”,errStatus);
Содержание E8462A
Страница 2: ...x...
Страница 10: ...8 Notes...
Страница 11: ...9 Notes...
Страница 12: ...10 Notes...
Страница 15: ...Configuring the Agilent E8462A Multiplexer 13 Figure 1 1 Agilent E8462A Simplified Schematic...
Страница 68: ...66 Using the Multiplexer...
Страница 104: ...102 Agilent E8462A Relay Multiplexer Command Reference...
Страница 118: ...116 Agilent E8462A Relay Multiplexer Command Reference...
Страница 126: ...124 Agilent E8462A Scanning Voltmeter Application Examples Chapter 4 Notes...
Страница 146: ...144 Register Based Programming...
Страница 156: ...154 Index...