Benchmarking and Debugging Custom Devices

NI VeriStand 2018 Help

Edition Date: May 2018

Part Number: 372846M-01

»View Product Info
Download Help (Windows Only)

A custom device is simply distributed LabVIEW code that can run in an NI VeriStand system definition file. You can benchmark and debug your custom device code just as you do any other code.

Note  National Instruments recommends you perform benchmarking on a system that is similar to the target. Other components of the NI VeriStand system, such as models, calculated channels, alarms, procedures, and so on, also effect the ultimate execution speed of the system.

The following table describes various tools you can use to benchmark and debug NI VeriStand custom devices.

Tool Purpose Granularity Details Location
LabVIEW Debugging Tools Debugging N/A
  • You can merge debugged VIs into the Custom Device Framework manually.
  • Not useful for benchmarking. Timing can differ between standalone VIs and VIs in the Custom Device Framework.
  • Not available after integration with NI VeriStand.
LabVIEW. Refer to the Debugging Techniques topic in the LabVIEW Help for more information.
Console Viewer Benchmarking (CPU)
  • NI VeriStand workspace tool.
  • Displays system definition details, CPU usage, and debugging messages.
  • Available only on RT targets.
  • Takes periodic snapshots. CPU spikes and transients might not appear.
  • Must install to the target using Measurement and Automation Explorer (MAX).
  • Prints messages sent by the NI VeriStand - Print Debug String VI.
NI VeriStand
Custom Error Codes Debugging N/A
  • You can define custom error codes in LabVIEW and distribute the codes to NI VeriStand with a custom device.
  • Must copy custom errors.txt file to NI VeriStand <Common Data>\project\errors\English directory.
  • Must add errors.txt as dependency in custom device and Custom Device XML file.
  • For RT targets, deploy errors.txt file to error directory on target to display error descriptions in Console Viewer.
LabVIEW and NI VeriStand. Refer to the Defining Custom Error Codes to Distribute throughout Your Application topic in the LabVIEW Help for more information.
NI VeriStand - Print Debug String VI Debugging NA
  • Prints messages to the RT console and NI VeriStand data log.
  • Works on Windows and RT targets.
NI Distributed System Manager Benchmarking (CPU and RAM) Medium
  • Must install System State Publisher on the RT target.
  • Takes periodic snapshots. CPU spikes and transients might not appear.
Installs with multiple NI products, including LabVIEW, LabWindows™/CVI™, and Measurement Studio. Also available for download from the National Instruments website.
System Channels Benchmarking
  • Useful channels include:
    • HP Count
    • HP Loop Duration
    • LP Count
    • Model Count
  • Can use with alarms or procedures.
NI VeriStand
NI VeriStand System Monitor Benchmarking (CPU and RAM) High
  • Asynchronous custom device that tracks memory resources and CPU usage on an RT target.
  • High device loop rate can add overhead to system.
  • Returns an error on non-RT targets.
Download from NI VeriStand Add-ons page of National Instruments website.
NI Real-Time Execution Trace Toolkit Benchmarking
Very High
  • Creates execution trace logs for low-level debugging.
  • Provides very detailed information on thread and VI timing.
  • Natively supported by NI VeriStand. Refer to the KnowledgeBase on for more information.
  • Interacts with the following NI VeriStand system channels:
    • Detailed Tracing Flag
    • Thread Tracing Flag
    • Trace Buffer Size
    • Trace Enabled Flag
    • VI Tracing Flag
Available for purchase from National Instruments website.


Not Helpful