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

Support for function 5 and 6. #33

Open
GoogleCodeExporter opened this issue Oct 13, 2015 · 11 comments
Open

Support for function 5 and 6. #33

GoogleCodeExporter opened this issue Oct 13, 2015 · 11 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

What steps will reproduce the problem?
1. The modbus slave I have does not support function 16 for setting register, 
only function 6.
2. Same goes for function 15, not supported, only function 5.

This is a thermostat from Delta automation.
Reading registers and coils works perfectly.
But for full functionality I need to be able to set the new target temperature, 
this is done with function 6 to address 0x1001. And I need to switch the 
thermostat between run/stop mode, a single coil at address 0x0814.

Any possibility this could make it in to the library?

Original issue reported on code.google.com by [email protected] on 17 Jul 2014 at 1:59

@GoogleCodeExporter
Copy link
Contributor Author

Maybe in the future..

Original comment by [email protected] on 31 Jul 2014 at 10:23

  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Contributor Author

I have added function 5 and 6 to the library, still have some work to do on my 
device and some verifications that the error handling works ok. Once done I can 
post a copy and maybe it can be added to the main code.

Original comment by [email protected] on 31 Jul 2014 at 11:52

@GoogleCodeExporter
Copy link
Contributor Author

I have tried to keep the library small that is why I have not included F5 and 
F6. I might do it in the future though.

Original comment by [email protected] on 4 Aug 2014 at 11:58

@GoogleCodeExporter
Copy link
Contributor Author

Can you Post your Code? I need the funktion 6 too, for openHAB.

Original comment by [email protected] on 19 Aug 2014 at 1:36

@GoogleCodeExporter
Copy link
Contributor Author

Here is a DropBox link to my modified library. (also attached here).
https://www.dropbox.com/s/ag3lhvbjcnx8oza/SimpleModbusMaster-F5-F6-Mod.zip
Warning! I have changed the names of F15 and F16 to what the modbus 
specification calls them, made it easier for me.
Example of setting up F5 and F6:
* modbus_construct(pTC1runSV, 1, WRITE_SINGLE_COIL, 0x0814, 1, TC1runSV);
* modbus_construct(pTC1SV, 1, WRITE_SINGLE_REGISTER, 0x1001, 1, TC1SV);
For both you set the length to 1, other than that it works just as before.
As far as I have tested it all seams to work fine..

Original comment by [email protected] on 19 Aug 2014 at 6:04

Attachments:

@GoogleCodeExporter
Copy link
Contributor Author

Thanks for the Master Lib, have you also a Slave Lib?

Original comment by [email protected] on 19 Aug 2014 at 6:46

@GoogleCodeExporter
Copy link
Contributor Author

Sorry no.. I only use the master function to communicate with thermostats.
If I get the time I can lock at the slave code and see if it's as easy to get 5 
and 6 in there as in the master.

Original comment by [email protected] on 20 Aug 2014 at 7:02

@GoogleCodeExporter
Copy link
Contributor Author

it would be cool, thanks

Original comment by [email protected] on 20 Aug 2014 at 7:17

@GoogleCodeExporter
Copy link
Contributor Author

Hello Juan, do you work on the function 6?

Original comment by [email protected] on 26 Aug 2014 at 8:32

@GoogleCodeExporter
Copy link
Contributor Author

Sorry no, I will not have time to look at the slave library in the near future.

Original comment by [email protected] on 26 Aug 2014 at 8:40

@GoogleCodeExporter
Copy link
Contributor Author

Hello there, any news on function 6? It would be helpful to be able to write 
single register on Arduino slave.

Original comment by [email protected] on 27 Oct 2014 at 7:47

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

No branches or pull requests

1 participant