- Can you please help me how did you changed value definition so it worked actually I am too stuck at the same point, Thank you in advance.
I'm looking for a way how to read multiple input registers at once to reduce bus load. As basis i use the Master example. As long i read only one register it works fine.
Code: Select all
{ CID_UL1N, STR("UL1N"), STR("V"), MB_DEVICE_ADDR1, MB_PARAM_INPUT, 0, 2, INPUT_OFFSET(input_data0), PARAM_TYPE_ASCII, 4, OPTS( 0, 0, 0 ), PAR_PERMS_READ_WRITE_TRIGGER }
Code: Select all
{ CID_UL1N, STR("UL1N"), STR("V"), MB_DEVICE_ADDR1, MB_PARAM_INPUT, 0, 4, INPUT_OFFSET(input_data), PARAM_TYPE_ASCII, 8, OPTS( 0, 0, 0 ), PAR_PERMS_READ_WRITE_TRIGGER }
Code: Select all
typedef struct
{
uint16_t input_data[16]; // 0
} input_reg_params_t;
Code: Select all
err = mbc_master_get_cid_info(cid, ¶m_descriptor);
Code: Select all
mbc_master_get_parameter(cid, (char*)param_descriptor->param_key,(uint8_t*)&value, &type);
Any help is appreciated as it looks like that i did not get something. crashing the device by receiving some data is quite strange to me.request: 0x01 0x04 0x00 0x00 0x00 0x04 0xf1 0xc9
answer: 0x01 0x04 0x08 0x43 0x69 0xa0 0xba 0x00 0x00 0x00 0x00 0x58 0x55