This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Object value update (Modbus)
#1
Hi all!

I'm seraching for the best solution for that:
I have several modbus tcp relays connected to LM via wifi. Due to non stable wireless connection rarely, when I write a new value to mapped object, relay doesn't change the state. It's clear, that telegram simply does not reach the relay, but new value is correctly stored in LM's database.

Do I understand correctly, that we need to check a relay state periodically (or after writing new object value) and compare it to the object value? And in case of different values write the correct value to the bus again?

Thx!
Reply
#2
iiHi,

Modbus has no active feedback or cyclic sending a value like KNX, it's master <-> slave based so if you want to know a value that is inside a certain slave register you indeed have to read it first with the master and with the replied value from the slave you can compare it with the value you expect it to have.

So yes, you understand it correctly.

In your case i think i would write to the register every poll interval so when connection is there again the value is set in the register every loop. This way you don't need to check it..

i also think (because it's tcp) you could fetch connection error when this occurs, but admin should answer that (:

BR,

Erwin
Reply


Forum Jump: