Split Modbus register - 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: Split Modbus register (/showthread.php?tid=4736) |
Split Modbus register - Joep - 26.04.2023 Hello all, I need to split a Modbus register to different bits as you can see from the attached manual starting at page 5 for register 0x0107. Below the script so far. For example register 0x0107 pH status now returns a number which makes sense as it need to be split to different bits i assume. Modbus Manual Code: require('luamodbus') RE: Split Modbus register - Daniel - 26.04.2023 Use value_bitmask in profile https://forum.logicmachine.net/showthread.php?tid=839&pid=6729#pid6729 RE: Split Modbus register - Joep - 26.04.2023 (26.04.2023, 13:40)Daniel Wrote: Use value_bitmask in profile As i'm still facing Invalid CRC errors (see my other thread https://forum.logicmachine.net/showthread.php?tid=4735) So i prefer to use my own Modbus script instead of a Modbus profile. The profile is not getting all the registers as it stops from the first one when receiving an Invalid CRC. The script is still running true so i get the info mostly. RE: Split Modbus register - Daniel - 26.04.2023 Try this then https://forum.logicmachine.net/showthread.php?tid=3948&pid=25477#pid25477 |