该内容不适用于您选择的语言

该内容将以另一种语言显示出来。 您可使用浏览器的翻译功能查看内容。

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

Updated Apr 19, 2024

Reported In

Software

  • LabVIEW Full
  • LabVIEW Professional
  • LabVIEW Base

Driver

  • NI-VISA

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?

Solution

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: