111,131
社区成员
发帖
与我相关
我的任务
分享
2021-12-30 13:49:26.8848|二厂化镀色泽检测.MachineRunningStatus|ERROR|NModbus.SlaveException: Exception of type 'NModbus.SlaveException' was thrown.
Function Code: 129
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.
at NModbus.IO.ModbusTransport.UnicastMessage[T](IModbusMessage message)
at NModbus.Device.ModbusMaster.PerformReadDiscretes(ReadCoilsInputsRequest request)
at NModbus.Device.ModbusMaster.ReadCoils(Byte slaveAddress, UInt16 startAddress, UInt16 numberOfPoints)
at 二厂化镀色泽检测.MachineRunningStatus.timerCallback(Object state) in F:\测试程序\拍照\MachineRunningStatus.cs:line 135 NModbus.SlaveException: Exception of type 'NModbus.SlaveException' was thrown.

没错啊,配置都是对的。请前辈们帮忙看下!