SiemensWebApiWriteAsync 方法 (String, String) |
将字符串信息写入到PLC中,需要指定数据标签名称,如果PLC指定了类型为WString,才支持写入中文,否则会出现乱码。
To write string information into the PLC, you need to specify the data tag name.
If the PLC specifies the type as WString, it supports writing in Chinese, otherwise garbled characters will appear.
命名空间:
HslCommunication.Profinet.Siemens
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public override Task<OperateResult> WriteAsync(
string address,
string value
)
Public Overrides Function WriteAsync (
address As String,
value As String
) As Task(Of OperateResult)
public:
virtual Task<OperateResult^>^ WriteAsync(
String^ address,
String^ value
) override
abstract WriteAsync :
address : string *
value : string -> Task<OperateResult>
override WriteAsync :
address : string *
value : string -> Task<OperateResult>
参数
- address
- 类型:SystemString
标签的地址信息,例如 "全局DB".Static_21 - value
- 类型:SystemString
字符串数据信息
返回值
类型:
TaskOperateResult是否成功写入
实现
IReadWriteNetWriteAsync(String, String)参见