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 Profiles
#1
I want to use the modbus configuration file on the LM to control the 485 slave device

"My requirement is that the mapped switch address' 1/1/1 'implements a write command to register 23. When the switch  value is true, write 0xAAAA to address 23, and when the switch value is false, write 0x5555 to address 23.".

How should I change the ". json" file below to meet my requirements (without writing a script to implement it).
Code:
...

{ "name": "on_off",          "bus_datatype": "bool",     "type": "register", "writable": 1,   "address": 23, "value_custom":  { "0": "off","1": "on" } },

...
Reply
#2
Not possible without a script.
Reply
#3
Can the '. json' file implement bit writing to registers, such as writing values of 1 or 0 to bit3, bit4b, and bit7 without changing the values of the remaining bits.
Reply
#4
Yes, see value_bitmask and write_bitmask mapping fields: https://openrb.com/docs/modbus.htm
Reply


Forum Jump: