Change Modbus client via script - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Change Modbus client via script (/showthread.php?tid=1019) |
Change Modbus client via script - toujour - 29.09.2017 Hi to Everybody, I have a problem with only one object in modbus mapping profile, please see the image in the attachment. I want change the COIL 192 to COIL 191 ( I forgot it in the profile ) Can I use a script to change only this point ? I have more then 500 point in this modbus device. At the moment I create a single script (without use the profile and mapping, so I can change it so fast) for this object. But I can't do it every time I must change a row in the profile....I'd like change the mapping properties. I think...Could I use the option below ? query = 'SELECT * FROM modbus_mapping' db:update('modbus_mapping', { address = 191 }, { id = 50 }) -- where 191 is the new address and 50 is the row of the mapping table (for example) -- where do I find the right name of the database of the device ? Thanks in Advance ! Alberto RE: Change Modbus client via script - Erwin van der Zwart - 29.09.2017 Hi, I don’t think current db:update you created will work as the field address is the KNX address and not the modbus coil.. Is it only the one wrong double coil192 that needs to be coil191 and coil192 or do you need multiple corrections? BR, Erwin RE: Change Modbus client via script - toujour - 30.09.2017 At the moment I have only this wrong Coil but I think that I could change or add other rows in the future. I'm using a new under construction profile. |