From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

DIAdem Script: Programatically Create Graph in Report and Plot to it

Functional Description

This example shows you how to programatically create a 2D Graph in your Report and then plot to from channels in your Data Portal using a script.

DIAdemGraph.jpg

Code Snippet:

'Create the Plot
Call PicLoad("Template")  
Call GraphObjNew("2D-Axis","2DAxis1")
Call GraphObjOpen("2DAxis1")  
  Call  GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
  Call GraphObjOpen("New_Curve")            'Opens the curve object
    D2CChnXName      = "EXAMPLE/Time"
    D2CChnYName      = "EXAMPLE/Speed"
  Call GraphObjClose("New_Curve")          
Call GraphObjClose("2DAxis1") 
Call PicUpdate

Caveats and Additional Notes

Software: DIAdem 11.0

Attachment Includes:

  • TDMS Data File (Load this in the Data Portal)
  • VBScript (Run this from the Script Pane)

Jervin Justin
NI TestStand Product Manager
Comments
MajoCuellar
Member
Member
on

How would you plot in one graph two different channels?

Contributors