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 whether you accept or reject these cookies being set.

Bool Inversion with JSON
#1
Hello!
Is there any way to inverse boolean in Modbus JSON profile?

I try this, but not result:

{"type":"inputregister","address":6,"name":"PU72_auto", "value_custom":{"0":"1","1":"0"}, "datatype":"uint16","value_multiplier": 1,"units":"","bus_datatype":"bool", "writable": 0,"value_bitmask":"0x0020"},
Reply
#2
Remove "value_custom" field and add "value_conv": "BoolInvert". "value_multiplier" and "units" field are not needed as well.
Reply
#3
(21.04.2020, 17:46)admin Wrote: Remove "value_custom" field and add "value_conv": "BoolInvert". "value_multiplier" and "units" field are not needed as well.

Thanks, it works.
Reply


Forum Jump: