VISA Events Introduction

NI-VISA

Introduction

VISA defines a common mechanism to notify an application when certain conditions occur. These conditions or occurrences are referred to as events. An event is a means of communication between a VISA resource and its applications. Typically, events occur because of a condition requiring the attention of applications.

The VISA event model provides the following two different ways for an application to receive event notification:

  • The first method uses a queuing mechanism. You can use this method to place all of the occurrences of a specified event in a queue. The queuing mechanism is generally useful for noncritical events that do not need immediate servicing. Queuing describes this mechanism in detail.
  • The other method is to have VISA invoke a function that the program specifies prior to enabling the event. This is known as a callback handler and is invoked on every occurrence of the specified event. The callback mechanism is useful when your application requires an immediate response. Callbacks describes this mechanism in detail.

The queuing and callback mechanisms are suitable for different programming styles. However, because these mechanisms work independently of each other, you can have them both enabled at the same time.