I create the SensorO2 object and then call check() which works great. But then when I call powerOn(), which calls write16 holdingRegisterWrite is erroring out, as _modbusRtuClient.lastError() is returning: [O2] ModbusRTUClient.write Failed: Invalid argument
I've included my .cpp/.h below. Any help or ideas would be very appreciated. I've also tried without the _modbusRtuClient.setTimeout(3000);
If I uncomment out all the code in write16 (using .beginTransmission, .write etc...) and comment out the code that does holdingRegisterWrite I get [O2] ModbusRTUClient.write Failed: Connection timed out I find it stange the read works fine but the write has issues.
I create the SensorO2 object and then call
check()
which works great. But then when I callpowerOn()
, which calls write16 holdingRegisterWrite is erroring out, as_modbusRtuClient.lastError()
is returning:[O2] ModbusRTUClient.write Failed: Invalid argument
I've included my .cpp/.h below. Any help or ideas would be very appreciated. I've also tried without the
_modbusRtuClient.setTimeout(3000);
Here is the device: https://www.processsensing.com/docs/userguide/UG-004_OXY-LC-User-Guide.pdf
SENSOR_SST_O2_ADDRESS
is set to 0x01If I uncomment out all the code in
write16
(using .beginTransmission, .write etc...) and comment out the code that doesholdingRegisterWrite
I get[O2] ModbusRTUClient.write Failed: Connection timed out
I find it stange the read works fine but the write has issues.Any help is very much appreciated :)