Import VeriStand Data and Generate Graph in TestStand Report

Updated Oct 25, 2024

Environment

Software

  • VeriStand
  • TestStand
  • ASAM XIL TestStand Steps

Other

  • ASAM XIL Steps for NI TestStand

I want to call VeriStand data in TestStand and generate 2D graph in TestStand report. Is it possible to achieved this without using other software like LabVIEW?

Yes, it’s possible. The workflow is use ASAM XIL Steps for NI TestStand to transfer the data from VeriStand to TestStand and be stored as local variables. These data will be used to build 2D array in TestStand to generate waveform.

Part 1: Transfer Data from VeriStand to TestStand

This part is inspired from ASAM XIL shipping example Framework Creation.seq that can be found under C:\Users\Public\Documents\National Instruments\TestStand XXXX(Version and bitness) \Examples\ASAM XIL .
  1. Download the software add-on ASAM XIL TestStand Steps.
    • After download the add-on, the steps can be used in TestStand.
    • 1.jpg
  2. Select NI VeriStand >> Select VeriStand Project For ASAM XIL to select the VeriStand project.
    • 2.jpg
  3. Select Framework >> Framework Create to create a new instance of the ASAM XIL framework.
    • 3.jpg
  4. Select Framework >> Get Variable Values to get VeriStand variable value.
    • This tutorial chooses “Iteration” as Y-axis data and “System Time” as X-axis data.
    • 4.jpg
  5. Repeat calling Get Variable Values steps to collect enough data from VeriStand for building array.
    • Create local variables below in TestStand: 
      • Numeric – Loop
      • 1D Numeric Array – Time 
      • 1D Numeric Array – Data
      • All 1D array can’t be set as <Empty>, upper bound should be set before running the test sequence.
      • 5.jpg
  6. Use For loop to repeat running Get Variable Values step.
    • [Optional] Add Wait function to ensure the data collected is not the same value as the previous one.
    • In this tutorial, local variable “Loop” is used as loop variable and number of loops is set as 10.
      • 6.jpg
    • Store the data into 1D Numeric Array “Time” and “Data”.
      • 5.5.jpg
  7. Select Framework >> Clean Up to destroy a Framework object.
    • 7.jpg
  8. Verify the VeriStand data successfully pass to TestStand by using breakpoint before running the test sequence.
Part 2: Build 2D array and generate waveform.

This part is inspired from knowledgebase article Plotting Multiplot Graphs in TestStand Report.
  1. Create 2D numeric array “Output Data”.
    • Array Bound can be set as “Empty”.
  2. Right-click on OutputData >> Advanced >> Edit Attributes.
  3. Right click on <Right click to insert Attributes>, select Insert >> Container and name it “TestStand”. 
  4. Expand “TestStand” attribute. Right click on <Right click to insert Attributes> under the "TestStand" attribute, select Insert >> String attribute and name it “DataLayout”. Set the value to “SingleX-MultipleY”.
  5. Select Insert >> String attribute and name it “DataOrientation”.
  6. Set the “DataOrientation” attribute to “Row Based” or “Column Based”, depending on requirements. Refer to the table in Displaying Measurement Data as Graphs .
  7. Add a Statement Step by using expression below:
    • Locals.OutputData.Attributes.TestStand.DataLayout = "SingleX-MultipleY",Locals.OutputData.Attributes.TestStand.DataOrientation = "Column Based"
  8. Log 1D Numeric Array “Time” and “Data” into “Output Data” by using the expression below:
    • Locals.OutputData[RunState.LoopIndex][0]=Locals.Time[RunState.LoopIndex], Locals.OutputData[RunState.LoopIndex][1]=Locals.Data[RunState.LoopIndex]
  9. Navigate to the Properties of the Statement and select Additional Results. Check the Output Parameter and set the Value to Log as "Locals.OutputData". 
    • Make sure Include in Report is checked.
    • 8.jpg
  10. Final coding
    • 9.jpg
  11. Select Configure >> Result Processing >> Report Options, make sure the “Insert Graph” is selected under the “Include Step Results”.
    • 10.jpg
 
 

Press “Single Pass” or “Test UUTs” to generate TestStand report.

11.jpg
 

The demonstration video, VeriStand and TestStand files has been uploaded as attachement.