LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string from arduino comparison

Solved!
Go to solution

I'm doing a project that involve labview+arduino Mega1280+xbee. and i have encountered a problem. i'm sending a string from arduino via xbee. labview gets the string and try to compare it with a constant string that i have chosen. but every time the comparison result is Fault . i have tried to send numbers : serial.println("1"),i have tried to send string: serial.println("detection red"), nothing works. I've placed a prob on the wire of the input string and it shows me the right data but the "equal?" is always fault. i would really appreciate if you could help me.

thanks a lot,        Ben

0 Kudos
Message 1 of 3
(2,492 Views)
Solution
Accepted by topic author BenHerut

This is a fairly common issue in serial communication.  You probably have non-printable characters in the string, such as a carriage return. Put an indicator (not a probe) on the return string, and set the string indicator's display mode to something like "\" codes. This will tell you if you have non-printable characters. If so, you need to either strip them before the comparison, or include them as part of the comparison string.

0 Kudos
Message 2 of 3
(2,488 Views)

Thank you very much, this issue has been bugging me for 2 weeks..

0 Kudos
Message 3 of 3
(2,480 Views)