SiemensS7NetWriteAsync 方法 (String, String, Encoding) |
将指定的字符串写入到西门子PLC里面去,将自动添加字符串长度信息,方便PLC识别字符串的内容。
Write the specified string into Siemens PLC, and the string length information will be automatically added, which is convenient for PLC to identify the content of the string.
命名空间:
HslCommunication.Profinet.Siemens
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public override Task<OperateResult> WriteAsync(
string address,
string value,
Encoding encoding
)
Public Overrides Function WriteAsync (
address As String,
value As String,
encoding As Encoding
) As Task(Of OperateResult)
public:
virtual Task<OperateResult^>^ WriteAsync(
String^ address,
String^ value,
Encoding^ encoding
) override
abstract WriteAsync :
address : string *
value : string *
encoding : Encoding -> Task<OperateResult>
override WriteAsync :
address : string *
value : string *
encoding : Encoding -> Task<OperateResult>
参数
- address
- 类型:SystemString
数据地址,具体的格式需要参照类的说明文档 - value
- 类型:SystemString
写入的字符串值 - encoding
- 类型:System.TextEncoding
编码信息
返回值
类型:
TaskOperateResult是否写入成功
实现
IReadWriteNetWriteAsync(String, String, Encoding)参见