
Programming with VISA
3
Agilent VISA User’s Guide
61
printf( "\nStray event of type 0x%lx\n",
eventType );
return VI_SUCCESS;
}
/* print the event information */
printf("\nSRQ Event Occurred!\n");
printf("...Original Device Session = %ld\n",
vi);
/* get the status byte */
viReadSTB(vi, &statusByte);
printf("...Status byte is 0x%x\n",
statusByte);
srqOccurred = 1;
return VI_SUCCESS;
}
void main(){
ViSession defaultRM,vi;
long count;
/* open session to message based VXI device */
viOpenDefaultRM(&defaultRM);
viOpen(defaultRM, "GPIB-VXI0::24::INSTR",
VI_NULL, VI_NULL, &vi);
/* Enable command error events */
viPrintf( vi, "*ESE 32\n" );
/* Enable event register interrupts */
viPrintf( vi, "*SRE 32\n" );
/* install the handler and enable it */
viInstallHandler(vi, VI_EVENT_SERVICE_REQ,
mySrqHdlr,
(ViAddr)10);
viEnableEvent(vi, VI_EVENT_SERVICE_REQ,
VI_HNDLR, VI_NULL);
srqOccurred = 0;
Содержание E2094S
Страница 6: ...6 Agilent VISA User s Guide ...
Страница 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Страница 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Страница 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...
Страница 144: ...144 Agilent VISA User s Guide Glossary ...