Just went back into the workshop to check. I assumed that "
(default 0x01)" means it uses per default 1 if not set different. But no that didn't work either. Just for reference, here is my actual configuration:
Code:
/*
The format of the channel descriptors is:
{TYPE, FUNC, ADDR, COUNT, pin_name}
TYPE is one of HAL_BIT, HAL_FLOAT, HAL_S32, HAL_U32
FUNC = 1, 2, 3, 4, 5, 6, 15, 16 - Modbus commands
COUNT = number of coils/registers to read
*/
#define MAX_MSG_LEN 16 // may be increased if necessary to max 251
static const hm2_modbus_chan_descriptor_t channels[] = {
/* {TYPE, FUNC, ADDR, COUNT, pin_name} */
// Create 8 HAL bit pins coil-00 .. -07 supplying the values of coils at 0x0000
{HAL_U32, 6, 0x0122, 1, "controlbit"},
{HAL_U32, 6, 0x0121, 1, "speed"},
{HAL_U32, 3, 0x03F6, 1, "status"},
};