MelsecA3CNet1OverTcpReadHelper 方法 |
批量读取PLC的数据,以字为单位,支持读取X,Y,M,S,D,T,C,具体的地址范围需要根据PLC型号来确认
命名空间:
HslCommunication.Profinet.Melsec
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:10.1.0.0 (10.1.0.0)
语法 public static OperateResult<byte[]> ReadHelper(
string address,
ushort length,
byte station,
Func<byte[], byte, OperateResult<byte[]>> readCore
)
Public Shared Function ReadHelper (
address As String,
length As UShort,
station As Byte,
readCore As Func(Of Byte(), Byte, OperateResult(Of Byte()))
) As OperateResult(Of Byte())
public:
static OperateResult<array<unsigned char>^>^ ReadHelper(
String^ address,
unsigned short length,
unsigned char station,
Func<array<unsigned char>^, unsigned char, OperateResult<array<unsigned char>^>^>^ readCore
)
static member ReadHelper :
address : string *
length : uint16 *
station : byte *
readCore : Func<byte[], byte, OperateResult<byte[]>> -> OperateResult<byte[]>
参数
- address
- 类型:SystemString
地址信息 - length
- 类型:SystemUInt16
数据长度 - station
- 类型:SystemByte
当前PLC的站号信息 - readCore
- 类型:SystemFuncByte, Byte, OperateResultByte
通信的载体信息
返回值
类型:
OperateResultByte读取结果信息
参见