09.09.2022, 13:14
(This post was last modified: 09.09.2022, 13:15 by manos@dynamitec.)
Hello admin,
I was testing the resident script (1sec sleep interval) for polling in combination with the modbus profile for writing to the modbus.
The delay is much better now and I like that the objects are being updated quickly into the KNX bus. But I have a new problem when the value of the objects is changed from the KNX bus.
The modbus profile is writing the value to the modbus imediatelly and the touch panel is updated correctly, but while the resident script is running every 1sec the moment it polls the data the slave probably is replying the previous value and this overwrites the value of the knx object. It happens most of sometimes not always.
I am wondering if we can make the resident script with 0sec sleep interval and have a loop with a 1sec delay to do the polling. But in this loop we have to check if the object is written by the KNX bus and pause the loop for some (2) seconds before it can poll the modbus again.
Can something like this be easily implemented?
Thank you in advance for any effort.
I was testing the resident script (1sec sleep interval) for polling in combination with the modbus profile for writing to the modbus.
The delay is much better now and I like that the objects are being updated quickly into the KNX bus. But I have a new problem when the value of the objects is changed from the KNX bus.
The modbus profile is writing the value to the modbus imediatelly and the touch panel is updated correctly, but while the resident script is running every 1sec the moment it polls the data the slave probably is replying the previous value and this overwrites the value of the knx object. It happens most of sometimes not always.
I am wondering if we can make the resident script with 0sec sleep interval and have a loop with a 1sec delay to do the polling. But in this loop we have to check if the object is written by the KNX bus and pause the loop for some (2) seconds before it can poll the modbus again.
Can something like this be easily implemented?
Thank you in advance for any effort.