03.10.2016, 04:28
If I remove the if query, then it works better.
But it interfer with the RTU, so sometimes the value gets zero, but then jumps back to the static "10".
This works better, but the value still gets 0 sometimes, not that often as with above, but still occours.:
The best were if it was possible to let the RTU send values to the bus even though the are unchanged.
But it interfer with the RTU, so sometimes the value gets zero, but then jumps back to the static "10".
This works better, but the value still gets 0 sometimes, not that often as with above, but still occours.:
Code:
mbproxy = require('mbproxy')
mb = mbproxy.new()
mb:setslave(1)
result=mb:readregisters(26)
grp.write('2/3/7',result)
The best were if it was possible to let the RTU send values to the bus even though the are unchanged.