08-12-2022 05:11 AM
I am communicating with a Velmex VXM controller over serial. The controller returns a '^' termination character when it completes a sequence. I have a message handling loop checking for a termination character, queuing the 'check for termination char' again if it doesn't find it, and moving on if it does (moving on means triggering a DQMH broadcast event in this case if that is of any interest).
The Match Pattern vi I am using to check for '^' appears to be finding a match without finding a match. Any ideas here because I'm stumped? I'm getting a match at position 0, but the match substring is blank!?
Block diagram:
What I'm seeing on the front panel:
Serial port setup in case it is useful:
Solved! Go to Solution.
08-12-2022 05:22 AM
'^' is a special character, search for "Special Characters for Match Pattern" in LabVIEW help:
For searching a specific character in a string you can use Search/Split String.
08-12-2022 07:28 AM
Perfect, thank you!
Search/Split String is now doing the job and suddenly it all makes sense.
08-12-2022 08:29 AM
@LucianM wrote:
'^' is a special character, search for "Special Characters for Match Pattern" in LabVIEW help:
For searching a specific character in a string you can use Search/Split String.
Why are you going through all of this parsing? Why not let the driver do that for you? Check out this presentation from Tim Robinson (crossrulz on this forum)
Proper way to communicate over serial