How to Set Timeout on the VirtualBench VI When There Is No Trigger Signal

Updated Dec 9, 2025

Environment

Software

  • VirtualBench (Legacy)

Driver

  • VirtualBench Software

The LabVIEW VirtualBench MSO Read VI does not include a timeout feature like the DAQmx Read VI. When no trigger signal is present, the VI waits indefinitely for the trigger, causing the program to hang at the MSO Read VI. To prevent the program from running endlessly without a trigger, modifications such as implementing a timeout mechanism are required.
 
This article explains how to configure a timeout in the LabVIEW VirtualBench MSO function to ensure the program terminates execution properly when no trigger signal is detected.

This example builds upon an existing example from the NI Forum - VirtualBench: Acquire Analog and Digital Signals With the MSO as the starting reference.
 
Refer to the steps below for the programming structure.
  1. Add an indicator for MSO Read VI status.
    Insert a dummy indicator to monitor the status of the MSO Read VI. Initialize it by wiring a False constant to the indicator.
  2. Implement timeout logic using a While loop.
    Place a While Loop and include an Elapsed Time function inside it to serve as the timeout mechanism.
  3. Create a Property Node for Status (Write Mode).
    From the indicator created in Step 1, right-click and select: Create → Property Node → Value.
    Wire this property node to the error cluster status after the MSO Read VI.
    Change the property node to write by right-clicking and selecting Change All to Write.
  4. Create another Property Node for Status (Read Mode)
    Duplicate the property node from step 3, but keep this one in read mode.
    Place it inside the While Loop and wire its output to an OR comparison together with the Elapsed Time condition. Connect this OR result to the Conditional Terminal of the While Loop.
  5. Add a Case Structure for Closing MSO.
    Insert a Case Structure after the loop. In the True case, place the MSO Close VI which is connected to the MSO Run VI. Leave the False case empty.

 

In theory, when a trigger signal is present, the MSO Read VI executes successfully, and the error cluster status updates accordingly. Conversely, if no trigger signal is detected, the MSO Read VI does not execute, leaving the status undefined. This behavior can be used to control the While Loop with an Elapsed Time function, ensuring the loop stops correctly if a trigger occurs within the specified timeout. However, if the loop does not terminate after receiving the trigger, the program will close abruptly because the elapsed time condition passes a True value to the MSO Close VI in the case structure. Therefore, it is essential to ensure the elapsed time logic stops before the timeout condition becomes True when a trigger signal is received.