We are using PM866 Controller. This is the Log File. How to under stand its error?
Voted best answer
I assume you mean the Modbus messages, The slave respons messages ?
These type of messages from MODBUS in the log is caused by the Modbus slave,
see my example explanation below.
E 2019-02-22 04:52:4:19.770 PhMODBUS: UnpackTelegram: Exception response from slave!! See the Data in below line
15 132 2 163 2 0 0 0
15 = Slave node 15
132= is the Function code. 132 in HEX is 84 – 80 = 4. FC code 4 is used.
This is the way to calculate the actual function code used.
The slave got ID 15 and the message is "Read Input Registers", or Function Code 4
2 = Exception code
Modbus standard says ILLEGAL DATA ADDRESS for exception code 2
Most probably you have a misconfiguration, and request for not existing registers from the slave.
See also the explanation from Modbus standard below.
The data address received in the query is not an allowable address for the server (or slave). More
specifically, the combination of reference number and transfer length is invalid. For a controller with
100 registers, the PDU addresses the first register as 0, and the last one as 99. If a request
is submitted with a starting register address of 96 and a quantity of registers of 4, then this request
will successfully operate (address-wise at least) on registers 96, 97, 98, 99. If a request is
submitted with a starting register address of 96 and a quantity of registers of 5, then this request
will fail with Exception Code 0x02 “Illegal Data Address” since it attempts to operate on registers
96, 97, 98, 99 and 100, and there is no register with address 100.
Best Regards Jan-Erik