Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ModbusMaster.cpp #98

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Update ModbusMaster.cpp #98

wants to merge 9 commits into from

Conversation

anklimov
Copy link

Description

Add tolerance to random noise receiving after transmission in half-duplex mode (Invalid Slave 0xE1 error preventing)

Awaiting for 1-s byte of response == SlaveID. All garbage before - discarding

Add tolerance to random noise receiving after transmission in half-duplex mode (Invalid Slave 0xE1 error preventing)
@rnicolas
Copy link

rnicolas commented Jan 14, 2018

Hi @anklimov
I had the same problem, but in my case the noise was always zero, so instead of comparing the readings from serial with the direction in order to know were the frame started, I just discarded all zero values until I read a non 0 value. Do you have random value readings before you read the slave ID?

@anklimov
Copy link
Author

anklimov commented Jan 14, 2018 via email

@rnicolas
Copy link

@anklimov
Ok! Thanks! I'll update my code to be like yours because it's more generic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants