01-15-2010 08:55 AM
Greetings,
I am a neophyte user (stating the obvious here) having trouble with string comparisons. The little vi attached ran an turned green one time but forever after I cannot get it to indicate green regardless of input.
My eventual goal will be to determine if a device is generating the string "Enter User ID:". Would 'Match True/False String' prefaced with some type of string trimming be an acceptable method?
Thanks,
jvh
Solved! Go to Solution.
01-15-2010 09:11 AM
Hi jvh,
the equal function is perfect for comparing string for equality!
Your problem is probably the switch "limit to single line", accessible via right-click of the string control. This will prevent NewLines getting added to the string content... Otherwise make the string controls bigger to show more than one line of text
01-15-2010 09:13 AM
OK I looked at your vi. I have no problem getting the boolean to be True. Just typr the same text in each string input and "enter" the varible. by one of the following means:
See the pictures below
01-15-2010 09:29 AM
Thank you both as I learned from both replies. (They came a lot quicker than expected too.)
It would work if I just entered the string and then hit run. The CRLF was definitely the problem. I forgot that the enter keys were different. Well I forgot about the check mark too.
Shoulda got busy right after class but work was too hectic.
BTW, is there a way to trim off carriage returns, etc on strings coming in from a device?
Thanks again,
jh
01-15-2010 09:32 AM