Modbus script problem - Timeout - 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: Modbus script problem - Timeout (/showthread.php?tid=5577) |
Modbus script problem - Timeout - fleeceable - 27.08.2024 Hi! I'm facing some problems with modbus script over some time. After some time (about week or two) communication goes to timeout (all reading/writing parameters). After I disable modbus script, enabling port on modbus tab, going to scan modbus devices on specific port (and system finds device with address), disable port on modbus tab, enable script again - everything starts to work again via script. I attach code in here. What can cause this? Resident script with 10s sleep Mitsubishi frequency converter Code: require('luamodbus') I have seen this kind of problem with some other devices as well (chiller cooling units and swegon ventilation unit). RE: Modbus script problem - Timeout - Daniel - 27.08.2024 Try adding mb:flush() after setslave. Why don't you use profile? RE: Modbus script problem - Timeout - fleeceable - 29.08.2024 Thanks! Gonna try that. One reason is that I like coding and I usually have custom projects where modbus part is custom every time. To create profile and test it is quite time consuming compared with coding. |