SiemensS7NetReadString 方法 (String, Encoding) |
读取西门子的地址的字符串信息,这个信息是和西门子绑定在一起,长度随西门子的信息动态变化的
Read the Siemens address string information. This information is bound to Siemens and its length changes dynamically with the Siemens information
命名空间:
HslCommunication.Profinet.Siemens
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public OperateResult<string> ReadString(
string address,
Encoding encoding
)
Public Function ReadString (
address As String,
encoding As Encoding
) As OperateResult(Of String)
public:
OperateResult<String^>^ ReadString(
String^ address,
Encoding^ encoding
)
member ReadString :
address : string *
encoding : Encoding -> OperateResult<string>
参数
- address
- 类型:SystemString
数据地址,具体的格式需要参照类的说明文档 - encoding
- 类型:System.TextEncoding
自定的编码信息,一般ASCII即可,中文需要 Encoding.GetEncoding("gb2312")
返回值
类型:
OperateResultString带有是否成功的字符串结果类对象
备注
如果指定编码,一般ASCII即可,中文需要 Encoding.GetEncoding("gb2312")
参见