Open chakloong883 opened 2 years ago
//6、批量读取
var list = new List<ModBusInput>();
list.Add(new ModBusInput()
{
Address = "2",
DataType = DataTypeEnum.Int16,
FunctionCode = 3,
StationNumber = 1
});
list.Add(new ModBusInput()
{
Address = "2",
DataType = DataTypeEnum.Int16,
FunctionCode = 4,
StationNumber = 1
});
var list = new List
(); list.Add(new ModBusInput() { Address = "2", DataType = DataTypeEnum.Int16, FunctionCode = 3, StationNumber = 1 }); list.Add(new ModBusInput() { Address = "2", DataType = DataTypeEnum.Int16, FunctionCode = 4, StationNumber = 1 })
这个是批量读取,我是想写入数值,功能码是16的话该怎么写?
批量写入暂时没提供。
但是功能码16不是应该可以写入多个寄存器?
我想用modbustcp在一个地址的连续两个寄存器分开写两个值,请问是如何写入?实例好像都是写一个值