NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the limits from the code module

Solved!
Go to solution

Hi,

 

For one test (Numeric limit, TS4.2) I'd like to set the limits for this test from within the module.

 

To do so I passed the Context to the module (LV8.6) doing that I can access the Step.Result.Limits property, however I could not find any Property called Result. I was trying do so using As property object but I couldn't.

 

Any help?

 

K.

0 Kudos
Message 1 of 7
(3,904 Views)

Use Step.Limits not Step.Result.Limits

CTA, CLA, MTFBWY
0 Kudos
Message 2 of 7
(3,902 Views)

How are you accessing the Step.Result.Limits property in LV?

 

First of all for the Numeric Limit step there is no such property as Step.Result.Limits.  It is Step.Limits.High or Step.Limits.Low if you want to change the limits.

 

If you want to find the properties that are accessible then click on the step and click on the Properties tab for that step.  Now click on the Property Browser.  You should see all the properties with respect to Step.

 

So simply pass ThisContext to  your subVI and place down a TestStand - Set PropertyValue.vi.  For the Lookup String use Step.Limits.High and change the polymorphism to Number.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 7
(3,900 Views)
I
CTA, CLA, MTFBWY
0 Kudos
Message 4 of 7
(3,898 Views)
I think jigga needs a negative kudos for the unnecessary detail 😉
CTA, CLA, MTFBWY
0 Kudos
Message 5 of 7
(3,897 Views)

Hi,

 

First of all a bit of explanation. I was thinking of multiple numeric limit test not about numeric limit test. Sorry.

 

However, when I'm ececuting the code below I'm receiving -17306 error:

 

Error -17306 occurred at Unknown variable or property name 'Step'.
Error accessing item 'Step.Result.Measurement[1].Limits.High'. in Untitled 5.vi->Untitled 5.vi.ProxyCaller

This error code is undefined. No one has provided a description for this code, or you might have wired a number that is not an error code to the error code input.

 

Any help?

 

Capture785.PNG

0 Kudos
Message 6 of 7
(3,883 Views)
Solution
Accepted by topic author MimiKLM

Sorry guys,

 

Everything perfect now. I did one typo (Unit instead of Units) and I removed the 'Step' from the properties names of course.

 

Capture969.PNG

0 Kudos
Message 7 of 7
(3,875 Views)