Agilent Technologies E2094S Guía de usuario Pagina 61

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 146
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 60
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;
Vista de pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 145 146

Comentarios a estos manuales

Sin comentarios