Example Code

Retrieve Citadel Database Trace with NI Hypertrend and DSC functions in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates two ways to retrieve a trace from a Citadel database.

 

Description

This example uses two methods to retrieve the last trace written to your Citadel Database, or the database of your choice.

The first is by using NI Hypertrend to graph the data being sent in to the database, or the last logged trace. This graph does not need a while loop to run continuously.

The second method retrieves the trace information for the desired time you specify. The Start and Stop Time for the trace can be specified by the user on the Front Panel.

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • LabVIEW Datalogging and Supervisory Control (DSC) Module 2012 (or compatible)
  • If running in a Real-Time context, you will need the LabVIEW Real-Time Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached file
  2. Open the VI and follow the instructions on the Front Panel

 

Additional Information or References

Retrieve Trace Data from a Citadel database - Front Panel.png

 

Retrieve Trace Data from a Citadel database - Block Diagram.png
LabVIEW DSC module is needed to use this VI. As well, if you undeploy the shared variable that was logging the data or turn off the computer for a period of time, then no trace data will be found. This is due to the database having a NaN written into the trace at the current timestamp. So looking back one second in time will not prove useful

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
National Instruments
Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.