Updating AsyncSerialServer while server is running with updating_task #1717
-
Hi all, I'm pretty new to modbus (and thus pymodbus), so forgive if these are stupid questions. I'm trying to run a serial modbus server that get's values from an API. The goal is to update these values every day or X hours, but without restarting the modbus server. Some relevant code (adjusted example code):
and server setup code:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
seems the example is wrong! You cannot add a new context after the server is started, after the server is started you can update the values in context used in startserver with set_values(). |
Beta Was this translation helpful? Give feedback.
-
If you get values from somewhere that you want to into a modbus server, who then is going to read them......devices are servers so they do not read data, and clients are normally apps, but then the app could read the data directly |
Beta Was this translation helpful? Give feedback.
-
Your question have absolutely nothing to do with pymodbus, it is solely related to python, so please do a google search or whatever. |
Beta Was this translation helpful? Give feedback.
Your question have absolutely nothing to do with pymodbus, it is solely related to python, so please do a google search or whatever.