
Programming with VISA
3
Agilent VISA User’s Guide
59
printf("TTL0");
break;
default:
printf("<other 0x%x>", trigId);
break;
}
printf("\n");
return VI_SUCCESS;
}
void main(){
ViSession defaultRM,vi;
/* open session to VXI device */
viOpenDefaultRM(&defaultRM);
viOpen(defaultRM, "VXI0::24::INSTR", VI_NULL,
VI_NULL, &vi);
/* select trigger line TTL0 */
viSetAttribute(vi, VI_ATTR_TRIG_ID,
VI_TRIG_TTL0);
/* install the handler and enable it */
viInstallHandler(vi, VI_EVENT_TRIG, myHdlr,
(ViAddr)10);
viEnableEvent(vi, VI_EVENT_TRIG, VI_HNDLR,
VI_NULL);
/* fire trigger line, twice */
viAssertTrigger(vi, VI_TRIG_PROT_SYNC);
viAssertTrigger(vi, VI_TRIG_PROT_SYNC);
/* unenable and uninstall the handler */
viDisableEvent(vi, VI_EVENT_TRIG, VI_HNDLR);
viUninstallHandler(vi, VI_EVENT_TRIG, myHdlr,
(ViAddr)10);
/* close the sessions */
viClose(vi);
viClose(defaultRM);
}
Summary of Contents for E2094S
Page 6: ...6 Agilent VISA User s Guide ...
Page 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Page 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Page 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...