How to implement custom responses for server slaves #1213
-
Hello, I however have no idea how to implement them into the sever context. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That is easy, just create a custom datastore (see v2.5.3 example) the article you refer to is for clients not servers. |
Beta Was this translation helpful? Give feedback.
-
What do you mean "which have multiple values that are not in the server's standard modbus map" there are no standard modbus map for values. Please have a closer look at the data block, validate_values and get/set _values are called with each incoming request, you get the function code, and you can respond as you please, with fixed values or calculated values. You can add a datastore for each slave if you want (our server_async.py example actually does that). Forget what you saw about the client, that have absolutely nothing to do with datastores. |
Beta Was this translation helpful? Give feedback.
That is easy, just create a custom datastore (see v2.5.3 example)
that does what you want and pass it to the server with context=
the article you refer to is for clients not servers.