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.

check slave tcp/IP modbus device status
#3
(23.11.2020, 08:08)admin Wrote: This method won't work with TCP-RTU gateway. One solution is to check updatetime value of a linked object periodically and set status if it was not updated for a certain time.

ok, cool it's a way I could do it !
Maybe, put a tag like 'towatch', and check difference betaween date now and uptime

Something like this:

obj1 = grp.find('x/x/x')
objError= grp.find('x/x/x')

now = os.time() -- current timestamp in seconds
delta1 = now - obj1.updatetime -- last object update relative time

if (delta1 > 240)  then
  objError:write(true)
end


DO you know why it's not implemented ? It works for rtu, and if the gateaway don't respond...


Thank you for helping
TIPS: https://forum.logicmachine.net/showthrea...updatetime
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply


Messages In This Thread
RE: check slave tcp/IP modbus device status - by domotiqa - 23.11.2020, 08:29

Forum Jump: