Discussion:
How to add a 2D result array to the result database?
(too old to reply)
Stephan K.
2006-02-14 14:45:30 UTC
Permalink
I am using Teststand 3.5 and I am about to create a Labview VI that will measure the gain response of a receiver. This VI will output it as an 2D-Array and I would like to save it to my access result database, to be able to use that data for displaying a graph in my excel report.I am new to teststand and I already know how to add a 2D-array to a report but don't really know how to add this information to the database. I read the provided manuals and searched the forums but didn't find anything that was really helpful. AFAIK I can add numerics and strings to the database just by adding a string value or numeric limit test but when it comes to arrays (especially 2D), I have no idea how to do that. I only know (or guess) that I have to add a new  table to my database, edit the schema and the Database.seq.I appreciate any help!
Stephan
Santiago D
2006-02-16 14:41:09 UTC
Permalink
Stephan,
 
Sometimes forum posts make you research a particular functionality of TestStand and lead you to discover how powerfull TestStand can be.  This is one of these cases.  I thought that in order to save 2D arrays in TestStand we would have to customize many different aspects of the application only to learn that the functionality is fully implemented already!
 
First, you will have to create a new step type that contains a 2D array in the Step.Result properties.
 
Second, in order to save a 2D array into a database, use the Binary Column Type in your table.  To do this, create a new table with the following properties:
 
Type: Recordset
Command text: "SELECT * from [Table Name]"
Apply to: Step Result
Types to Log: [Step type with which you are acquiring your 2D array]
Lock Type: Optimistic
 
The rest of the properties can be left with their default values.  Once you have your table, add an ID column as your primary key, and a second column that will contain the 2D array.  This column should have the following properties:
 
Type: Binary
Size: 1.5 times the size of your array in bytes
Expected Properties: Logging.StepResult.[Property Containing the Array]
Expression: Logging.StepResult.[Property Containing the Array]
 
The rest of the properties can be left with their default values.  In order to see the values stored in the database, open the Database Viewer to the particular table and right click on the field which will show a value of "Binary Data".  Right click on the value and select Evaluate Data.  The View Binary Data window will let you see all the values stored in the array.
 
 
Regards,
 
Santiago D

Loading...