日期:2014-05-17  浏览次数:21217 次

C# NModbus
大家好, 

我现在在使用NMOdbus library, 去设计自己的一个软件。用来读取寄存器的值。 
现在我的程序可以很好的读出bool[] master.ReadInputs 和 ushort[] master.ReadHoldingRegisters 。但是,剩下的两个》
bool[] ReadCoils和ushort[] ReadInputRegisters 不能工作,一直报错》 

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.

即使我只读一个寄存器的值,也是同样的错误。我百思不得其解,已经几个星期了,实在找不出问题所在,请大家帮帮忙...
C# ?NModbus?

------解决方案--------------------
楼上的应该是地址的问题,还是去看看PLC 手册好好了解下。要不地址没有使用,要不地址长度超出范围。