Plotting Multiplot Graphs in TestStand Report

Updated Oct 18, 2024

Environment

Software

  • LabVIEW
  • TestStand

This article demonstrates how to plot curves on a graph inside a TestStand Report. The steps below require that a 2D array is generated from a code module, containing the data to be plotted.

Follow the steps below to plot multiple curves graph in TestStand.
Note: Only ATML 6.01, ATML5.0, XML and HTML reports can include graphs. Check the report type on Configure >> Result Processing and ensure that Include Arrays is set to Insert Graph.

  1. Generate a 2D array of doubles (DBL) from a code module and pass it into TestStand. This array contains the data to be plotted.
  • Any code module can be used. If using LabVIEW, refer to Plot XY Data from a 2D Array in LabVIEW.
  • When using 2D arrays, data can be defined for both the X and Y axes. If a 1D array is used, the X axis will always plot the array index.
  1. Create a Local Variable to store the 2D array in TestStand.
    1. Right click on Locals from the Variables pane.
    2. Select Insert Local >> Array of >> Number. Save the variable as OutputData.
    3. At the Array Bounds window, check on Empty box.

 

  1. Add an Action Step to call your code module. Set the output variable to Locals.OutputData.
  2. Add a DataLayout attribute to OutputData variable. The DataLayout attribute is used to set the type of graph that will be shown in the TestStand Report. 
    1. Right-click on OutputData >> Advanced >> Edit Attributes.
    2. Right click on <Right click to insert Attributes>, select Insert >> Container and name it TestStand
    3. 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.
​​​​​

 

  1. Optional: If plotting a 2D array, add a DataOrientation attribute to the OutputData variable.
    1. Right-click on OutputData >> Advanced >> Edit Attributes.
    2. Expand TestStand attribute. Right click on <Right click to insert Attributes> under the TestStand attribute, select Insert >> String attribute and name it DataOrientation.
    3. Set the DataOrientation attribute to Row Based or Column Based, depending on requirements. Refer to the table in Displaying Measurement Data as Graphs for more information.
  2. Add a Statement Step after the Action Step. ​​​A statement similar to the following should be inserted (modify it to match the values assigned in the variable attributes):
Locals.OutputData.Attributes.TestStand.DataLayout = "SingleX-MultipleY",
Locals.OutputData.Attributes.TestStand.DataOrientation = "Column Based"

 


 

  1. 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.