AllenBradleyNetWriteAsync 方法 (String, Boolean) |
写入单个Bool的数据信息。如果读取的是单bool变量,就直接写变量名,如果是bool数组的一个值,一律带下标访问,例如a[0]
Write the data information of a single Bool. If the read is a single bool variable, write the variable name directly,
if it is a value of the bool array, it will always be accessed with a subscript, such as a[0]
命名空间:
HslCommunication.Profinet.AllenBradley
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public override Task<OperateResult> WriteAsync(
string address,
bool value
)
Public Overrides Function WriteAsync (
address As String,
value As Boolean
) As Task(Of OperateResult)
public:
virtual Task<OperateResult^>^ WriteAsync(
String^ address,
bool value
) override
abstract WriteAsync :
address : string *
value : bool -> Task<OperateResult>
override WriteAsync :
address : string *
value : bool -> Task<OperateResult>
参数
- address
- 类型:SystemString
标签的地址数据 - value
- 类型:SystemBoolean
bool数据值
返回值
类型:
TaskOperateResult是否写入成功
实现
IReadWriteNetWriteAsync(String, Boolean)IReadWriteNetWriteAsync(String, Boolean)备注
如果写入的是类型代号 0xC1 的bool变量或是数组,直接使用标签名即可,比如:A,A[10],如果写入的是类型代号0xD3的bool数组的值,则需要使用地址"i="开头,例如:i=A[10]
If you write a bool variable or array of type code 0xC1, you can use the tag name directly, such as: A,A[10],
if you write the value of a bool array of type code 0xD3, you need to use the address" i=" at the beginning, for example: i=A[10]
参见