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.
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.
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.
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.
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.
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
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.START_DATE_TIME (Needs to be formatted for SQL "smalldatetime")
Attached is an image showing values that I already found, but need help finding the rest please.
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.
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?
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.
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?