NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

changing limits programmatically

I have created a UI using LabVIEW that allows a user to construct and save a sequence.  Everything seems to be working fine, except I can't seem to figure out how to change the limits, or expressions on a numeric limit test.  Can anyone tell me how to do this?  I would rather not have to use a property loader if I can help it.

Thanks,
Benjamin
0 Kudos
Message 1 of 3
(3,432 Views)
Hi,
 
Get a reference to the PropertyObject of the step using the the Step as the reference to the API Step.AsPropertyObject. Using the PropertyObject reference, use the PropertyObject SetValNumber method with the lookup strings for the Limits as "Limits.Low" and "Limits.High".
For the expressions using the Lookup strings, "TS.PreExpr" for the Pre-expression and "TS.PostExpr" for the Post Expression. These values are strings so use SetValString.
 
You may not want to use the Property Loader, but its available as soruce of information, you have available all the code for the Property Loader as part of the TestStand Installation.
 
Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,422 Views)
Oh, I see.  I was using "Step.Limits.High", but I guess I don't need the Step part if I am starting with a reference to the step.  Boy, these computers sure are finicky.

Thanks,
Benjamin
0 Kudos
Message 3 of 3
(3,409 Views)