NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Add limits to step settings via TestStand API from LabVIEW

Solved!
Go to solution

Dear LabVIEW and TestStand Community!

 

I'm trying to add FileGlobal Variables as limits to TestStand step NumericLimit programmatically, via LabVIEW, via TS API. I attach screenshot of the code, which I use (part of it - the module, which only sets values to low and high limit of the step), and also I attach, what I manage to get.

In TS, when I open sequence file, after running of the code, I can see in the description line of the test, that it accepted limits, which I set from LV - you can see it from the screenshot, it is marked with yellow. But in the Tab "Limits", there are still default numeric values, not FileGlobal Variables.

 

Could anyone explain, what doest it mean, and how to set up them correctly?

 

Thanks a lot in advance!

Download All
0 Kudos
Message 1 of 10
(5,810 Views)

Are you implementing a substep module? If hope so....

 

You have to set the appropriate "UsexxxExpr" boolean to true also.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 10
(5,797 Views)

Dear Norbert_B, thank you for your reply, but I didn't get it fully. First, I create sequences in sequence file. Then, I create fileglobal variables. Then - steps, and load code modules to steps. And after that I try to setup fileglobals vars for limits of proper steps.

Could you, please, explain, what is "UsexxxExpr"? How can I setup it? I had a look and property node, and invoke nodes for steps, but I didn't find it...

0 Kudos
Message 3 of 10
(5,795 Views)

I refer to step variables of the NumericLimit steptype as you obviously create instances from it. Just like you already modify the limits themselves....

 

So this is no edit substep, i see..... a Sequence File Translator?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 10
(5,793 Views)

It's kind of sequence generator what I'm doing now...

Thank you very much for fast reply, but when I setup "UsexxxExpr" to true, it doesn't change the situation... Could you, please, check my attachment? Maybe, some mistake in syntax?

0 Kudos
Message 5 of 10
(5,790 Views)
Solution
Accepted by kosist90
I think the lookup string for setting the Boolean value to true is incorrect. Try using "Limits.UseLowExpr" and "Limits. UseHighExpr".

- Shashidhar
Message 6 of 10
(5,771 Views)

Cool, it works! Thanks a lot!!!

0 Kudos
Message 7 of 10
(5,751 Views)

OK, next time i set the xxx into <xxx> to be more understandable.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 10
(5,740 Views)

Actually, it was not clear, because "Limits" at the beginning of the expression was missed... B/c "UsexxxExpr" and "Limits.UsexxxExpr" - looks different, and it doesn't matter, whether there is xxx or <xxx>.

But anyway, thanks a lot for your advises!

0 Kudos
Message 9 of 10
(5,735 Views)

I use C# , It works, it seems that you parameters are not correct.    It should be "Limits.Low", not "Limits.Expr",                            

    this.axSequenceFileViewMgr.SequenceFile.GetSequence(y).GetStep(z, StepGroups.StepGroup_Main).AsPropertyObject().SetValNumber("Limits.Low", 1,13);
                                this.axSequenceFileViewMgr.SequenceFile.GetSequence(y).GetStep(z, StepGroups.StepGroup_Main).AsPropertyObject().SetValNumber("Limits.High", 1, 15);

 

0 Kudos
Message 10 of 10
(1,765 Views)