MelsecA3CNet1OverTcpWriteHelper 方法 (String, Byte, Byte, FuncByte, Byte, OperateResultByte) |
批量写入PLC的数据,以字为单位,也就是说最少2个字节信息,支持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 WriteHelper(
string address,
byte[] value,
byte station,
Func<byte[], byte, OperateResult<byte[]>> readCore
)
Public Shared Function WriteHelper (
address As String,
value As Byte(),
station As Byte,
readCore As Func(Of Byte(), Byte, OperateResult(Of Byte()))
) As OperateResult
public:
static OperateResult^ WriteHelper(
String^ address,
array<unsigned char>^ value,
unsigned char station,
Func<array<unsigned char>^, unsigned char, OperateResult<array<unsigned char>^>^>^ readCore
)
static member WriteHelper :
address : string *
value : byte[] *
station : byte *
readCore : Func<byte[], byte, OperateResult<byte[]>> -> OperateResult
参数
- address
- 类型:SystemString
地址信息 - value
- 类型:SystemByte
数据值 - station
- 类型:SystemByte
当前PLC的站号信息 - readCore
- 类型:SystemFuncByte, Byte, OperateResultByte
通信的载体信息
返回值
类型:
OperateResult是否写入成功
参见