How Can I Detect when Certain Events Occur?

Updated Jul 27, 2018

Reported In


  • LabVIEW

Operating System

  • Windows

Issue Details

I want to have the ability to react when certain events in the operating system occur, e.g. a process 
reaching a specified state, a system event happening, or a mutex unlocking. On Linux I can do this with the poll function. Is there an equivalent or an implementation of this function in LabVIEW?


An equivalent function that can be used with LabVIEW is Windows' function WaitForSingleObject. It waits until the object specified by the passed handle is in the signaled state, or until the specified time-out interval has elapsed.

The function WaitForSingleObject is contained in Windows' kernel32.dll. The attached VI demonstrates how to use it.

Additional Information

Use the similar functions WaitForSingleObjects, WaitForSingleObjectEx, and WaitForSingleObjectsEx to wait for multiple objects, and to enter an alertable wait state, respectively.