NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying Multiple Numeric Limits Tests with Labview

I am working on a project where I am being asked to modify multiple numeric limits tests with hundreds of measurements and associated limits.

 

The time it takes to modify these lists in Test Stand is ludicrous.  The property loader cannot change the list of measurements, change their names, etc.

 

So I am writing a LV editor that will be able to load/modify/delete/add measurements manually.

 

I have coded to the point of obtaining the step reference (via the application manager and TS Engine).  However, now I believe I need to use the AsPropertyObject, and I am unable to figure out the proper strings/calls to access the multiple numeric limit test measurement objects:

 

1) Access the list of measurements

2) For each element, modify the name, comp type, low limit, high limit, label

3) Add/remove elements

 

Anyone have any ideas?

 

Current stub of my coding exploration...

 

Jed_Davidow_0-1631041341711.png

 

 

 

0 Kudos
Message 1 of 3
(147 Views)

OK, I have been able to get a little further- I am now able to return a reference to one of the measurement values by calling "GetProperty Object" using Result.Measurement["Measurement Name"].

 

So I think I might be able to access and update limits from there.  HOWEVER, I am only able to do this because I know the names ahead of time.  I would like to deal with the Result.Measurement object, and read/set:

 

1) The existing number of elements and their names

2) Add/Delete elements

 

But although I can return Result.Measurement, I am not sure how to get the number of elements, add/delete or list them.

0 Kudos
Message 2 of 3
(127 Views)

You're on the right path. You can use the index for the Measurement instead of the name. That will likely make your life easier.

 

Here is some code I used to do it for one of my tests. Note that this is done in a subsequence call of the MultiNumeric, that is why you will see RunState.CallingStep to access the property of the MultiNumeric step.

 

//We increment the MultiNumeric Arrays by 1 so we can insert into later
Locals.NextSize= RunState.CallingStep.ExpectedNumMeas + 1,
RunState.CallingStep.ExpectedNumMeas = (Locals.NextSize),
SetNumElements(RunState.CallingStep.Result.Measurement, Locals.NextSize),
SetNumElements(RunState.CallingStep.NumericArray, Locals.NextSize),
Locals.InsertInto = Locals.NextSize - 1

//Add the Specific Multi Number now
RunState.CallingStep.NumericArray[Locals.InsertInto] = 123456789,
RunState.CallingStep.Result.Measurement[Locals.InsertInto].Comp = "LOG",
RunState.CallingStep.Result.Measurement[Locals.InsertInto].AsPropertyObject.Name = "Name for 123456789",
RunState.CallingStep.Result.Measurement[Locals.InsertInto].Data.AsPropertyOBject.NumericFormat = "%.4e"

// Add the next measurement also...

0 Kudos
Message 3 of 3
(108 Views)