AllenBradleyNetReadAsync 方法 (String, UInt16) |
读取指定地址的二进制数据内容,长度为地址长度,一般都是1,除非读取数组时,如果需要强制使用 片段读取功能码,则地址里携带 x=0x52; 或是 x=82; 则强制使用片段读取。
Read the binary data content of the specified address, the length is the address length, generally 1, unless the array is read, if you need to force the fragment reading function code,
the address carries x=0x52; or x=82; then the fragment read is forced.
命名空间:
HslCommunication.Profinet.AllenBradley
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public override Task<OperateResult<byte[]>> ReadAsync(
string address,
ushort length
)
Public Overrides Function ReadAsync (
address As String,
length As UShort
) As Task(Of OperateResult(Of Byte()))
public:
virtual Task<OperateResult<array<unsigned char>^>^>^ ReadAsync(
String^ address,
unsigned short length
) override
abstract ReadAsync :
address : string *
length : uint16 -> Task<OperateResult<byte[]>>
override ReadAsync :
address : string *
length : uint16 -> Task<OperateResult<byte[]>>
参数
- address
- 类型:SystemString
Address format of the node - length
- 类型:SystemUInt16
In the case of arrays, the length of the array
返回值
类型:
TaskOperateResultByteResult data with result object
实现
IReadWriteNetReadAsync(String, UInt16)IReadWriteNetReadAsync(String, UInt16)备注
使用片段读取的时候,可以读取一些数量量非常大的地址,例如一个结构体标签有100_000个字节长度的时候。
When using fragment reading, you can read a very large number of addresses, such as when a struct tag is 100_000 bytes long.
参见