NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Writting to Databae: Convert all step results into one string

Solved!
Go to solution

Is it possible to log all step data as one string? The way our database is currently setup we log our numeric data as one long string separated by a comma. From everything I've read so far, I only see how to enter data one cell at a time, and haven't seen anything on how to concatenate all step results into one string.

0 Kudos
Message 1 of 5
(2,041 Views)

What version of TestStand are you using?  In 2013 and later you can use a plugin to abstract your result processing away from your process model.  This gives you the ability to easily code whatever you need.  I've created hundreds of these plugins and in some cases I've had to concatenate all of the results into a large string and then spit that out to a file.

 

The tricky part is deciding what you need in the string and what you don't and making it vary from one test to another (if needed).  You could just do a generic get all measurements from only numeric and multinumeric step types and concatenate.  Or you could look at the measurement flag and recurse through ALL of the data. Or you could create some kind of "mapper/schema" that tells the plugin which data to collect.  The world is your oyster here.

 

If I were to recommend something for you I would need a lot more detail about your specific use case.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(2,018 Views)

I'm using 2017, concatenating all numeric steps is what I'm looking for. The UUT_Results schema works fine of the generic things, (date/time, serial number, station, etc) but I just want one string to hold all the measurement data.

0 Kudos
Message 3 of 5
(2,005 Views)
Solution
Accepted by topic author Phil-G

You will most likely need to write your own plugin to recurse the result list, find all measurement data, concatenate it and then put it into your database. 

 

The only other thing I can think of is to have your schema use a sql statement that appends the data to an existing field.  However, in this case you would have to know what that field is.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(1,990 Views)

I think iterating through the result list, is the easier route, I'll give that a try, thanks

0 Kudos
Message 5 of 5
(1,977 Views)