NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Is it possible to log an array to a database?

I've created an array of containers to hold my instrument list. The list has properties including the ID for each instrument (EquipList[].Cal_Info.Calibration_ID). I'm setting up a custom database schema to log the list, but it appears there is no way to loop through the elements in the array. The only solution I can think of is to create a custom step type, then loop through the array (in the sequence file) calling that step type to create step results with the Calibration_ID as a subproperty of the step. I think this would work, but it creates other complications that I would rather avoid. Any ideas?
0 Kudos
Message 1 of 2

Have you had a look at the Database.seq and how this is writing an array of results (which is a container) to the Results Database.

The individual items of the container are written to the database field using the standard step type Data Operation :Set Current Record.

In the Database.seq, one container is passed to a sequencecall using a loop counter as an index to the array of containers. The sequencecall then writes each of the container elements. In your case the data passed via the Parameters of the sequence call would be Locals.EquipList[Locals.Index] and the data written to the database field would be Parameters.EquipList.Cal_Info.Calibration_ID and so on.

Hope this is of help
Ray Farmer
Ray Farmer
0 Kudos
Message 2 of 2