点击或拖拽改变大小

FreedomTcpNetReadAsync 方法 (String, UInt16)

批量读取字节数组信息,需要指定地址和长度,返回原始的字节数组
Batch read byte array information, need to specify the address and length, return the original byte array

命名空间:  HslCommunication.Profinet.Freedom
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.0.0.0 (12.0.0.0)
语法
public override Task<OperateResult<byte[]>> ReadAsync(
	string address,
	ushort length
)

参数

address
类型:SystemString
数据地址
length
类型:SystemUInt16
数据长度

返回值

类型:TaskOperateResultByte
带有成功标识的byte[]数组

实现

IReadWriteNetReadAsync(String, UInt16)
备注
length没有任何意义,需要传入原始的字节报文,例如:stx=9;00 00 00 00 00 06 01 03 00 64 00 01,stx得值用于获取数据移除的前置报文头,可以不填写
length has no meaning, you need to pass in the original byte message, for example: stx=9;00 00 00 00 00 06 01 03 00 64 00 01, the value of stx is used to obtain the preamble header for data removal, can be left blank
参见