This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus apply mask to digit
#1
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
Reply
#2
You can extract certain bits using value_bitmask. But if the value is (hours * 100 + minutes) then the only solution is a script.
Reply
#3
(Yesterday, 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!
Reply


Forum Jump: