点击或拖拽改变大小

FujiSPHNetWriteAsync 方法 (String, Boolean)

批量写入位数据的方法,需要传入位地址,等待写入的boo[]数据,地址示例:M1.100.5,M3.1000.12,M10.1000.0
To write bit data in batches, you need to pass in the bit address and wait for the boo[] data to be written. Examples of addresses: M1.100.5, M3.1000.12, M10.1000.0

命名空间:  HslCommunication.Profinet.Fuji
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法
public override Task<OperateResult> WriteAsync(
	string address,
	bool[] value
)

参数

address
类型:SystemString
PLC的地址,示例:M1.100.5,M3.1000.12,M10.1000.0
value
类型:SystemBoolean
等待写入的bool数组

返回值

类型:TaskOperateResult
是否写入成功的结果对象

实现

IReadWriteNetWriteAsync(String, Boolean)
备注
[警告] 由于协议没有提供位写入的命令,所有通过字写入间接实现,先读取字数据,修改中间的位,然后写入字数据,所以本质上不是安全的,确保相关的地址只有上位机可以写入。
[Warning] Since the protocol does not provide commands for bit writing, all are implemented indirectly through word writing. First read the word data, modify the bits in the middle, and then write the word data, so it is inherently not safe. Make sure that the relevant address is only The host computer can write.
参见