Reading Modbus IP - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: Reading Modbus IP (/showthread.php?tid=2310) |
Reading Modbus IP - camilo - 30.10.2019 Hi, I'm currently in a project that is working with modbus IP, I have searched here in the forum and in the examples of the page but I don't see if there is the possibility of using modbus IP. My question is: can I use Modbus IP with a logic machine and if so, how could I use it? thank you RE: Reading Modbus IP - admin - 30.10.2019 The same way as ModBus RTU - create a profile and assign it to a device. RE: Reading Modbus IP - camilo - 05.11.2019 (30.10.2019, 13:26)admin Wrote: The same way as ModBus RTU - create a profile and assign it to a device.Hi, Thank you very much, now I want to know how the script would be, because for example in modbus RTU one creates a script with the following code: Code: -- init modbus on first script execution for the Modbus IP would I have to change something? thank you very much RE: Reading Modbus IP - admin - 05.11.2019 I suggest using profiles instead of scripts as it provides automatic re-connection and other features. For example, if you create a resident script with your code it will stop working if connection is lost. The only way to make it work again would be to restart the script via disable/enable. TCP connection is created like this: Code: require('luamodbus') |