InovanceAMTcpReadAsync 方法 (String, UInt16) |
按字读取汇川PLC的数据信息,对于AM400_800的情况,可以输入MW0,MW100,对于AM600而言,还支持SDW0,SDW100地址数据
Read Huichuan PLC's data information by word. For the case of AM400_800, you can enter MW0 and MW100. For AM600, it also supports SDW0 and SDW100 address data.
命名空间:
HslCommunication.Profinet.Inovance
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:10.0.0.0 (10.0.0.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
PLC的真实的地址信息,对于AM400_800的情况,可以输入MW0,MW100,对于AM600而言,还支持SDW0,SD2100地址数据 - length
- 类型:SystemUInt16
读取的数据的长度,按照字为单位
返回值
类型:
TaskOperateResultByte包含是否成功的结果对象信息
实现
IReadWriteNetReadAsync(String, UInt16)IReadWriteNetReadAsync(String, UInt16)参见