Modbus.SlaveException: 引发类型为“Modbus.SlaveException”的异常。
Function Code: 131
Exception Code: 2 - 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.
在 Modbus.IO.ModbusTransport.UnicastMessage[T](IModbusMessage message)
在 Modbus.Device.ModbusMaster.PerformReadRegisters(ReadHoldingInputRegistersRequest request)
在 Modbus.Device.ModbusMaster.ReadHoldingRegisters(Byte slaveAddress, UInt16 startAddress, UInt16 numberOfPoints)
在 ModbusMQTTCould.Form1.timer1_Tick(Object sender, EventArgs e) 位置 C:\Users\HUAWEI\source\repos\ModbusMQTTCould\ModbusMQTTCould\Form1.cs:行号 69
Modbus.SlaveException: 引发类型为“Modbus.SlaveException”的异常。
最新推荐文章于 2024-06-02 00:29:31 发布