MelsecFxSerialHelperWrite 方法 (IReadWriteDevice, String, Boolean, Boolean) |
根据指定的地址向PLC写入bool数组,数组的长度需要为16的倍数,以及地址的偏移地址也需要是16的倍数
命名空间:
HslCommunication.Profinet.Melsec.Helper
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.2.0.0 (12.2.0.0)
语法 public static OperateResult Write(
IReadWriteDevice plc,
string address,
bool[] value,
bool isNewVersion
)
Public Shared Function Write (
plc As IReadWriteDevice,
address As String,
value As Boolean(),
isNewVersion As Boolean
) As OperateResult
public:
static OperateResult^ Write(
IReadWriteDevice^ plc,
String^ address,
array<bool>^ value,
bool isNewVersion
)
static member Write :
plc : IReadWriteDevice *
address : string *
value : bool[] *
isNewVersion : bool -> OperateResult
参数
- plc
- 类型:HslCommunication.CoreIReadWriteDevice
PLC通信对象 - address
- 类型:SystemString
初始地址,支持的类型参考文档说明 - value
- 类型:SystemBoolean
bool数组值 - isNewVersion
- 类型:SystemBoolean
是否是新版的串口访问类
返回值
类型:
OperateResult是否写入成功
参见