26.06.2017, 07:36
Hi, I need some help with a modbus profile to read some registers on a slave.
The slave has a register on the holding area which is an array of bool, I've been able to read it an map to bool KNX addresses.
What I'm not able to do is to write bit to bit from logic machine, when I write a value 1 to one bit, it applies the mask and all the other from the modbus register turns to 0.
Here is the part of the profile I've created for two bits from the holding register:
{"name": "Array_Bool_[0]",
"bus_datatype": "bool",
"bus_address": "32/1/7",
"type": "register",
"address": 4,
"value_bitmask": 0x01,
"writable": 1,
"read_swap": 1
},
{"name": "Array_Bool_[1]",
"bus_datatype": "bool",
"bus_address": "32/1/8",
"type": "register",
"address": 4,
"value_bitmask": 0x02,
"writable": 1,
"read_swap": 1
}
I'm nut sure if i'm using "read_swap" correctly because i can't see any difference using it or not....
Is there any way to solve it?
Thanks!
The slave has a register on the holding area which is an array of bool, I've been able to read it an map to bool KNX addresses.
What I'm not able to do is to write bit to bit from logic machine, when I write a value 1 to one bit, it applies the mask and all the other from the modbus register turns to 0.
Here is the part of the profile I've created for two bits from the holding register:
{"name": "Array_Bool_[0]",
"bus_datatype": "bool",
"bus_address": "32/1/7",
"type": "register",
"address": 4,
"value_bitmask": 0x01,
"writable": 1,
"read_swap": 1
},
{"name": "Array_Bool_[1]",
"bus_datatype": "bool",
"bus_address": "32/1/8",
"type": "register",
"address": 4,
"value_bitmask": 0x02,
"writable": 1,
"read_swap": 1
}
I'm nut sure if i'm using "read_swap" correctly because i can't see any difference using it or not....
Is there any way to solve it?
Thanks!