NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract the teststand sequence report in the Simple UI?

Hello Community,

 

32-bit Teststand 2014

32-bit Labview 2015

 

I am using the Labview version of Teststand Simple UI.

 

I am trying to figure out how to breakdown the report from teststand in labview in order to store information into a sql database.

Information that I am trying to get for my database from the UUT is the Serial Number, Date, Time, UUT Result, List of Failed steps with measurement.

 

I tried doing a simple Schema, but I wasn't sure if that was the best way to go about it.

When I run a sequence file that I don't want to log to my database, I get an error because the database in teststand is still enabled.

I don't know how to enable it only for select sequence files.

 

What is the best way to go about recording data from a sequence file, whether it be through my Simple UI or TestStand?

If through the Simple UI in Labview, how does one extract the data from the report?

 

Any help would be greatly appreciated.

 

Thank you 

0 Kudos
Message 1 of 12
(4,391 Views)

In general, I would recommend not doing anything like this in your User Interface.  I try to keep my UIs as simple as possible and place all of the complexity in my TestStand files.

 

First, one can get the report file by using the "GetReportFilePath" callback.  You can put the path in a FileGlobal that you could read in the PostUUT callback.

 

I think you should try putting your database steps in the PostUUT callback.   You should be able to access the UUT result and serial number in the PostUUT Parameters.  

 

Pulido Technologies LLC

0 Kudos
Message 2 of 12
(4,375 Views)

For the database steps, do I want to put them all in the PostUUT callback?

I am trying to figure out what is the best arrangement and when to use the database steps.

0 Kudos
Message 3 of 12
(4,302 Views)

In general, I would recommend putting database and reporting steps in PostUUT.  This way, no matter what happens (pass, fail, terminate, error) the result and any collected data can be saved into your database.  

 

Pulido Technologies LLC

0 Kudos
Message 4 of 12
(4,297 Views)

I am having trouble with the Open SQL Statement and Data Operations steps.

 

My practice example has a numeric test in the MainSequence that is set to fail with limits 0 <= x <= 2, x = 3.

My example works using a simple schema that i created, but I can't seem to get it to work with the database steps.

 

PostUUT has the following steps.

  • Open Database: I built my connection string and set the database handle (number) to 100000.
  • Open SQL Database: Database handle (number) is 100000. Statement handle (number) is 100001.
    SQL Statement "SELECT UUT_RESULT.*, STEP_RESULT.*, PROP_NUMERICLIMIT.*, ADDITIONAL_DATA.* 
    FROM UUT_RESULT, STEP_RESULT, PROP_NUMERICLIMIT, ADDITIONAL_DATA"
  • Data Operations: Statement handle (number) is 100001. Operation, Put - Write Record to Database.
    Record to Operate On, New - Create New Record.
  • Close SQL Statement: Statement handle (number) is 100001.
  • Close Database: Database handle (number) is 100000.

Attached Items.

Simple Schema that works with my database when result processing is enabled. I currently have it disabled in order to get the database steps to work.

PostUUT showing where I placed my database steps

Open SQL Statement Step Error

 

 

Download All
0 Kudos
Message 5 of 12
(4,255 Views)

I was able to fix my error and get my database steps to connect.

I successfully wrote data to my database too.

I am left with one issue and that is getting the values for my columns in the Data Operation step.

 

Where can I find the value expressions for the following columns from my tables? I used these on my Schema.

UUT_RESULT.UUT_STATUS

UUT_RESULT.START_DATE_TIME (Needs to be formatted for SQL "smalldatetime")

 

STEP_RESULT.STEP_NAME

STEP_RESULT.STEP_STATUS

 

PROP_NUMERICLIMIT.STEP_TYPE

PROP_NUMERICLIMIT.MEASUREMENT

PROP_NUMERICLIMIT.LOW_LIMIT

PROP_NUMERICLIMIT.HIGH_LIMIT

PROP_NUMERICLIMIT.UNITS

 

Attached is an image showing values that I already found, but need help finding the rest please.

0 Kudos
Message 6 of 12
(4,238 Views)

Personally, I've never done this, but I"m starting to think that maybe your steps should be in the LogToDatabase callback.  You can access Parameters.MainSequenceResults and extract your individual step results from there.  

 

Pulido Technologies LLC

0 Kudos
Message 7 of 12
(4,224 Views)

I moved my database steps over to the LogToDatabase callback, but now it is not writing to my database.

Do I need to call PostUUT in my LogToDatabase callback or something I am missing?

0 Kudos
Message 8 of 12
(4,218 Views)

Calling PostUUT from that callback is not a good idea.  

 

Are you able to access all of the results in that callback?

 

This probably isn't an ideal solution, but it might be possible to copy the MainSequenceResults from that callback (or in TestReport) into a FileGlobal.  Then, in PostUUT, access that FileGlobal and put it into the database from there. 

 

Pulido Technologies LLC

0 Kudos
Message 9 of 12
(4,214 Views)

I don't know if I am able to access all of the results, because I was unable to test them.

Seems like I don't have many options to work with.

 

So if I wanted to retrieve the data that is shown in the report for Step, Status, Measurement, Units, Low Limit, High Limit, and Comparison Type.

What would my value expression be now that MainSequenceResults is a FileGlobal? 

0 Kudos
Message 10 of 12
(4,203 Views)