Timeout on VISA Wait On Event Even Though the Event Has Occurred

Updated May 12, 2023

Reported In


  • LabVIEW Full
  • LabVIEW Professional
  • LabVIEW Base



Issue Details

I'm repeatedly waiting for VISA events in a loop. After several iterations of the loop, the VISA Wait on Event VI times out even though I know that the event that I'm waiting for occurred within the timeout. Why is this happening?


This occurs if event handles are not being closed with each loop iteration. In the VISA documentation it mentions that a Wait On Event call returns a viHandle specifying the unique occurrence of an event. This event handle must be closed each time you call a VISA Wait on event after you catch your event. In LabVIEW, this is accomplished by wiring the event resource of the Wait On Event VI to a VISA Close VI in your loop. See the example below: