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 and Modbus Mapping Delete via Script
#2
Try this:
Code:
addr = '1/1/1'

-- delete object
grp.delete(addr)

-- clear modbus mapping
id = buslib.encodega(addr)
db:query('UPDATE modbus_mapping SET bus_address="" WHERE bus_address=?', id)

-- restart modbus
os.execute('sh /lib/genohm-scada/plugins/modbus/stop.sh; sleep 1; sh /lib/genohm-scada/plugins/modbus/start.sh')
Reply


Messages In This Thread
RE: Object and Modbus Mapping Delete via Script - by admin - 24.02.2021, 08:49

Forum Jump: