Displaying Measurement Data as Graphs

TestStand 2017 Help

Edition Date: November 2017

Part Number: 370052W-01

»View Product Info

Download Help (Windows Only)
NI TestStand 2014 Help
NI TestStand 2014 SP1 Help
TestStand 2016 Help
TestStand 2016 SP1 Help
TestStand 2017 Help

TestStand supports displaying one- and two-dimensional measurement array data as a graph in ATML 6.01, ATML 5.0, XML, and HTML reports using the TSGraphControl3.dll ActiveX control, located in the <National Instruments>\Shared\TestStand directory. The graph control supports displaying data as a Y plot or as an XY plot. The graph control supports orientation of the array data by rows or columns.

Notes Notes
  • To view the graphs in reports on computers on which TestStand is not installed, run the stand-alone installer for the TsGraphControl3.dll control on the computer on which you want to view the report. The installer is located in the GraphControl subdirectory of the TestStand installer directory on the TestStand installation media.
  • XML reports might unexpectedly display a table of measurement data instead of a graph under certain conditions.

Graph Control Interface—_GraphControl3

The graph control implements the _GraphControl3 interface to expose the APIs required to plot one- and two-dimensional measurement array data. You can create an instance of the graph control by using the ProgID TSGraphControl3.GraphControl3 or CLSID 1CB7D7EF-7ED3-4D6F-A2AC-F54DCA641862.

[

ComVisible(true),
InterfaceType(ComInterfaceType.InterfaceIsDual),
Guid("3879BEC8-9A6F-4C1B-8929-32950E6DDFCD")

]

public interface _GraphControl3

{

[Description("Plots Y data evenly spaced on the X axis. xFirst parameter specifies the first X co-ordinate and the xInc parameter specifies the spacing of the X co-ordinates.")]
void PlotY(Object YData, Object xFirst, Object xInc);

[Description("Plots 2 dimensional measurement array data honoring the DataLayout, DataOrientation, defaultForPlotPerRow and xInc parameters.")]
void Plot2DArrayData(Object arrayData, string dataLayout, string dataOrientation, Object defaultForPlotPerRow, Object xInc);

}

Graph Control Interface—_GraphControl3_Legacy

The graph control implements the _GraphControl3_Legacy interface to support displaying graphs generated with reports of earlier versions of TestStand in 64-bit versions of Internet Explorer. You can create an instance of the graph control by using the ProgID TSGraphControl2.GraphControl2 or CLSID 39C3B7BF-DCEF-432B-BDB3-711F1711FA4B.

[

ComVisible(true),
InterfaceType(ComInterfaceType.InterfaceIsDual),
Guid("6C280CDE-50F3-4804-945F-0426CB445BD0")

]

public interface _GraphControl3_Legacy

{

[Description("Plots Y data evenly spaced on the X axis. xFirst parameter specifies the first X co-ordinate and the xInc parameter specifies the spacing of the X co-ordinates.")]
void PlotY(Object YData, Object xFirst, Object xInc);

[Description("Plots 2 dimensional measurement array data honoring the DataLayout, DataOrientation, defaultForPlotPerRow and xInc parameters.")]
void Plot2DArrayData(Object arrayData, string dataLayout, string dataOrientation, Object defaultForPlotPerRow, Object xInc);

}

Exposed COM APIs

The graph control exposes the following APIs to plot one- and two-dimensional measurement array data:

  • PlotY—Plots Y data evenly spaced on the X axis.

    HRESULT PlotY(

    [in] VARIANT YData,

    [in] VARIANT xFirst,

    [in] VARIANT xInc);

    • YData—Numeric, one-dimensional array passed as a variant.
    • xFirst—Argument that indicates the X coordinate of the origin.
    • xInc—Argument that indicates the step increment for the X coordinates.
  • Plot2DArrayData—Plots two-dimensional arrays according to the input parameters.

    HRESULT Plot2DArrayData(

    [in] VARIANT arrayData,

    [in] BSTR dataLayout,

    [in] BSTR dataOrientataion,

    [in] VARIANT defaultForPlotPerRow,

    [in] VARIANT xInc);

    • arrayData—Numeric, two-dimensional array passed as a variant.
    • dataLayout/dataOrientation—Refer to the table in section 3.1 for information about these parameters.
    • defaultForPlotPerRow—Boolean passed as a variant that indicates if two-dimensional array data should be processed as in TestStand 4.2.1.
    • xInc—Argument that indicates the step increment for the X coordinates.

You can add PropertyObject attributes to variables you log to specify the layout and orientation of the array data. For example, for parameters, you can add these attributes to local variables you specify in the value expression for each parameter. The graph control uses these PropertyObject attributes to interpret the data and display the appropriate plot or plots.

By default, the graph control adds plots using the row-based orientation of the array data. You can add a PropertyObject attribute with the TestStand.DataOrientation namespace to configure the graph control to interpret the array data by columns.

The type of plot the graph control displays depends on the following factors, as the following table describes:

  • The number of dimensions of the array data being displayed.
  • The value of the array data PropertyObject attribute with the TestStand.DataLayout namespace.
  • The value of the array data PropertyObject attribute with the TestStand.DataOrientation namespace.
Dimension of Array Data DataLayout PropertyObject Attribute Value DataOrientation PropertyObject Attribute Value Plot(s) Displayed in the Report
1D <EmptyString> <NotApplicable> Single Y plot. The X coordinates of the plotted points are the array indexes. The Y coordinates of the plotted points are the array data values.
2D <EmptyString> <NotUsed> Multiple Y plots. A plot is created for each row in the array. The X coordinates of the plotted points are the array indexes. The Y coordinates of the plotted points are the array data values.
2D MultipleY Row Based Multiple Y plots. A plot is created for each row in the array. The X coordinates of the plotted points are the array indexes. The Y coordinates of the plotted points are the array data values.
2D MultipleY Column Based Multiple Y plots. A plot is created for each column in the array. The X coordinates of the plotted points are the array indexes. The Y coordinates of the plotted points are the array data values.
2D SingleX-MultipleY Row Based Multiple XY plots. A plot is created for each row in the array. The X coordinates of the plotted points are the array data values in the first row of the array. The Y coordinates of the plotted points are the array data values of every row in the array except the first row.
2D SingleX-MultipleY Column Based Multiple XY plots. A plot is created for each column in the array. The X coordinates of the plotted points are the array data values in the first column of the array. The Y coordinates of the plotted points are the array data values of every column in the array except the first column.
Note Note  You must use the case-sensitive names for the TestStand.DataLayout and TestStand.DataOrientation namespaces for ATML 6.01, ATML 5.0, XML, and HTML reports to render graphs correctly.

See Also

PropertyObject

PropertyObject Attributes

WAS THIS ARTICLE HELPFUL?

Not Helpful