How to run server with callback and asnyc #2444
-
Hi, I am trying to implement a server with callback and an async concept. However I have no idea how to get setValues and getValues to fit in. Is there a way I could make the code below work? Thank you very much
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Have a look at the callback example, the app need to call set/get values not the other way round. |
Beta Was this translation helpful? Give feedback.
-
Have a look at the callback example, the app need to call set/get values not the other way round. |
Beta Was this translation helpful? Give feedback.
-
My bad, it seems like I have had a misunderstanding about this example. Thank you again! |
Beta Was this translation helpful? Give feedback.
-
You could get forward with following changes:
I assume you can already connect to server via serial connection and all that is working as expected? |
Beta Was this translation helpful? Give feedback.
You could get forward with following changes:
context = ModbusServerContext(slaves=CallbackDataBlock())
in your example-codeI assume you can already connect to server via serial connection and all that is working as expected?