10-12-2009 09:48 PM
10-12-2009 11:09 PM
That error code is for a framing error. Basically, the byte it read is not formed properly. Since you said it is sending data continuously and it pops up by turning on or off the device, it is possible that you are turning it off before a complete byte is sent, or when you turn it on, it creates a noise spike on the serial line.
Why are you turning the device on and off? The solution is not to turn it on and off.
Does the error come continually, or just the one time from the turn on or turn off event?
You should use some error handling where if you get the error, you clear the error the first time. That or you open and close your com port and reset the device.
Unfortunately, you screenshots don't help much because they are just partial images of your block diagram, and your code has way too many local variables and sequence structures. If you redesign your program to eliminate some of those issues, it might be possible to design it in such a way to more gracefully handle the error you are getting.
10-13-2009 02:06 AM