NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Change scaling for a graph included in an HTML report

I have an array included as a graph in a TestStand HTML report. It is a one dimesion array of 1000 elements. The array is filled by a custom 'C' code step (voltage reading from a Scope), based on the NI Example "DisplayArrayInReport". Is it possable to add or change the displayed X axis scaling in the report, from zero to 1000 (number of array elements) to, in my case, say zero to 10 and include a label of "Time mS".

I am using TestStand Version 2.0.1
0 Kudos
Message 1 of 4
(3,461 Views)
I think it can be done!

But you'll probably have to do it manually unless you feel like being CVI savvy enough to get into the source code for how TestStand builds HTML Reports (If you are, let me know and I can help you find where the function you need is)

The report generator takes your array and passes it off to a DLL in charge of rendering it into a string that can be written to an html file. If you ever view the 'source' of your html report you'll see inside it is embedded a function call to:

TSGRAPH1.PlotY()

or something similar. I don't think this has changed from version 2.x to version 3.x. As far as I know there's no way to change the axis labels, but the function does have 3 fairly straightforward parameters, the array to plot, the Xo (origin) and
the DeltaX. If you were to change the DeltaX from "1" to .01, and save the file, the next time you display it in your web browser the graph will look different.

I doubt this is documented much of anywhere, so with luck a NI guy might see this and offer any other tips.
Editing the CVI function call and rebuilding the DLL that generates this line of html would allow you to have those 'improved' parameters as part of your test sequence, but it might not be worth the bother.

Cheers!

Elaine R.
www.bloomy.com
Cheers,
Elaine R.
www.bloomy.com
0 Kudos
Message 2 of 4
(3,460 Views)
Yes I would be very much interested in the CVI source code. I manually changed the TSGRAPH parameters and could get the required scaling. All I need now is to have this done within TestStand

Thank you

Howardgw
0 Kudos
Message 3 of 4
(3,460 Views)
The function is "GetFlaggedValuesForReport_Html" in modelsupport2.dll

All the code you need for this DLL should be in:

/Components/NI/Models/TestStandModels/

including the project file and the c_report.c which has the function call. If your DLL is at all similar to mine, you can just search this file for that graph function, or try digging down around line 2330.

To recompile this DLL you're going to need to get your hands on the CVI easytab.fp and toolbox.fp. Both of these should come with a full version of CVI I think, but if you don't have them you may want to contact NI.

Good luck!

Elaine R.
www.bloomy.com
Cheers,
Elaine R.
www.bloomy.com
0 Kudos
Message 4 of 4
(3,460 Views)