02-17-2011 08:49 AM
Hi,
I'm trying to read an 80 bytes string from the serial port but if one of those bytes is 0D (hexa) the rest of the bytes are not read because the Visa read node sees the value 0D as ASCII for carriage return. How can I read the entire string and see the 0D as a value and not as an ASCII symbol?
Manuel
Solved! Go to Solution.
02-17-2011 08:53 AM
02-17-2011 09:05 AM
HI Steve,
The port is configured with the termination character as default. But I don't need a termination character, I know that the string will always be 80 bytes long. The thing is that I set the "byte count" of the Visa Read node to 80, and when a 0D value shows up the "return count" says that only the bytes before 0D were read. Do I make myself clear? For example what I need to see is this:
02 0A 03 05 1E 0C 02 0D 03 0F 05 0D 0A 01
And what the "Visa read" sees is:
02 0A 03 05 1E 0C 02 0D
03 0F 05 0D
0A 01
Because it takes 0D as carriage return.
02-17-2011 09:12 AM - edited 02-17-2011 09:13 AM
Of course it sees it as a carriage return and terminates. That is what you have programmed it to do. Set the 'Enable Termination Character' to false with your VISA Configure Serial Port. Just what Steve has already said. Clear?
02-17-2011 09:19 AM
Clear, that solved the issue. I guess I missunderstood Steve. I thought the default termination character was 0A (line feed)
thank you both guys