点击或拖拽改变大小

ModbusTcpNet.ReadWrite 方法

使用0x17功能码来实现同时写入并读取数据的操作,使用一条报文来实现,需要指定读取的地址,长度,写入的地址,写入的数据信息,返回读取的结果数据。
Use 0x17 function code to write and read data at the same time, and use a message to implement it, you need to specify the read address, length, written address, written data information, and return the read result data.

命名空间:  HslCommunication.ModBus
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.3.0.0 (12.3.0.0)
语法
public OperateResult<byte[]> ReadWrite(
	string readAddress,
	ushort length,
	string writeAddress,
	byte[] value
)

参数

readAddress
类型:System.String
读取的地址信息
length
类型:System.UInt16
读取的长度信息
writeAddress
类型:System.String
写入的地址信息
value
类型:System.Byte[]
写入的字节数据信息

返回值

类型:OperateResult<Byte[]>
读取的结果对象

实现

IModbus.ReadWrite(String, UInt16, String,Byte[])
参见