Logic Machine Forum
Bool Inversion with JSON - 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: Bool Inversion with JSON (/showthread.php?tid=2604)



Bool Inversion with JSON - Andrey Esaulov - 21.04.2020

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"},


RE: Bool Inversion with JSON - admin - 21.04.2020

Remove "value_custom" field and add "value_conv": "BoolInvert". "value_multiplier" and "units" field are not needed as well.


RE: Bool Inversion with JSON - Andrey Esaulov - 22.04.2020

(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.