public class OmronHostLinkCModeOverTcp extends NetworkDeviceBase
| 限定符和类型 | 字段和说明 |
|---|---|
byte |
UnitNumber
PLC设备的站号信息
PLC device station number information |
WordLengthAlienSession, isPersistentConn, IsSocketError, isUseAccountCertificate, LogMsgFormatBinary, simpleHybirdLockCoreSocket, fileCacheSize, LogNet, TokenLogNet| 构造器和说明 |
|---|
OmronHostLinkCModeOverTcp() |
OmronHostLinkCModeOverTcp(String ipAddress,
int port) |
| 限定符和类型 | 方法和说明 |
|---|---|
static OperateResultExTwo<String,String> |
AnalysisAddress(String address,
boolean isBit,
boolean isRead)
解析欧姆龙的数据地址,参考来源是Omron手册第188页,比如D100, E1.100
Analyze Omron's data address, the reference source is page 188 of the Omron manual, such as D100, E1.100 |
static OperateResultExOne<byte[]> |
BuildReadCommand(String address,
short length,
boolean isBit)
根据读取的地址,长度,是否位读取创建Fins协议的核心报文
According to the read address, length, whether to read the core message that creates the Fins protocol |
static OperateResultExOne<byte[]> |
BuildWriteWordCommand(String address,
byte[] value)
根据读取的地址,长度,是否位读取创建Fins协议的核心报文
According to the read address, length, whether to read the core message that creates the Fins protocol |
static OperateResultExOne<String> |
GetModelText(String model)
获取model的字符串描述信息
|
protected INetMessage |
GetNewNetMessage()
获取一个新的消息对象的方法,需要在继承类里面进行重写
The method to get a new message object needs to be overridden in the inheritance class |
static byte[] |
PackCommand(byte[] cmd,
byte unitNumber)
将普通的指令打包成完整的指令
|
OperateResultExOne<byte[]> |
Read(String address,
short length)
批量读取字节数组信息,需要指定地址和长度,返回原始的字节数组
Batch read byte array information, need to specify the address and length, return the original byte array |
OperateResultExOne<boolean[]> |
ReadBool(String address,
short length)
|
OperateResultExOne<String> |
ReadPlcModel()
读取PLC的当前的型号信息
|
static OperateResultExOne<byte[]> |
ResponseValidAnalysis(byte[] response,
boolean isRead)
验证欧姆龙的Fins-TCP返回的数据是否正确的数据,如果正确的话,并返回所有的数据内容
|
OperateResult |
Write(String address,
boolean[] value)
|
OperateResult |
Write(String address,
byte[] value)
写入原始的byte数组数据到指定的地址,返回是否写入成功
Write the original byte array data to the specified address, and return whether the write was successful |
ReadBool, ReadCustomer, ReadDouble, ReadDouble, ReadFloat, ReadFloat, ReadInt16, ReadInt16, ReadInt32, ReadInt32, ReadInt64, ReadInt64, ReadString, ReadString, ReadUInt16, ReadUInt16, ReadUInt32, ReadUInt32, toString, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, WriteCustomer, WriteUnicodeString, WriteUnicodeStringAccountCertificate, ConnectClose, ConnectServer, ConnectServer, ExtraAfterReadFromCoreServer, ExtraOnDisconnect, GetAvailableSocket, getByteTransform, getConnectionId, getConnectTimeOut, getIpAddress, getPort, getReceiveTimeOut, getSleepTime, InitializationOnConnect, IpAddressPing, PackCommandWithHeader, ReadFromCoreServer, ReadFromCoreServer, ReadFromCoreServer, setByteTransform, setConnectionId, setConnectTimeOut, setIpAddress, SetLoginAccount, SetPersistentConnection, setPort, setReceiveTimeOut, setSleepTime, UnpackResponseContentCheckRemoteToken, CloseSocket, CreateSocketAndConnect, CreateSocketAndConnect, CreateSocketAndConnect, ReadStream, Receive, Receive, Receive, ReceiveAndCheckBytes, ReceiveByMessage, ReceiveByMessage, ReceiveBytesContentFromSocket, ReceiveBytesContentFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveFrameWebSocketPayload, ReceiveHslMessage, ReceiveMqttMessage, ReceiveRedisCommand, ReceiveRedisCommandString, ReceiveStringArrayContentFromSocket, ReceiveStringArrayContentFromSocket, ReceiveStringContentFromSocket, ReceiveStringContentFromSocket, ReceiveWebSocketPayload, Send, Send, SendAccountAndCheckReceive, SendBaseAndCheckReceive, SendBytesAndCheckReceive, SendStreamToSocket, SendStringAndCheckReceive, SendStringAndCheckReceive, ThreadPoolCheckTimeOut, WriteStream, WriteStreamFromSocketclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitReadFromCoreServerConnectClose, getConnectionId, setConnectionIdpublic OmronHostLinkCModeOverTcp()
public OmronHostLinkCModeOverTcp(String ipAddress, int port)
protected INetMessage GetNewNetMessage()
NetworkDoubleBaseGetNewNetMessage 在类中 NetworkDoubleBasepublic OperateResultExOne<byte[]> Read(String address, short length)
IReadWriteNetRead 在接口中 IReadWriteNetRead 在类中 NetworkDeviceBaseaddress - 数据地址length - 数据长度public OperateResult Write(String address, byte[] value)
IReadWriteNetWrite 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - 起始地址value - 写入值public OperateResultExOne<boolean[]> ReadBool(String address, short length)
IReadWriteNetBoolean 数组信息,需要指定地址和长度,返回 Boolean 数组Boolean array information, need to specify the address and length, return Boolean arrayReadBool 在接口中 IReadWriteNetReadBool 在类中 NetworkDeviceBaseaddress - 数据地址length - 数据长度public OperateResult Write(String address, boolean[] value)
IReadWriteNetWrite 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - 起始地址value - 写入值public OperateResultExOne<String> ReadPlcModel()
public static OperateResultExTwo<String,String> AnalysisAddress(String address, boolean isBit, boolean isRead)
address - 数据地址isBit - 是否是位地址isRead - 是否读取public static OperateResultExOne<byte[]> BuildReadCommand(String address, short length, boolean isBit)
address - 地址,具体格式请参照示例说明length - 读取的数据长度isBit - 是否使用位读取public static OperateResultExOne<byte[]> BuildWriteWordCommand(String address, byte[] value)
address - 地址,具体格式请参照示例说明value - 等待写入的数据public static OperateResultExOne<byte[]> ResponseValidAnalysis(byte[] response, boolean isRead)
response - 来自欧姆龙返回的数据内容isRead - 是否读取public static byte[] PackCommand(byte[] cmd,
byte unitNumber)
cmd - fins指令unitNumber - 站号信息public static OperateResultExOne<String> GetModelText(String model)
model - 型号代码Copyright © 2022. All rights reserved.