ESP32 MODBUS SLAVE BLOCKING
Posted: Thu Apr 22, 2021 7:28 am
hello esp32 modbus slave communication is working as blocked, which stops the program completely if no data comes from the master. i want help me fix this problem.
thanks everyone.
"// The cycle below will be terminated when parameter holdingRegParams.dataChan0
// incremented each access cycle reaches the CHAN_DATA_MAX_VAL value.
for (; holding_reg_params.holding_data0 <MB_CHAN_DATA_MAX_VAL;) (
// Check for read / write events of Modbus master for certain events
mb_event_group_t event = mbc_slave_check_event (MB_READ_WRITE_MASK);
const char * rw_str = (event & MB_READ_MASK)? "READ": "WRITE";
// Filter events and process them accordingly
"
thanks everyone.
"// The cycle below will be terminated when parameter holdingRegParams.dataChan0
// incremented each access cycle reaches the CHAN_DATA_MAX_VAL value.
for (; holding_reg_params.holding_data0 <MB_CHAN_DATA_MAX_VAL;) (
// Check for read / write events of Modbus master for certain events
mb_event_group_t event = mbc_slave_check_event (MB_READ_WRITE_MASK);
const char * rw_str = (event & MB_READ_MASK)? "READ": "WRITE";
// Filter events and process them accordingly
"