Debugging Threads in NI VeriStand

Updated Aug 23, 2018

Issue Details

How do I perform thread level debugging in NI VeriStand?

Solution

NI VeriStand 2010 and later provides built-in support for thread-level debugging through the NI Real-Time Execution Trace Toolkit.

Complete the following steps to create a trace for the Real Time Execution Trace Toolkit:
  1. In the Workspace, add a Numeric or Boolean control and link it to System Definition»Targets»Controller»System Channels»Trace Enabled Flag.
  2. Open the Real-Time Execution Trace Toolkit.
  3. Run the NI VeriStand project.
  4. Start a trace by increasing the value of the Trace Enabled Flag to be above zero. If using a Boolean control, set the value to True.
  5. Stop the trace by setting Trace Enabled Flag to zero. If using a Boolean, set the value to False.
  6. When the model stops the results of the trace are recorded and can be viewed in the Real-Time Execution Trace Toolkit.
  •  If an instance of the Real-Time Execution Trace Toolkit is open on the host PC NI VeriStand will automatically transfer the trace results from the real-time controller to the host PC and the trace will appear in the Execution Trace window
  • If an instance of the Real-Time Execution Trace Toolkit isn't detected on the host PC NI VeriStand will store the trace results to the target hard drive at the path "c:/ni-rt/NIVeriStand/ExecutionTraces" and the name of the trace will be printed to the real-time target console. To access the trace results use a file transfer client to transfer the trace results to the host computer. This process is described in this article: How Can I Transfer Files Over FTP To A Remote System?

Additional Information

  • If a VeriStand Custom Device is being debugged the trace must be set to start when the system definition deploys to capture VI execution information correctly. Set the trace to start immediately through the following steps:
    1. Open the system definition file and locate the tag: "Channel Name="Trace Enabled Flag"
    2. Locate the default value tag immediately below the tag:
      <DefaultValue>
        <Elem>0</Elem>
      </DefaultValue>
    3. Change the tag as shown below:
      <DefaultValue>
        <Elem>0</Elem>
      </DefaultValue>
    4. Exit and save the system definition file.
  • In order to view the trace information the NI-Real-Time Execution Trace Toolkit must be installed on the host computer. This is a separate product (see Related Links).
     

 

WAS THIS ARTICLE HELPFUL?

Not Helpful