Closed simogaspa84 closed 2 years ago
mb.writeHreg(SLAVE_ID, ADDRESS_SINGLE_REGISTER, 0, nullptr, MODBUSIP_UNIT);
mb.writeHreg(SLAVE_ID, ADDRESS_SINGLE_REGISTER, 0, nullptr);
Just a question @emelianov
if i run this
6 1 16 FF FF
and I got this error from slave Request result: 0x2
This means that the address of that register is not known ?
It is correct ?
Exactly. Communications are Okay but reg 0x16 doesn't exists on server/slave.
Hello @emelianov ,
just a question..
Why if i run these commands
mb.writeHreg(SLAVE_ID, ADDRESS_SINGLE_REGISTER, 0, 1, nullptr, MODBUSIP_UNIT); mb.writeHreg(SLAVE_ID, ADDRESS_SINGLE_REGISTER, 0, 1, nullptr);
The function code for the modbus is 10
10 1 22 0 1 2 0 0
instead of