02-07-2011 01:52 AM
What is the execution order of "Multiple Numeric Limit Test" in TestStand 2010?
I am using a custom steptype of Multiple Numeric Limit Test. I want to manipulate the input parameter. How can I do that. I am not interested in making a new steptype. I am writing in Post-Expressions and the data is manipulated as they should but it is not evaluated. I is evaluated before the Post-Expressions executes.
For example I am writing: Step.NumericArray[0]= Step.NumericArray[0]*1000/(2.5-Step.NumericArray[0])
The execution order when looking at the TS manual at page 3-13 is Evaluate Post-Expression before Evaluate Status expression. But it is not what I see. I have also tryed using the more simple Numeric Limit Test and it works as I expect it to according the manual.
Anyone knows about any workaround for that?
02-07-2011 02:21 AM
Hi,
Step.NumericArray is the input values to the step, I think you should be looking at the returned result values found in Step.Result.Measurement
eg
Step.Result.Measurement[0]= Step.Result.Measurement[0]*1000/(2.5-Step.Result.Measurement[0])
02-07-2011 03:05 AM
Hi Ray
Thanks for your reply
I have tried writing what you are suggesting: Step.Result.Measurement[0].Data= Step.Result.Measurement[0].Data*1000/(2.5-Step.Result.Measurement[0].Data)
Still it evaluates the step before the post-Expression. When I am looking at the variables at runtime the Step.Result.Measurement[0].Data is having the correct value but it seems to evaluate the step before the Post-Expressions.
Any other suggestions?
02-07-2011 03:37 AM
Hi
For extra info I can get it to work using Numeric Limit Test.
Step.Result.Numeric= Step.Result.Numeric*1000/(2.5-Step.Result.Numeric)
There it evaluates the Post-Expression before Evaluating Status expression.
Hope anyone knows whar I am supposed to do?
02-07-2011 04:42 AM
Hi,
have you set the boolean to treat all the results the same or individual?
(not that it should make any difference)
02-07-2011 07:15 AM
Hi Ray
All the results in the array are treated individually.
02-07-2011 07:34 AM
Hi,
Is it possible to try with the setting 'as the same', if not I will try later.
02-07-2011 08:24 AM
One question: Did it ever work as you wanted to in older TS versions?
I assume not. Here is why:
The multiple numeric limit test does it's evaluation of the measurement array not in the status expression, but it is doing a major part of this as a post step substep module. You can simply check this by viewing the substep modules of the steptype.
Therefore, using post or status expression does not have any influence on the value in the Step.NumericArray.
So the behavior you are descibing is 'works as intended' and i am not aware that there have been any changes in the past to this.
In order to resolve your issue:
a) Create a new steptype with an additional post-step substep which does the scaling (called before the evaluation function!)
b) Include the scaling in your measurement module
c) Alter the evaluation module for the multiple numeric limit step. You can find the sources in the <TestStand 2010>\Components\StepTypes\CommonSubsteps folder. Please note that changes done there will have effect on NI steps as well. So maybe you want to add a new function you link in your custom substep
I think, on a short term, b) is the easiest solution.
hope this helps,
Norbert
02-07-2011 08:36 AM
At the top of table 3-4 in the TestStand Reference Manual you cited:
"Table 3-4 lists the most common actions a step can take, in the order the step performs them."
However, the Multiple Numeric Limit Test step type is not common. The Post-Step substep is actually what evaluates the array. Not the Status Expression. Therefore, Step 15 (Post-Step substep) occurs before Step 16 (Post Expression). I don't think you can do what you want.
I would recommend either moving that equation to the code module OR storing the values returned by the code module to a seperate array, performing the calculations and then have a seperate step using the None adapter (Multiple Numeric Limit) evaluate the array with the new values.
If you can only afford to use 1 step in your MainSequence I recommend calling a sequence of type Multiple Numeric Limit test. You will have to unhide the sequence adapter to get the Multiple Numeric Limit test step for it. Then inside the subsequence call your code module and run the calculations and pass them back as parameters (which can then be set as the evaluated items).
02-07-2011 08:59 AM
The Reference Document (oct 2010) should be ammended to show the correct action the Multiple Numeric Limit Test takes when it get to steps 17 and 18.