NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we Compare Inequality in string value test?

Hello

I need to compare inequality condition in String Value test Step?
Currently the step checks for Equality of Limit value and data source but i need to compare the inequality between these two properties i.e. if these 2 strings are unequal.

Regards
Nitin Goel
0 Kudos
Message 1 of 7
(5,742 Views)
Maybe use a PassFail type test and do the evaluation in the PostExpression.
0 Kudos
Message 2 of 7
(5,732 Views)
Right !
I would use an adapterless <none> PassFail StepType
and under the data source Tab  enter: StrComp("A","B") != 0
 
For "A" or "B"  you could use any TS variable instead
 
Hope this helps
 
juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 3 of 7
(5,727 Views)
Thanks for the information.

Can we do this by altering any property or change in architecture of TS to reverse the action of string value test step.

Regards
Nitin goel
0 Kudos
Message 4 of 7
(5,693 Views)

goel,

The comparison in the string value test step is done in the status expression:

Step.DataSource != "Step.Result.String" ? Step.Result.String = Evaluate(Step.DataSource) : False,
CheckStrLimit(Step.Result.String,Step.Limits.String,Step.Comp)

The expression function CheckStrLimit is the function that evaluates to the status of the step.  If you wanted to change the behavior of the step, you could make a copy of and then modify the NI_StringValueTest type, and replace the status expression with an expression of your choosing.

This KnowledgeBase might have some more information that will help.
Also, the ResultStatus string (the string that the status expression sets) is usually one of the enumerated constants found here: StepProperties Constants

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 5 of 7
(5,645 Views)

hi Josh_W

When i make a copy of the string value test, the status expression field is still "greyed out", which means i can't change the step behaviour !   any ideas ?

 

0 Kudos
Message 6 of 7
(4,991 Views)

ignore my post, found out it has to be changed in the type palette....(general step settings)

0 Kudos
Message 7 of 7
(4,989 Views)