Hello,
I'm trying to make a JSON mapper for the Schneider APC UPS ove Modbus TCP but I'm having some problems.
No values get present, and the error is: read failed: Illegal data address
This is what I have mapped up so far:
This is the documentation regarding Modbus protocol for the UPS:
http://download.schneider-electric.com/f..._R1_EN.pdf
Is it something with hexadecimal/decimal adresses? or with my bitmasking?
The documentations states UINT16 on datatype, must I add this to the mapper?
I'm trying to make a JSON mapper for the Schneider APC UPS ove Modbus TCP but I'm having some problems.
No values get present, and the error is: read failed: Illegal data address
This is what I have mapped up so far:
Code:
{
"manufacturer": "Schneider",
"description": "APC UPS",
"mapping": [
{ "name": "On Line", "bus_datatype": "bool", "type": "register", "address": 3, "writable": 0, "value_bitmask": 0x8, "bus_address": "6/0/0" },
{ "name": "On battery", "bus_datatype": "bool", "type": "register", "address": 3, "writable": 0, "value_bitmask": 0x10, "bus_address": "6/0/1" },
{ "name": "Overload", "bus_datatype": "bool", "type": "register", "address": 3, "writable": 0, "value_bitmask": 0x20, "bus_address": "6/0/2" },
{ "name": "Low battery", "bus_datatype": "bool", "type": "register", "address": 3, "writable": 0, "value_bitmask": 0x40, "bus_address": "6/0/3" },
{ "name": "Replace battery", "bus_datatype": "bool", "type": "register", "address": 3, "writable": 0, "value_bitmask": 0x80, "bus_address": "6/0/4" },
{ "name": "% battery state of charge", "bus_datatype": "float16", "type": "register", "address": 5, "writable": 0, "bus_address": "6/0/5" },
{ "name": "Runtime remaining", "bus_datatype": "float16", "type": "register", "address": 6, "writable": 0, "bus_address": "6/0/6" },
{ "name": "Battery voltage", "bus_datatype": "float16", "type": "register", "address": 7, "writable": 0, "bus_address": "6/0/7" },
{ "name": "UPS internal temperature", "bus_datatype": "float16", "type": "register", "address": 8, "writable": 0, "bus_address": "6/0/8" },
{ "name": "Amps drawn by load", "bus_datatype": "float16", "type": "register", "address": 9, "writable": 0, "bus_address": "6/0/9" },
{ "name": "Quantity of bad batt packs", "bus_datatype": "float16", "type": "register", "address": 10, "writable": 0, "bus_address": "6/0/10" },
{ "name": "Quantity of batt packs", "bus_datatype": "float16", "type": "register", "address": 11, "writable": 0, "bus_address": "6/0/11" },
{ "name": "% power drawn by load", "bus_datatype": "float16", "type": "register", "address": 12, "writable": 0, "bus_address": "6/0/12" },
{ "name": "Nominal power output", "bus_datatype": "float16", "type": "register", "address": 13, "writable": 0, "bus_address": "6/0/13" },
{ "name": "Actual output voltage", "bus_datatype": "float16", "type": "register", "address": 14, "writable": 0, "bus_address": "6/0/14" },
{ "name": "Maximum input", "bus_datatype": "float16", "type": "register", "address": 15, "writable": 0, "bus_address": "6/0/15" },
{ "name": "Minimum input", "bus_datatype": "float16", "type": "register", "address": 16, "writable": 0, "bus_address": "6/0/16" },
{ "name": "Input voltage", "bus_datatype": "float16", "type": "register", "address": 17, "writable": 0, "bus_address": "6/0/17" },
{ "name": "Input frequency", "bus_datatype": "float16", "type": "register", "address": 18, "writable": 0, "bus_address": "6/0/18" },
{ "name": "Low battery duration", "bus_datatype": "float16", "type": "register", "address": 31, "writable": 0, "bus_address": "6/0/19" }
]
}
This is the documentation regarding Modbus protocol for the UPS:
http://download.schneider-electric.com/f..._R1_EN.pdf
Is it something with hexadecimal/decimal adresses? or with my bitmasking?
The documentations states UINT16 on datatype, must I add this to the mapper?