05-13-2009 07:24 AM
Couple questions:
I'm using a LV Prototype adapter to measure resistance ( PXI4071) in Teststand. I then store this value in a local variable (locals.R2). I all ready have a local variable created w locals.R1 stored in it which is my baseline. My reqiuement is to verify locals.r2-locals.r1 < 5 ohms. If not fail the test. I'm doing all this in 3 steps. Seems to me I can do it all in at least 2.
Current:
1) Measure the DMM ( Labview)
2) statement step f(x): locals.result=locals.r2-locals.r1
3) none adapter using a Numeric Limit test: check locals.result<5 which gives me the pass/fail criteria.
Any way to combine steps 2 and 3?? Couldn't find anything on the web or in the old manuals. I guess "Step.result.passfail" no longer exsists?
Also, when I use abs(locals.result)=locals.r2-locals.r1 and watch locals.result after the step is exec I get zero. If I take out the abs it does the subtraction, ie I get a value. Why?? What is wrong w that statement/formula???
Thanks,
Clint
05-13-2009 08:30 AM
Clint,
You can add the step 2 (f(x)) step to the Pre-Expression of step 3 to do it in 2 steps.
If you want to do it all in one step, then change the measure step (1) to a Numeric Limit step type with the settings from step 3 and add the statement in step 2 to the Post-Expression of that step.
Why your watch window doesn't work I don't know. It works OK on my system when I pasted in what you wrote.
-Jack
05-14-2009 08:21 AM
Clint,
When you use abs(locals.result)=locals.r2-locals.r1 you are setting the value of the absolute value of locals.result to be equal to r2 - r1, and not the actual value itself. If you used the expression (Locals.result + 2) = 5 you would also recieve a value of 0 for Locals.result because you are not assigning a value directly to Locals.result. Even if TestStand were to evaluate the algebraic expression for you, then in abs(locals.result)=locals.r2-locals.r1 the value of locals.result would evaluate to be equal to plus or minus (r2 - r1); see: Solving Absolute Value Equations .If you want to store the absolute value of r2-r1 in locals.result then the expression would need to be written as locals.result=abs(locals.r2-locals.r1) .
05-14-2009 09:01 AM
Thanks Richard. After my 1st post "Dawn broke over Marblehead" and I had already tried the abs around the r1-r2. Now you've provided an explanation as to why it worked.
Clint