ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Units programmatically

Using TS 2016 64bit Mulitple Numerica Limit Test, doesn't appear to be able to set the Units programmatically.

 

I use this parameter and no change to Units - 

RunState.Step.Result.Measurement["Measurement 0"].Units  . 

 

I click the option to set to "Custom" on Units is grayed out, why? I have not been able to enable Custom setting in the drop-down box. 

0 Kudos
Message 1 of 6
(3,127 Views)

Hi Richjoh,

 

Quick test for below method, it's working for me.

 

ricky10116_real_1-1588063144917.png

 
 

Untitled.png

 

Thanks,

Ricky

 

 

0 Kudos
Message 2 of 6
(3,082 Views)

Ricky,

It looks like your setup is not identical to what I use. I used Labview adapter. I also used RunState...Units to set Units your using a local variable.

0 Kudos
Message 3 of 6
(3,069 Views)

Just provide you a method to set units programmatically. No test your method. And why I use None adapter is because it's quick test, I don,t want to waste my time to create VI and I think they have the same results. : )

0 Kudos
Message 4 of 6
(3,058 Views)

It turn out if the "Units" field is blank the "RunState.Step.Result.Measurement["Measurement 0"] etc. "Units" doesn't exist.

 

If the Multiple Numeric Limit Test has something in the Units field prior to RunState, the Units can be set programmatically by

 

RunState.Step.Result.Measurement["Measurement 0"].Units="apple" in the Post Expression.

RunState.Step.Result.Measurement["Measurement 1"].Units="oranges"

RunState.Step.Result.Measurement["Measurement 2"].Units="berrys"

RunState.Step.Result.Measurement["Measurement 3"].Units="avocado" etc. .

0 Kudos
Message 5 of 6
(3,053 Views)

Yes, you are right and maybe you can give a default string then replace it.

And another method pop up in my mind is to create a value by programming.

Just try to verify my thinking but not recommend to do in this way. It's not meaningful.

ricky10116_real_0-1588120388093.png

 

0 Kudos
Message 6 of 6
(3,044 Views)