点击或拖拽改变大小

McHelper 类

MC协议的辅助类对象,提供了MC协议的读写操作的基本支持
继承层次
SystemObject
  HslCommunication.Profinet.Melsec.HelperMcHelper

命名空间:  HslCommunication.Profinet.Melsec.Helper
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public class McHelper

McHelper 类型公开以下成员。

构造函数
  名称说明
公共方法McHelper
初始化 McHelper 类的一个新实例
Top
方法
  名称说明
公共方法Equals (继承自 Object。)
公共方法静态成员ErrorStateReset
LED 熄灭 出错代码初始化
LED off Error code initialization
公共方法静态成员ErrorStateResetAsync
LED 熄灭 出错代码初始化
LED off Error code initialization
受保护的方法Finalize (继承自 Object。)
公共方法GetHashCode (继承自 Object。)
公共方法静态成员GetReadBoolLength
返回按照位单位读取的最低的长度信息
公共方法静态成员GetReadWordLength
返回按照字单位读取的最低的长度信息
公共方法GetType (继承自 Object。)
受保护的方法MemberwiseClone (继承自 Object。)
公共方法静态成员Read
批量读取字节数组信息,需要指定地址和长度,返回原始的字节数组
Batch read byte array information, need to specify the address and length, return the original byte array
公共方法静态成员ReadAsync
批量读取字节数组信息,需要指定地址和长度,返回原始的字节数组
Batch read byte array information, need to specify the address and length, return the original byte array
公共方法静态成员ReadBool(IReadWriteMc, String)
读取单个的Boolean数据信息
Read a single Boolean data message
公共方法静态成员ReadBool(IReadWriteMc, String, UInt16)
批量读取Boolean数组信息,需要指定地址和长度,返回Boolean 数组
Batch read Boolean array information, need to specify the address and length, return Boolean array
公共方法静态成员ReadBoolAsync
批量读取Boolean数组信息,需要指定地址和长度,返回Boolean 数组
Batch read Boolean array information, need to specify the address and length, return Boolean array
公共方法静态成员ReadExtend
[商业授权] 读取扩展的数据信息,需要在原有的地址,长度信息之外,输入扩展值信息
[Authorization] To read the extended data information, you need to enter the extended value information in addition to the original address and length information
公共方法静态成员ReadExtendAsync
[商业授权] 读取扩展的数据信息,需要在原有的地址,长度信息之外,输入扩展值信息
[Authorization] To read the extended data information, you need to enter the extended value information in addition to the original address and length information
公共方法静态成员ReadMemory
[商业授权] 读取缓冲寄存器的数据信息,地址直接为偏移地址
[Authorization] Read the data information of the buffer register, the address is directly the offset address
公共方法静态成员ReadMemoryAsync
[商业授权] 读取缓冲寄存器的数据信息,地址直接为偏移地址
[Authorization] Read the data information of the buffer register, the address is directly the offset address
公共方法静态成员ReadPlcType
读取PLC的型号信息,例如 Q02HCPU
Read PLC model information, such as Q02HCPU
公共方法静态成员ReadPlcTypeAsync
读取PLC的型号信息,例如 Q02HCPU
Read PLC model information, such as Q02HCPU
公共方法静态成员代码示例ReadRandom(IReadWriteMc, String)
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。收到结果后,需要自行解析数据
Randomly read PLC data information, which can be combined across addresses and types, but each address can only read one word, which is the content of 2 bytes. After receiving the results, you need to parse the data yourself
公共方法静态成员代码示例ReadRandom(IReadWriteMc, String, UInt16)
使用块读取PLC的数据信息,可以跨地址,跨类型组合,每个地址是任意的长度。收到结果后,需要自行解析数据,目前只支持字地址,比如D区,W区,R区,不支持X,Y,M,B,L等等
Read the data information of the PLC randomly. It can be combined across addresses and types. Each address is of any length. After receiving the results, you need to parse the data yourself. Currently, only word addresses are supported, such as D area, W area, R area. X, Y, M, B, L, etc
公共方法静态成员代码示例ReadRandomAsync(IReadWriteMc, String)
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。收到结果后,需要自行解析数据
Randomly read PLC data information, which can be combined across addresses and types, but each address can only read one word, which is the content of 2 bytes. After receiving the results, you need to parse the data yourself
公共方法静态成员代码示例ReadRandomAsync(IReadWriteMc, String, UInt16)
使用块读取PLC的数据信息,可以跨地址,跨类型组合,每个地址是任意的长度。收到结果后,需要自行解析数据,目前只支持字地址,比如D区,W区,R区,不支持X,Y,M,B,L等等
Read the data information of the PLC randomly. It can be combined across addresses and types. Each address is of any length. After receiving the results, you need to parse the data yourself. Currently, only word addresses are supported, such as D area, W area, R area. X, Y, M, B, L, etc
公共方法静态成员ReadRandomInt16
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。收到结果后,自动转换为了short类型的数组
Randomly read PLC data information, which can be combined across addresses and types, but each address can only read one word, which is the content of 2 bytes. After receiving the result, it is automatically converted to an array of type short.
公共方法静态成员ReadRandomInt16Async
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。收到结果后,自动转换为了short类型的数组
Randomly read PLC data information, which can be combined across addresses and types, but each address can only read one word, which is the content of 2 bytes. After receiving the result, it is automatically converted to an array of type short.
公共方法静态成员ReadRandomUInt16
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。收到结果后,自动转换为了ushort类型的数组
Randomly read PLC data information, which can be combined across addresses and types, but each address can only read one word, which is the content of 2 bytes. After receiving the result, it is automatically converted to an array of type ushort.
公共方法静态成员ReadRandomUInt16Async
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。收到结果后,自动转换为了ushort类型的数组
Randomly read PLC data information, which can be combined across addresses and types, but each address can only read one word, which is the content of 2 bytes. After receiving the result, it is automatically converted to an array of type ushort.
公共方法静态成员ReadSmartModule
[商业授权] 读取智能模块的数据信息,需要指定模块地址,偏移地址,读取的字节长度
[Authorization] To read the extended data information, you need to enter the extended value information in addition to the original address and length information
公共方法静态成员ReadSmartModuleAsync
[商业授权] 读取智能模块的数据信息,需要指定模块地址,偏移地址,读取的字节长度
[Authorization] To read the extended data information, you need to enter the extended value information in addition to the original address and length information
公共方法静态成员RemoteReset
远程Reset操作
Remote Reset Operation
公共方法静态成员RemoteResetAsync
远程Reset操作
Remote Reset Operation
公共方法静态成员RemoteRun
远程Run操作
Remote Run Operation
公共方法静态成员RemoteRunAsync
远程Run操作
Remote Run Operation
公共方法静态成员RemoteStop
远程Stop操作
Remote Stop operation
公共方法静态成员RemoteStopAsync
远程Stop操作
Remote Stop operation
公共方法ToString (继承自 Object。)
公共方法静态成员Write(IReadWriteMc, String, Boolean)
批量写入Boolean数组数据,返回是否成功
Batch write Boolean array data, return whether the write was successful
公共方法静态成员Write(IReadWriteMc, String, Byte)
写入原始的byte数组数据到指定的地址,返回是否写入成功
Write the original byte array data to the specified address, and return whether the write was successful
公共方法静态成员WriteAsync(IReadWriteMc, String, Boolean)
批量写入Boolean数组数据,返回是否成功
Batch write Boolean array data, return whether the write was successful
公共方法静态成员WriteAsync(IReadWriteMc, String, Byte)
写入原始的byte数组数据到指定的地址,返回是否写入成功
Write the original byte array data to the specified address, and return whether the write was successful
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见