??? 08/17/10 21:21 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#178060 - + Error Checking? Responding to: ???'s previous message |
I agree a lot with Erik said; the environment + communication medium (electrical/transceivers) is quite relevant to the problem.
Also, I am assuming you are not using any method of error checking as you did not state that in your post. If you implement some type of CRC and error checking method in your communication routine, you can ensure a message is valid, not just that a message was received. Additionally, you could add a special byte command (or test routine, to isolate the problem(s) ) to require the slave to respond with its received bytes in case a message is detected as being invalid. That way you'd know what was received. It would be smart to assume that a percentage of messages would be invalid so that your system can respond as necessary to cope with erroneous messages (resend, etc.) without requiring a reset. My $.02 |