NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand IF Statement conditions

Hello folks

I am currently trying to implement an IF condition for my sequence.

I use a function to extract this byte, which I save in a fileglobal as "Word0", as shown here: 

Andedam_0-1598000272747.png


I then want to take this IF condition, but it seems like I am using the wrong syntax

Neither of this seems to be working, as the IF statement evaluates FALSE in the report.

Andedam_1-1598000367063.png

 

What am I doing wrong? I saved the Word0 as a FileGlobal and String. 

Thank you in advance! BR Andedam 🙂






0 Kudos
Message 1 of 2
(2,711 Views)

We might need more clarification on what you are trying to do. But this is my answer based on some assumptions.

 

Are you saying that the string should show true if its "00039475" OR "0003 9475"? Because your code is doing an AND, and that will always be false. You should put || instead of && in the IF Statement.

 

FileGlobals.Word0 == ("00039475" || "0003 9475")

 

The other thing you could do is get rid of whitespace in your string: SearchAndReplace().

0 Kudos
Message 2 of 2
(2,683 Views)