Modbus apply mask to digit - 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: Modbus apply mask to digit (/showthread.php?tid=5858) |
Modbus apply mask to digit - didac - 24.01.2025 Hello, I have a question, is it possible to apply a mask in the json file of the modbus profile to only receive the last digits of the value of a register? For example, the record sends me a value with hour and minute. Ex. 2302. Can I automatically extract the last 2 digits with a mask? Thanks RE: Modbus apply mask to digit - admin - 24.01.2025 You can extract certain bits using value_bitmask. But if the value is (hours * 100 + minutes) then the only solution is a script. RE: Modbus apply mask to digit - didac - 24.01.2025 (24.01.2025, 09:04)admin Wrote: You can extract certain bits using value_bitmask. But if the value is (hours * 100 + minutes) then the only solution is a script. Ok thanks! |