NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to read "Result.Numeric" Property.

Hi all,

 

Am reading the propeties of step using C# as follows

 

SequenceContext

seqctx = e.uiMsg.Thread.GetSequenceContext(0, outframeid);

  

if(seqctx.PreviousStepIndex >= 0)

{

Stepprvstp = seqctx.PreviousStep;

 

StepTypeprvstptyp = prvstp.StepType;

 

PropertyObjectstepPropertObject = prvstptyp.AsPropertyObject();

 

string[] SteptobeinStatus=null;

 

if (string.Equals(prvstptyp.Name, "NumericLimitTest"))

{

StringstpName = prvstp.Name;

 

StringstpDesc = prvstp.Description;

 

double lwlimt = stepPropertObject.GetValNumber("Limits.Low", 0);

 

double measValue = stepPropertObject.GetValNumber("Result.Numeric", 0);

 

String unit = stepPropertObject.GetValString("Result.Units", 0);

 

double hglimt = stepPropertObject.GetValNumber("Limits.High", 0);

 

String resultstatus = prvstp.ResultStatus;

 

am able to get High and Low Limits and the Result of the step but am getting empty value when i access Numeric and Units property.

 

can some one please help me with get the velue

 

 

Thanks in advance

 

IVI

0 Kudos
Message 1 of 4
(3,102 Views)

Are you perhaps access the properties before they are filled in? Are you sure the step executed?

 

-Doug

0 Kudos
Message 2 of 4
(3,089 Views)

Hi,

Thanks for your quick response.

i found the solution.

i need to convert "Step: as an property object not the "StepType".

 

 

Thanks

IVI

0 Kudos
Message 3 of 4
(3,078 Views)

Ah yes, sorry I missed that. I should have looked at the code more carefully.

 

-Doug

0 Kudos
Message 4 of 4
(3,072 Views)