public class PanasonicHelper extends Object
| 构造器和说明 |
|---|
PanasonicHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
static OperateResultExTwo<String,Integer> |
AnalysisAddress(String address)
解析数据地址,解析出地址类型,起始地址
Parse the data address, resolve the address type, start address
|
static OperateResultExOne<byte[]> |
BuildReadCommand(int station,
String address,
int length)
创建批量读取触点的报文指令
Create message instructions for batch reading contacts
|
static OperateResultExOne<byte[]> |
BuildReadOneCoil(int station,
String address)
创建读取离散触点的报文指令
Create message instructions for reading discrete contacts
|
static OperateResultExOne<byte[]> |
BuildWriteCommand(int station,
String address,
byte[] values) |
static OperateResultExOne<byte[]> |
BuildWriteCommand(int station,
String address,
byte[] values,
short length)
创建批量读取触点的报文指令
Create message instructions for batch reading contacts
|
static OperateResultExOne<byte[]> |
BuildWriteOneCoil(int station,
String address,
boolean value)
创建写入离散触点的报文指令
Create message instructions to write discrete contacts
|
static int |
CalculateComplexAddress(String address)
位地址转换方法,101等同于10.1等同于10*16+1=161
Bit address conversion method, 101 is equivalent to 10.1 is equivalent to 10 * 16 + 1 = 161
|
static OperateResultExOne<Boolean> |
ExtraActualBool(byte[] response)
检查从PLC反馈的数据,并返回正确的数据内容
Check the data feedback from the PLC and return the correct data content
|
static OperateResultExOne<byte[]> |
ExtraActualData(byte[] response)
检查从PLC反馈的数据,并返回正确的数据内容
Check the data feedback from the PLC and return the correct data content
|
static String |
GetErrorDescription(int err)
根据错误码获取到错误描述
Get the error description text according to the error code
|
static String |
GetMcErrorDescription(int code)
根据MC的错误码去查找对象描述信息
|
static String |
GetStationString(int station) |
public static int CalculateComplexAddress(String address)
address - 地址信息public static OperateResultExTwo<String,Integer> AnalysisAddress(String address)
address - 数据地址public static String GetStationString(int station)
public static OperateResultExOne<byte[]> BuildReadOneCoil(int station, String address)
station - 站号信息address - 地址信息public static OperateResultExOne<byte[]> BuildWriteOneCoil(int station, String address, boolean value)
station - 站号信息address - 地址信息value - bool值数组public static OperateResultExOne<byte[]> BuildReadCommand(int station, String address, int length)
station - 站号信息address - 地址信息length - 数据长度public static OperateResultExOne<byte[]> BuildWriteCommand(int station, String address, byte[] values)
public static OperateResultExOne<byte[]> BuildWriteCommand(int station, String address, byte[] values, short length)
station - 设备站号address - 地址信息values - 数据值length - 数据长度public static OperateResultExOne<byte[]> ExtraActualData(byte[] response)
response - 反馈信号public static OperateResultExOne<Boolean> ExtraActualBool(byte[] response)
response - 反馈信号public static String GetErrorDescription(int err)
err - 错误代码public static String GetMcErrorDescription(int code)
code - 错误码Copyright © 2022. All rights reserved.