NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Help building a conditional expression, please

Solved!
Go to solution

I have an IF condition and I'm trying to build a conditional expression for it, but due to my lack of syntax knowledge I am unable to succeed, could someone here help me out, please?

So, basically I have 5 sockets which all run a sequence called INIT, in this sequence I interrogate the UUT and depending on result I set 1 of 5 bools true/false:

Bool_index0, Bool_index1, Bool_index2, Bool_index3 and Bool_index4

 

I want to have a single conditional IF statement and would like to use 'RunState.TestSockets.MyIndex' to tell the program which bool to evaluate.

 

Is it possible to write something like this? I want it to look for the specific Bool_index based on which socket is executing the sequence

 

IF -> Bool_index(RunState.TestSockets.MyIndex) == False

JohnatanBravo_0-1779282292575.png

 

0 Kudos
Message 1 of 3
(227 Views)
Solution
Accepted by topic author JohnatanBravo

Try 

Evaluate("Bool_index"+Str(RunState.TestSockets.MyIndex))

 

Replace Bool_index by the complete LookupString

Message 2 of 3
(202 Views)

That worked like a charm, thank you very much for a quick response. Gotta remember this one!

Message 3 of 3
(186 Views)