NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert Local Data into a Schema

Solved!
Go to solution

Hi Don1,

You can learn about the Additional Results step type by looking at the NI TestStand Reference Manual page 4-25 and the NI TestStand Help. Both are also built into the TestStand installer.  You can also glean good information from searching ni.com for "TestStand Additional Results." I hope this helps.  


Mark E.
National Instruments

0 Kudos
Message 11 of 20
(2,733 Views)

Hi Guys,

Thanks for all the info, it has been a great help.

I am now using additional results and my data is coming out in the PROP_RESULT table.

What I am now wondering is, what is the best way to get my data from the PROP_RESULT table into a new table of my own for each UUT?

Can you give me some guidelines on how I would modify the schema to do this?

Thanks & Regards,

Don1.

0 Kudos
Message 12 of 20
(2,719 Views)

Don1 -

I do not understand what you want to do. A UUT table typcially should have a single row for each UUT SN. What does this table for each UUT look like?

Scott Richardson
https://testeract.com
0 Kudos
Message 13 of 20
(2,704 Views)

Hi Scott,

I have ~10 local variable that I have added to the database using additional results as suggested.

Each variable contains specific Device data, example Device APN address, Device Boot Time, Device Alternate ID

I would like grab these 10 variable and put them in one table.

So the table would have an ID column & 10 other columns, one for each variable..

ID, Device APN address, Device Boot Time, Device Alternate ID,........

 

If possible I would like to be able to add this data to this table through the Schema,Is this possible?

 

Thanks & Regards,

Don1.

 

0 Kudos
Message 14 of 20
(2,699 Views)

Don1 -

So you will have a set of this data per UUT. Questions:

1) Are you requiring this data to be in the UUT table or a second new table that has a foreign key to the UUT table?

2) Are all these variables available at a single instance in a sequence where they could be logged at once?

3) Will you ever be expanding the variables that you log, and if yes, will these be available at once with the other information you are already logging?

Message Edited by Scott Richardson on 03-28-2009 01:29 PM
Scott Richardson
https://testeract.com
0 Kudos
Message 15 of 20
(2,690 Views)

Hi Scott,

Answers below:

 

So you will have a set of this data per UUT. Questions:

1) Are you requiring this data to be in the UUT table or a second new table that has a foreign key to the UUT table?

  • I would like to have a 2nd table that has a foreign key to the UUT table

2) Are all these variables available at a single instance in a sequence where they could be logged at once?

  • The variables are assigned during various steps in the test sequence, all variable will be available before cleanup in the main sequence

3) Will you ever be expanding the variables that you log, and if yes, will these be available at once with the other information you are already logging?

  • The variable set is likely to expand in the future; again these variables will all be available before cleanup in the main sequence.

 

Thanks & Regards,

Don1.

0 Kudos
Message 16 of 20
(2,685 Views)
Solution
Accepted by ShaneDonn

Don1 -
It seems to me that you could create a named data type "UUTVariables" that is a container that contains all the required data that you want to log. You would likely create an instance of this data type as a local variable in the sequence that you want to collect the data in, so that by the end of the sequence you will have what you need  to be logged once. Use a step at the end of the sequence or in Cleanup to get the local variable and all its values into its step result. There are two options now that you could follow:

  1. Add an Action step, and use the Additional Results feature to add the Locals.UUTVariable to the result for the step. 
  2. Add an Expression step, and set its expression to be something like: RunState.step.LastStepResult.SetPropertyObject("UUTVariable", 1, Locals.UUTVariables.Clone("", 0)), which will copy and add the local variable to the step result. Note: Using this option prevents it from being excluded if the user unchecks the "Include Additional Results" option on the Logging Options tab of the Database Options dialog box.

In the database schema, you can add a new PROP_UUTVARIABLES statement (similar to PROP_MULTINUMERICLIMIT2) that logs before PROP_RESULT, is configure to log data to a new table, and the statement has a foreign key to the UUT_RESULT, instead of STEP_RESULT. Set the Types to Log setting to the data type you are using. You will have to configure other settings appropriately.
 
Hope this helps

 

Scott Richardson
https://testeract.com
Message 17 of 20
(2,677 Views)

Hi Scott,

Thanks for the detailed reply, this worked great for me.

 

Mark E thanks for all your help in this one aswell

 

 

Regards,

Don1

0 Kudos
Message 18 of 20
(2,665 Views)

Hello

 

I am also in a similar situation to log additional result in DB from a custom step type, i have added a new string type variable [TEST_NUMBER] to result container of my custom step. After that i have tried to use [TEST_NUMBER]to be logged into DB by Logging.StepResult.TEST_NUMBER but on runtime i am getting an error as

 

An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging'
An error occurred while setting a column value.
Schema: Copy of Generic Recordset
Statement: STEP_RESULT.
Column: TEST_NUMBER
Unknown variable or property name 'Logging.StepResult.TEST_NUMBER'.

Source: TSDBLog

 

Location: Step 'Log Results to Database' of sequence 'Log To Database' in 'Database.seq'

 

I am not able to trace where i am going wrong please help me.

 

Regards

Nitin Goel

0 Kudos
Message 19 of 20
(2,494 Views)

Use http://forums.ni.com/ni/board/message?board.id=330&thread.id=24986 for answering goel question.

 

Regards

Ray farmer

Regards
Ray Farmer
0 Kudos
Message 20 of 20
(2,490 Views)