How to Monitor Third-Party Application Running Status in Windows with LabVIEW

Updated Aug 14, 2023

Environment

Software

  • LabVIEW

Operating System

  • Windows

You can refer to the article in Related Links for a method to monitor LabVIEW VIs or LabVIEW-built applications status using the VI server.

This article explains the programming for monitoring third-party applications running status using LabVIEW.
In this article, we will use Windows's tasklist command with LabVIEW's System Exec VI to monitor the process that is currently running in Windows.

  1. Get the name of the application that you want to monitor.
  2. Refer to the tasklist command documentation on what kind of value you want to retrieve. To retrieve the running status of an application you can use STATUS filter.
  3. For example, to monitor if notepad.exe is currently running you can use tasklist /fi "IMAGENAME eq notepad.exe" command in command prompt. In case the notepad.exe is not running, INFO: No tasks are running is returned.
  4. To incorporate the command in LabVIEW, place System Exec VI in the block diagram and pass the tasklist /fi "IMAGENAME eq notepad.exe" to the command line input terminal.
  5. The returned value can be acquired from System Exec VI's standard output terminal.
  6. Run the code in a loop to continuously monitor the third-party application in a LabVIEW VI.

The below image is the example VI for implementing the tasklist command in LabVIEW.
System Exec Tasklist.png