MelsecMcNetWriteRandom 方法 |
随机字写入数据到PLC里,可以跨地址写入,指定一个字符串数组,一个地址需要对应2个字节,所以写入的字节长度为地址两倍。
Randomly write data into the PLC. It can be written across addresses. Specify a string array. One address needs to correspond to 2 bytes, so the length of the written bytes is twice the address.
命名空间:
HslCommunication.Profinet.Melsec
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.9.1.0 (12.9.1.0)
语法public OperateResult WriteRandom(
string[] address,
byte[] values
)
Public Function WriteRandom (
address As String(),
values As Byte()
) As OperateResult
public:
OperateResult^ WriteRandom(
array<String^>^ address,
array<unsigned char>^ values
)
member WriteRandom :
address : string[] *
values : byte[] -> OperateResult
参数
- address
- 类型:SystemString
所有的地址集合 - values
- 类型:SystemByte
[缺少 "M:HslCommunication.Profinet.Melsec.MelsecMcNet.WriteRandom(System.String[],System.Byte[])" 的 <param name="values"/> 文档]
返回值
类型:
OperateResult是否写入成功
参见