SiemensWebApiWrite 方法 (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 OperateResult Write(
string address,
string value
)
Public Overrides Function Write (
address As String,
value As String
) As OperateResult
public:
virtual OperateResult^ Write(
String^ address,
String^ value
) override
abstract Write :
address : string *
value : string -> OperateResult
override Write :
address : string *
value : string -> OperateResult
参数
- address
- 类型:SystemString
标签的地址信息,例如 "全局DB".Static_21 - value
- 类型:SystemString
字符串数据信息
返回值
类型:
OperateResult是否成功写入
实现
IReadWriteNetWrite(String, String)参见