点击或拖拽改变大小

SiemensS7NetWriteWStringAsync 方法

使用双字节编码的方式,将字符串以 Unicode 编码写入到PLC的地址里,可以使用中文。
Use the double-byte encoding method to write the character string to the address of the PLC in Unicode encoding. Chinese can be used.

命名空间:  HslCommunication.Profinet.Siemens
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public Task<OperateResult> WriteWStringAsync(
	string address,
	string value
)

参数

address
类型:SystemString
起始地址,格式为I100,M100,Q100,DB20.100 -> Starting address, formatted as I100,mM100,Q100,DB20.100
value
类型:SystemString
字符串的值

返回值

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