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

Modbus controller incorrectly set a read coil event as MB_EVENT_COILS_WR (IDFGH-951) #3289

Closed
domoticalabs-dev opened this issue Apr 10, 2019 · 5 comments

Comments

@domoticalabs-dev
Copy link

Into linked code line, and the next one (426), the event is set in a wrong way since in this case the variable eMode is equal to MB_REG_READ.

(void)send_param_access_notification(MB_EVENT_COILS_WR);

The proposed solution is to change, in both lines, the value MB_EVENT_COILS_WR in MB_EVENT_COILS_RD.

@github-actions github-actions bot changed the title Modbus controller incorrectly set a read coil event as MB_EVENT_COILS_WR Modbus controller incorrectly set a read coil event as MB_EVENT_COILS_WR (IDFGH-951) Apr 10, 2019
@alisitsyn
Copy link
Collaborator

Hi domoticalabs-dev,

Thank you for reporting this. The change will be applied into current release and merged as soon as possible.

--
Alex

@domoticalabs-dev
Copy link
Author

Is there any plan to implement a TCP slave too on the future? It seems there is not in the library, so we've tried to implement a simple example of it, still we don't have enough resources to make it completely working and we don't have any plan of doing it in the future.
Could you be interested in the work (very minimal) we've done so far? We have no problem in sharing it, still it's far from being ready. If you needs something to start with, we can share it with no problems.

@alisitsyn
Copy link
Collaborator

Hi domoticalabs-dev,
Yes, there are plans to implement Modbus TCP slave and master. The work in progress common interface for master and slave is already implemented and can be found here: https://www.esp32.com/viewtopic.php?f=13&t=9527&hilit=master+modbus
This code will be merged soon. I already implemented the work in progress version of Modbus TCP slave and TCP master based on this interface code but complete implementation is postponed.
However it would be interesting for me to see your code too. Thank you.

@alisitsyn
Copy link
Collaborator

domoticalabs-dev,
I am not sure if I can request your code and use it due to some regulations. Also I have already implemented code. Thank you for your proposal.

@domoticalabs-dev
Copy link
Author

As you prefer, if you change your mind just ask me. I can also open a pull request if you need it and if it can help you.
I'll leave the issue open so you can close it when you merge it in the next release.

@igrr igrr closed this as completed in eebbced Apr 17, 2019
espressif-bot pushed a commit that referenced this issue Nov 19, 2019
incorrect set of the MB_EVENT_COILS_WR event is changed while read coils in mbcontroller.c file
added read/write handling for appropriate registers in freemodbus.c example file

Closes #3289
0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-idf that referenced this issue May 5, 2021
uuid16 is Missing first 4 characters.
uuid is Missing last 2 characters.
foxval pushed a commit to foxval/esp-idf that referenced this issue Jun 8, 2021
incorrect set of the MB_EVENT_COILS_WR event is changed while read coils in mbcontroller.c file
added read/write handling for appropriate registers in freemodbus.c example file

Closes espressif#3289
espressif-bot pushed a commit to espressif/esp-modbus that referenced this issue Apr 5, 2022
incorrect set of the MB_EVENT_COILS_WR event is changed while read coils in mbcontroller.c file
added read/write handling for appropriate registers in freemodbus.c example file

Closes espressif/esp-idf#3289


* Original commit: espressif/esp-idf@eebbced
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

No branches or pull requests

2 participants