NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

NI TestStand Database Adding String Tests and Boolean Tests to the Database

Hi!  How do I add string data results and boolean data results to the basic database?  I have several String Tests and Boolean Tests and these are not being saved to the Database using the "Generic Recordset" Schema.  What do I need to modify just to get the actual test result to store to the data base if it is a string or a Boolean Test?

 

Thanks,

KH

0 Kudos
Message 1 of 8
(100 Views)

Hello ee-jallen,

 

I looked through that and that adds a new value, but I do not see how to change an existing value from just viewing the Numeric tests' data results to adding in viewing the Boolean tests' Data and the String tests' Data results.

 

Thank you,
KH77

 

0 Kudos
Message 3 of 8
(53 Views)

I'm not understanding what your issue is. Do you have some screenshots and additional information?

 

You can add any data you want to the database, using the steps I showed in the other post.

0 Kudos
Message 4 of 8
(44 Views)

@KH77 wrote:

 What do I need to modify just to get the actual test result to store to the data base if it is a string or a Boolean Test?

 

Thanks,

KH


For a string test, set you final result string in Step.Result.String and a Boolean test in Step.Result.PassFail.

 

Once the data is in the database, then performing this query will get all the columns of the PROP_RESULT table

SELECT
*
FROM
[PROP_RESULT]

0 Kudos
Message 5 of 8
(36 Views)

Hello,

So right now the database records only the numeric values under the DATA column and only ‘Numeric’ under the NAME column for the PROP_RESULT.NAME- see pics.  With the pic showing the Boolean and String Test.  These two tests do not get saved into the Database in the DATA column (PROP_RESULT.DATA).  I believe that there is an option to add the string test data and the Boolean Test data to this overall DATA column.  Thus the data measured for Boolean and String Tests would be captured.  

 

It seems like the default is just to capture numeric data but that the other two would be able to be included in this column.  Is that possible?  And if so how?  Otherwise, how would I add a STRING_DATA column and a BOOLEAN_DATA column and then combine them in the query with all 3 in the DATA column?  I see your reply and that may be what I need to do, but I would need to see the steps to do defined because I do not know how to get there.

Thank you,
KH77

0 Kudos
Message 6 of 8
(31 Views)

Are your String and Boolean tests "Record Result" enabled?

String and Boolean tests don't have Upper and Lower limits, so their respective data is not going into the PROP_NUMERICLIMIT table.

Your query is only getting numeric results.   To see all test results from all steps:

 

Select
[UUT_RESULT].[UUT_SERIAL_NUMBER],
[UUT_RESULT].[PART_NUMBER],
[UUT_RESULT].[ID],
[STEP_RESULT].[ORDER_NUMBER],
[UUT_RESULT].[UUT_STATUS],
[UUT_RESULT].[START_DATE_TIME],
[STEP_RESULT].[STEP_NAME],
[PROP_RESULT].[NAME],
[PROP_RESULT].DATA,
[STEP_RESULT].STATUS As STATUS

From
([UUT_RESULT] Inner Join
[STEP_RESULT] On [STEP_RESULT].[UUT_RESULT] = [UUT_RESULT].ID) Inner Join
[PROP_RESULT] On [PROP_RESULT].[STEP_RESULT] = [STEP_RESULT].ID
order by
[Step_Result].[ORDER_NUMBER],[STEP_RESULT].[STEP_INDEX],[PROP_Result].[ORDER_NUMBER]

 

You likely need to create another Table that includes all the columns you want and then query that table to get the data.

 

0 Kudos
Message 7 of 8
(23 Views)

@KH77

Try this:

 

Select
[UUT_RESULT].[UUT_SERIAL_NUMBER],
[UUT_RESULT].[PART_NUMBER],
[UUT_RESULT].[ID],
[STEP_RESULT].[ORDER_NUMBER],
[UUT_RESULT].[UUT_STATUS],
[UUT_RESULT].[START_DATE_TIME],
[STEP_RESULT].[STEP_NAME],
[PROP_RESULT].[NAME],
[PROP_NUMERICLIMIT].[COMP_OPERATOR],
[PROP_NUMERICLIMIT].[LOW_LIMIT],
[PROP_RESULT].DATA,
[PROP_NUMERICLIMIT].[HIGH_LIMIT],
[PROP_NUMERICLIMIT].UNITS,
[STEP_RESULT].STATUS As STATUS
From
(([UUT_RESULT] Inner Join
[STEP_RESULT] On [STEP_RESULT].[UUT_RESULT] = [UUT_RESULT].ID) Inner Join
[PROP_RESULT] On [PROP_RESULT].[STEP_RESULT] = [STEP_RESULT].ID) Inner Join
[PROP_NUMERICLIMIT] On [PROP_NUMERICLIMIT].[PROP_RESULT] = [PROP_RESULT].ID
order by
[Step_Result].[ORDER_NUMBER],[STEP_RESULT].[STEP_INDEX],[PROP_Result].[ORDER_NUMBER]
Union
Select
[UUT_RESULT].[UUT_SERIAL_NUMBER],
[UUT_RESULT].[PART_NUMBER],
[UUT_RESULT].[ID],
[STEP_RESULT].[ORDER_NUMBER],
[UUT_RESULT].[UUT_STATUS],
[UUT_RESULT].[START_DATE_TIME],
[STEP_RESULT].[STEP_NAME],
[PROP_RESULT].[NAME],
NULL,
NULL,
[PROP_RESULT].DATA,
NULL,
NULL,
[STEP_RESULT].STATUS As STATUS

From
([UUT_RESULT] Inner Join
[STEP_RESULT] On [STEP_RESULT].[UUT_RESULT] = [UUT_RESULT].ID) Inner Join
[PROP_RESULT] On [PROP_RESULT].[STEP_RESULT] = [STEP_RESULT].ID
Where
[PROP_RESULT].[NAME] = 'PassFail' OR [PROP_RESULT].[NAME] = 'Numeric' OR [PROP_RESULT].[NAME] = 'String'
0 Kudos
Message 8 of 8
(20 Views)