04-02-2012 06:55 AM
I'm receiving strings from RS232 for Brightness Up / Down presses and releases from a display.
So I receive UPP and UPR which translates as UP pressed and UP released and the similar for Brightness Down, DNP and DNR.
However the Search 1D Array does not appear to recognize any of these and just returns -1 instead of the appropriate number for the following case.
Solved! Go to Solution.
04-02-2012 07:04 AM
The received commands include the CR-LF termination, while the array elements don't. You should extract the first 3 chars from the received strings.
04-02-2012 08:03 AM
Yes I see where I was going wrong now. I only need to deal with a line feed and not a carriage return.
Thank you for that, I now have it sorted.
Sometimes I can't see what's staring me in the face.
I'm still learning LabView, but unfortunately do not get to use it enough.
Many apologies to 'altenbach' for your piece of code and not fully understanding.
04-02-2012 10:48 PM - edited 04-02-2012 10:48 PM
Then you should give Paolo credit for giving you the solution rather than marking your own reply as the solution. First, go to the options menu to the upper right of your post to Unmark it as the solution.
04-03-2012 02:19 AM
I'm sorry about that, as you can see I've now ammended that.
My intentions were good and I didn't want to offend anyone.
Many thanks Paolo for the solution and sorry if I offended you.
Thank you Ravens Fan for putting me straight. The last thing I wanted to do was upset anybody.
Hopefully one day I'll get the hang of all this.
Thanks again for the help.
04-04-2012 01:58 AM
No upsetting, NWM. Glad to be helpful, like (nearly) all other posters of this forum!
Ravens Fan only wanted to point you in right direction about using the forum.