02-08-2023 10:50 AM
Good afternoon.
I am new in LabVIEW, and I'm having trouble processing the data read from the serial port. The purpose of the VI would be to have a state machine that sends something through the serial port, and then it goes to a next state in which it reads the serial port and compares if the response message fits with the one it has established to go to the next state. The program seems to write and read the serial port, but when comparing the read message with the reference one, it does not consider them equal, even though they are.
If anyone knows why this is the case, I would greatly appreciate the help. I attached the VI for reference
Solved! Go to Solution.
02-08-2023 01:11 PM
I'm seeing a lot of red flags here. At this point, I'm just going to recommend you go watch this video: VIWeek 2020/Proper way to communicate over serial
02-08-2023 02:04 PM
I am on a mobile and cannot see your code.
I hear you say "Two strings look the same" String objects like constants, controls and indicators have a display property that can be shown from right-clicking the object. Many ASCII coded characters are considered white space and do not appear in text objects unless you ask to show them.
02-09-2023 04:18 AM
Thank you! I already fixed it an that was one of the problem that the program had.With every command, it also returned \r\n and I wasn´t watching it.