
46
Agilent VISA User’s Guide
3
Programming with VISA
Using Events and Handlers
This section provides guidelines to using events and handlers,
including:
•
Events and Attributes
•
Using the Callback Method
•
Using the Queuing Method
Events and Attributes
Events
are special occurrences that require attention from your
application. Event types include Service Requests (SRQs), interrupts,
and hardware triggers. Events will not be delivered unless the
appropriate events are enabled.
Event Notification
There are two ways you can receive notification that an event has
occurred:
•
Install an event handler with
viInstallHandler
, and enable one or
several events with
viEnableEvent
. If the event was enabled with a
handler, the specified event handler will be called when the specified
event occurs. This is called a
callback
.
VISA cannot call back to a Visual Basic function. This means that you
can only use the
VI_QUEUE
mechanism in
viEnableEvent
. There is
no way to install a VISA event handler in Visual Basic.
•
Enable one or several events with
viEnableEvent
and call the
viWaitOnEvent
function. The
viWaitOnEvent
function will
suspend the program execution until the specified event occurs or the
specified timeout period is reached. This is called
queuing
.
N O T E
VISA cannot call back to a Visual Basic function. Thus, you can only
use the
queuing
mechanism in
viEnableEvent
. There is no way to
install a VISA event handler in Visual Basic.
N O T E
Содержание 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 ...