I used modbus lib from mongoose. now I able to read the result from the sensor but when I print out the buffer result are like this
SlaveID: 0b, Function: 03 - Buffer: 0b 03 06 01 38 02 61 00 e3 ee 2e
How can I get result in DEC format. ?
At the same setup but run on Arduino+Modbus Master Lib it has function
node1.getResponseBuffer(0)
And the result are correct!
Now I know result start to get from index 3-4
The buffer contains the whole message. You are printing a buffer, not a parsed and interpreted response.
The first byte in a Modbus RTU message is the slave id, the 2nd is the Function being called, with the MSB set if the response is an exception; then come the rest of the parameters/responses which depend on the function being called and the exception state.
Modbus RTU specs are freely available for public download http://www.modbus.org