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 register write command
#1
Hi,

I'm writing the modbus interface to Daikin VRF. I have finished and checked with the virtual modbus slave software with the input register with the modbus profile that i create as follow.

{
  "manufacturer": "Daikin",
  "description": "Daikin VRV 1-00",
  "mapping": [

{ "name": "1-00 A/C Control-Read", "bus_datatype": "bool", "type": "inputregister", "address": 2001, "writable": 0, "datatype": "uint16", "value_bitmask": 0x01, "value_custom": {"0": "Off", "1": "On" } },
{ "name": "1-00 A/C Control-Write", "bus_datatype": "bool", "type": "register", "address": 2001, "writable": true, "datatype": "uint16", "value_bitmask": 0x01, "value_custom": {"0": "Off", "1": "On" } },
{ "name": "1-00 Swing-Read", "bus_datatype": "uint16", "type": "inputregister", "address": 2001, "writable": 0, "datatype": "uint16", "value_bitmask": 0x700, "value_custom": {"0": "P0", "1": "P1", "2": "P2", "3": "P3", "4": "P4", "6": "Swing stop", "7": "Swing on" } },
{ "name": "1-00 Swing-Write", "bus_datatype": "uint16", "type": "register", "address": 2001, "writable": true, "datatype": "uint16", "value_bitmask": 0x700, "value_custom": {"0": "P0", "1": "P1", "2": "P2", "3": "P3", "4": "P4", "6": "Swing stop", "7": "Swing on" } },
{ "name": "1-00 Fan Speed-Read", "bus_datatype": "uint16", "type": "inputregister", "address": 2001, "writable": 0, "datatype": "uint16", "value_bitmask": 0x7000, "value_custom": {"1": "Low", "3": "Medium", "5": "High" } },
{ "name": "1-00 Fan Speed-Write", "bus_datatype": "uint16", "type": "register", "address": 2001, "writable": true, "datatype": "uint16", "value_bitmask": 0x7000, "value_custom": {"1": "Low", "3": "Medium", "5": "High" } },
{ "name": "1-00 Operation Mode-Read ", "bus_datatype": "uint16", "type": "inputregister", "address": 2002, "writable": 0, "datatype": "uint16", "value_bitmask": 0xF, "value_custom": {"0": "Fan", "1": "Heating", "2": "Cooling", "3": "Auto ", "7": "Dry" } },
{ "name": "1-00 Operation Mode-Write ", "bus_datatype": "uint16", "type": "register", "address": 2002, "writable": true, "datatype": "uint16", "value_bitmask": 0xF, "value_custom": {"0": "Fan", "1": "Heating", "2": "Cooling", "3": "Auto ", "7": "Dry" } },
{ "name": "1-00 Filter Alarm-Read ", "bus_datatype": "bool", "type": "inputregister", "address": 2002, "writable": 0, "datatype": "uint16", "value_bitmask": 0xF0, "value_custom": {"0": "Normal", "1": "Alarm", "2": "Alarm", "3": "Alarm", "4": "Alarm", "5": "Alarm", "6": "Alarm", "7": "Alarm", "8": "Alarm", "9": "Alarm", "10": "Alarm", "11": "Alarm", "12": "Alarm", "13": "Alarm", "14": "Alarm", "15": "Alarm" } },
{ "name": "1-00 Filter Alarm-Write ", "bus_datatype": "bool", "type": "register", "address": 2002, "writable": true, "datatype": "uint16", "value_bitmask": 0xF0, "value_custom": {"0": "Normal", "1": "Alarm", "2": "Alarm", "3": "Alarm", "4": "Alarm", "5": "Alarm", "6": "Alarm", "7": "Alarm", "8": "Alarm", "9": "Alarm", "10": "Alarm", "11": "Alarm", "12": "Alarm", "13": "Alarm", "14": "Alarm", "15": "Alarm" } },
{ "name": "1-00 Room Temperature Setpoint-Read", "bus_datatype": "float16", "type": "inputregister", "address": 2003, "writable": 0, "datatype": "int16", "value_multiplier": 0.1, "units": "°C" },
{ "name": "1-00 Room Temperature Setpoint-Write", "bus_datatype": "float16", "type": "register", "address": 2003, "writable": true, "datatype": "int16", "value_multiplier": 0.1, "units": "°C" },
{ "name": "1-00 Actual Room Temperature", "bus_datatype": "float16", "type": "inputregister", "address": 2005, "writable": 0, "datatype": "int16", "value_multiplier": 0.1, "units": "°C" }

  ]
}


All "inputregister" are working fine with bit mask, however all failed in command output.
I have check the previous post that the Bitmasks are supported for reading only. How can I write script for bitmasks writing?

I use 1/1/1 for on/off, 1/1/2 for fan direction and 1/1/3 for fan speed. The protocol table for those points is attached.

Thanks in advance.

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Modbus register write command - by kcw - 12.02.2020, 07:47
RE: Modbus register write command - by Daniel - 12.02.2020, 08:14
RE: Modbus register write command - by admin - 12.02.2020, 08:15
RE: Modbus register write command - by kcw - 12.02.2020, 10:07
RE: Modbus register write command - by Rajesh - 13.04.2022, 07:27
RE: Modbus register write command - by Daniel - 13.04.2022, 07:48
RE: Modbus register write command - by Daniel - 06.09.2023, 07:49

Forum Jump: