How to Trace the Specific Location of Applications with Real-Time Trace Viewer

Updated Oct 16, 2019

Reported In


  • LabVIEW Real-Time Module

Issue Details

I am trying to trace my application with Real-Time Trace Viewer. However, I found that the trace session has limited time as 1000 ms so that I couldn't trace what I wanted to check in my application. How can I trace the specific location of my application?


You can make trace sessions not only for the whole application and also for a specific location in the application. 
There are several methods to implement for tracing a specific location. Consider the following items to resolve the problem:

Capturing a single subVI

If you only want to track specific subVI,  you can start and stop the trace session around a subVI. The trace session begins before the subVI executes and ends immediately after.  

Capturing a defined event

Using the Case structure, you can start tracing the defined event. Start logging at the beginning of an application and then stop logging when a Case structure receives a TRUE value. For example, the Trace Tool Stop Trace and Send VI executes when the Case structure receives a TRUE value. The TraceTool Start Trace VI might overwrite old event data in the memory buffer several times during execution, but the trace session always retains the most recent event data.  

Capturing a specific time span

If you want to log a specific time slice of an application, you can implement it by using Sequence structure and Wait function. At first sequence, add the Wait (ms) function with the appropriate time value to the VI. Then, start the trace session with TraceTool Start Trace VI. After starting tracing, add another Wait (ms) function with the appropriate time and then stop the trace session. Please refer to the following example.