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 whether you accept or reject these cookies being set.

Modbus RTU Serial Enabled/Disabled by Script
Hi guys...

is there a way to activate and deactivate the Modbus RTU Serial 1 by an event script?, cuz´I want to use an object for doing this from the visualization without using the administrator account 

What is the use case for that?
Hi admin,

I'm trying to use 2 Modbus Masters writing in KNX(The LM and an external one)reading common devices but clearly not at the same time, so the master change should be done by the final user, switching between them without getting access over the LM config. That's why I want to set up a switch in user's visualization for make this change.

This is not the best approach. You should make one device talking to slave and the other two masters should exchange data in another way. LM can be also modbus slave.
Thanks Daniel,

But what happened if I had 2 masters reading same devices?, in Modbus that's imposible can do it if you turn off one master when the other one is working, as I see.. that's like a redundant modbus network, that's the thing that I wanna get... it's easy from the admin account cuz' you just go to the modbus tab and disable RTU and it's done...but the tricky thing is to do it from the visualization...
Use this event script to emulate a web request to enable/disable RTU. Attach it to a boolean object.

value = event.getvalue()


function getvar()
  return 'config-save'

  return { enabled = value }

Thank u so much admin, it totally works!


Forum Jump: