Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RX Buffer was being cleared with correct data in it.#94

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
bjornComate wants to merge1 commit intorossmann-engineering:master
base:master
Choose a base branch
Loading
fromNetalux-NV:masterExternal

Conversation

@bjornComate
Copy link

The transmit buffer was send before the RX buffer was being cleared. When a slave device was answering faster then the lib was clearing the buffer. correct data was being removed, and the packet was lost.

@Padanian
Copy link

AFAIK, I don't think this is the right way to do it. Never had this issue before.
Check if slave is abiding to the correct timings. Sometimes, embedded devices are able to answer before the UART switches TX/RX lines.

@bjornComate
Copy link
Author

bjornComate commentedMay 9, 2023
edited
Loading

Slave is abiding timings. We've checked this with a saleae logic analyzer.
I can also see the data in the buffer that as being answered back (also checked this). before it's being deleted.
We're also using RS232. so no switching of RX/TX lines

Clearing your buffer before sending solves this. and I can't see a reason why you would want to first send and then clear the receive buffer, since modbus is half duplex, a slave will never answer before the master sends so there isn't going to be rogue data in the buffer if you clear it beforehand.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@bjornComate@Padanian

[8]ページ先頭

©2009-2025 Movatter.jp