08-26-2009 12:03 PM
08-26-2009 12:34 PM
In an earlier version of LV the Init serial port VI was funky and did not shut-off the term character for both transmit and recieve. Post an image of that VI so we can see the term character is indeed being disabled.
Ben
08-26-2009 12:38 PM
Ben:
You are on a roll; I have a flat tire today. Perhaps I'll just READ stuff today. 😉
08-26-2009 02:54 PM
Ben,
Attached is Block Diagram for the Config Serial Port block.
08-26-2009 03:13 PM
Provided the false state says "none" we are OK there.
Now to the other odd thigs.
Two stop bits?
Odd Parity?
Make sure those are correct (you probably did).
Try watching your serial port using NI Spy to try and get more info. if you theory is correct we may see more in the NI SPy log. Along with that, if you use a property node on the VISA sesion you can check for the number of bytes at the port AFTER you read the two you expect.
SO I can't tell you what the problem is but maybe one of those ideas will shake the tree a litle.
Ben
08-26-2009 03:18 PM - edited 08-26-2009 03:19 PM
08-26-2009 04:27 PM - edited 08-26-2009 04:36 PM
I've been thinking about this a bit. What if, by directly translating the output string to an array of U8s, it interprets the "/" as the start of a control character you know /n would be a return, I think??? Every time the VI encountered a "/" it would take the next character and make a single control character out of it, making your reads off by one.
I'm thinking maybe you can split the string up into the individual characters before translating them into U8s.
Bill
08-26-2009 04:55 PM - edited 08-26-2009 04:56 PM
billko wrote:I've been thinking about this a bit. What if, by directly translating the output string to an array of U8s, it interprets the "/" as the start of a control character you know /n would be a return, I think??? Every time the VI encountered a "/" it would take the next character and make a single control character out of it, making your reads off by one.
I'm thinking maybe you can split the string up into the individual characters before translating them into U8s.
Bill
Message Edited by billko on 08-26-2009 04:29 PMMessage Edited by billko on 08-26-2009 04:36 PM
I tried this:
and got this!
I think I'm right...except in the original post, i got the slashes mixed up.
Bill
08-26-2009 05:40 PM
Bill,
You gave me an idea of something to check tomorrow when I go into work. I'll keep you posted.
08-26-2009 05:42 PM
Nice, Am0n - good luck!
Darn it, I forgot to mention:
I checked <'/' Codes Display> on the string constant right-click menu because termination strings being ignored, they are coming through as characters now.
Bill