| 程序包 | 说明 |
|---|---|
| HslCommunication.Profinet.Keyence | |
| HslCommunication.Profinet.Melsec | |
| HslCommunication.Profinet.Melsec.Helper | |
| HslCommunication.Profinet.Panasonic |
| 限定符和类型 | 类和说明 |
|---|---|
class |
KeyenceMcAsciiNet
基恩士PLC的数据通信类
|
class |
KeyenceMcNet
基恩士PLC的数据通信类
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
MelsecMcAsciiNet
三菱PLC通讯类,采用Qna兼容3E帧协议实现,需要在PLC侧先的以太网模块先进行配置,必须为ASCII通讯格式
|
class |
MelsecMcAsciiUdp |
class |
MelsecMcNet
三菱PLC通讯类,采用Qna兼容3E帧协议实现,需要在PLC侧先的以太网模块先进行配置,必须为二进制通讯
Mitsubishi PLC communication class is implemented using Qna compatible 3E frame protocol. |
class |
MelsecMcRNet
三菱的R系列的MC协议,支持的地址类型和
MelsecMcNet 有区别,详细请查看对应的API文档说明 |
class |
MelsecMcUdp
三菱PLC通讯类,采用UDP的协议实现,采用Qna兼容3E帧协议实现,需要在PLC侧先的以太网模块先进行配置,必须为二进制通讯
Mitsubishi PLC communication class is implemented using UDP protocol and Qna compatible 3E frame protocol. |
| 限定符和类型 | 方法和说明 |
|---|---|
static OperateResult |
McHelper.ErrorStateReset(IReadWriteMc mc)
LED 熄灭 出错代码初始化
LED off Error code initialization |
static OperateResultExOne<byte[]> |
McHelper.Read(IReadWriteMc mc,
String address,
short length)
初步支持普通的数据地址之外,还额外支持高级的地址写法,以下是示例(适用于MC协议为二进制和ASCII格式):
[商业授权] 扩展的数据地址: 表示为 ext=1;W100 访问扩展区域为1的W100的地址信息 [商业授权] 缓冲存储器地址: 表示为 mem=32 访问地址为32的本站缓冲存储器地址 [商业授权] 智能模块地址:表示为 module=3;4106 访问模块号3,偏移地址是4106的数据,偏移地址需要根据模块的详细信息来确认。 |
static OperateResultExOne<boolean[]> |
McHelper.ReadBool(IReadWriteMc mc,
String address,
short length)
当读取的长度过大时,会自动进行切割,对于二进制格式,切割长度为7168,对于ASCII格式协议来说,切割长度则是3584
也支持对D100.0 这种地址进行位访问的功能
|
static OperateResultExOne<byte[]> |
McHelper.ReadExtend(IReadWriteMc mc,
short extend,
String address,
short length)
[商业授权] 读取扩展的数据信息,需要在原有的地址,长度信息之外,输入扩展值信息
[Authorization] To read the extended data information, you need to enter the extended value information in addition to the original address and length information |
static OperateResultExOne<byte[]> |
McHelper.ReadMemory(IReadWriteMc mc,
String address,
short length)
[商业授权] 读取缓冲寄存器的数据信息,地址直接为偏移地址
[Authorization] Read the data information of the buffer register, the address is directly the offset address 本指令不可以访问下述缓冲存储器: 1. |
static OperateResultExOne<String> |
McHelper.ReadPlcType(IReadWriteMc mc)
读取PLC的型号信息,例如 Q02HCPU
Read PLC model information, such as Q02HCPU |
static OperateResultExOne<byte[]> |
McHelper.ReadRandom(IReadWriteMc mc,
String[] address)
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。
|
static OperateResultExOne<byte[]> |
McHelper.ReadRandom(IReadWriteMc mc,
String[] address,
short[] length)
随机读取PLC的数据信息,可以跨地址,跨类型组合,每个地址是任意的长度。
|
static OperateResultExOne<short[]> |
McHelper.ReadRandomInt16(IReadWriteMc mc,
String[] address)
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。
|
static OperateResultExOne<int[]> |
McHelper.ReadRandomUInt16(IReadWriteMc mc,
String[] address)
随机读取PLC的数据信息,可以跨地址,跨类型组合,但是每个地址只能读取一个word,也就是2个字节的内容。
|
static OperateResultExOne<byte[]> |
McHelper.ReadSmartModule(IReadWriteMc mc,
short module,
String address,
short length)
[商业授权] 读取智能模块的数据信息,需要指定模块地址,偏移地址,读取的字节长度
[Authorization] To read the extended data information, you need to enter the extended value information in addition to the original address and length information |
static OperateResultExOne<byte[]> |
McBinaryHelper.ReadTags(IReadWriteMc mc,
String[] tags,
short[] length)
读取PLC的标签信息,需要传入标签的名称,读取的字长度,标签举例:A; label[1]; bbb[10,10,10]
To read the label information of the PLC, you need to pass in the name of the label, the length of the word read, and an example of the label: A; label [1]; bbb [10,10,10] |
static OperateResult |
McHelper.RemoteReset(IReadWriteMc mc)
远程Reset操作
Remote Reset Operation |
static OperateResult |
McHelper.RemoteRun(IReadWriteMc mc)
远程Run操作
Remote Run Operation |
static OperateResult |
McHelper.RemoteStop(IReadWriteMc mc)
远程Stop操作
Remote Stop operation |
static OperateResult |
McHelper.Write(IReadWriteMc mc,
String address,
boolean[] values) |
static OperateResult |
McHelper.Write(IReadWriteMc mc,
String address,
byte[] value) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
PanasonicMcNet |
Copyright © 2022. All rights reserved.