NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

analyze the value of test items from database

Dear All
       I need to retrieve the values of test items form the default database in TestSatand.
       My custumers use TestStand and I have the original database after they test products.
       I have to retrieve all the value of test items and present a report like

UUT_serial_num   voltage1   current1   voltage2   current2   voltage3   current3
000000000001      1.2            0.02         1.1            0.01         0.5            0.05
000000000002      1.3            0.01         1.2            0.003       0.3            0.01
...................
...................
...................
...................

How to do such a query?
I create a view which select all rows from uut_result ,and use the ID of uut_result to search test_result   ,and use the ID of test_result to search step_numericlimit .
Such a query is too stupid ,because it makes the server too busy and takes a long time to query.
I am not familiar to TestStand and need your help.
How to do such a query?
Please help me!!!
0 Kudos
Message 1 of 4
(3,053 Views)
Hi pizz,

The UUT_RESULT table contains information about each UUT that TestStand tests. The STEP_RESULT table contains information about each step that TestStand executes while testing each UUT. The other table names with the prefix "STEP" contain information about each specific step type. The table names with the prefix "MEAS" contain information about sub results that TestStand logs for a step type.

I'm not clear on what you need help with.  Are you looking for a better query statement that will produce the table you described? The default database table schema TestStand uses has a UUT_RESULT table but there are no 'test_result' or 'step_numericlimit' tables (I assume you meant STEP_RESULT and MEAS_NUMERICLIMIT tables).  Regardless, I still would need to know what data is supposed to be represented in the columns you listed (i.e. voltage1, current1, etc.) in order to help. You may want to talk to your customer about what information they configured TestStand to log.

Have a great day,

Ecleamus Ricks, Jr.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,027 Views)

Thanks Ricks,

After your explanation , I know more about the database of TestStand.
My customers want the data TestStand bringing to analyze the pcba process.
They want to modify the yield rate.
I need the datas each UUT brings.
Each row in my table above is a UUT test , and the Voltage1 , Voltage2.....   are the numeric  of test items.
I put all the numeric test items of a UUT test in a row and my customer can see the report clearly to analyze pcba process.
I need a better query for the database!!!

And you are right.
The table names I typed above are wrong.
As you say, the table names are step_result and meas_numericlimit.
If my question is not clearly, please ask me more.
I really need help!!
Thank you so much!!!

pizz

0 Kudos
Message 3 of 4
(3,011 Views)
I'm not sure this is even a TestStand question you're asking as you don't say that you are using TestStand to run the query. TestStand can log data to a variety of databases (SQL Server, Oracle, MySQL, Access, etc.) and the schema used can be highly customized by the user for their specific needs. The actual query will depend on the schema used. You would need to provide that and also the query you've written and you might find better help on one of the forums dedicated to the database being used. The speed of the query will also depend on several factors like database size and how you've written the SELECT statement. Are you using a JOIN and what are the WHERE clauses? You say you want a faster query but you don't say how long it is taking now. Is it minutes, hours, days? With some of the databases, it's also possible to write a stored procedure (SQL Server term) which is basically a query that is compiled. This can be much faster.
0 Kudos
Message 4 of 4
(3,001 Views)