06-19-2014 01:36 PM
Hello, I'm writing a program that reads an IR thermometer from the serial port. Intermittently, I get both parity and framing errors and cannot explain why or figure out how to fix them. All the serial parameters have been double checked and verified. I get no errors when using Hyperterm yet, when I do test reads in MAX, I do see these errors occasionally. I've tried the suggestions in the knowledge base for these such as introducing a delay between the Visa configure and the Visa read or flushing the transmit buffer before reading but neither has worked. Any insight or ideas would be appreciated.
Additionally, while searching through the threads about parity and framing errors, I saw one where a user recommended the following: "use wait on event triggered by the termination character and when the error occurs I just remove the error, flush the buffer, (wait for the next termination character) and read again." If this sounds like a sound solution, how would I go about implementing it?
I've attached a screenshot of my serial read loop so you all can see what I'm doing. The error code I'm doing the check on is for timeout.
Solved! Go to Solution.
06-19-2014 01:50 PM
06-19-2014 02:53 PM
Will try the loop without the delay, flush etc and let you know if that has an effect.