public class OmronFinsUdp extends NetworkUdpDeviceBase
| 限定符和类型 | 字段和说明 |
|---|---|
byte |
DA1
PLC的节点地址,这个值在配置了ip地址之后是默认赋值的,默认为Ip地址的最后一位
PLC node address. |
byte |
DA2
PLC的单元号地址,通常都为0
PLC unit number address, usually 0 |
byte |
DNA
PLC的网络号地址,默认0x00
PLC network number address, default 0x00
|
byte |
GCT
网络层信息,默认0x02,如果有八层消息,就设置为0x07
Network layer information, default is 0x02, if there are eight layers of messages, set to 0x07
|
byte |
ICF
信息控制字段,默认0x80
Information control field, default 0x80
|
int |
ReadSplits
进行字读取的时候对于超长的情况按照本属性进行切割,默认500,如果不是CP1H及扩展模块的,可以设置为999,可以提高一倍的通信速度。
|
byte |
RSV
系统使用的内部信息
Internal information used by the system
|
byte |
SA1
上位机的节点地址,假如你的电脑的Ip地址为192.168.0.13,那么这个值就是13
The node address of the upper computer. |
byte |
SA2
上位机的单元号地址
Unit number and address of the computer |
byte |
SID
设备的标识号
Device identification number |
byte |
SNA
上位机的网络号地址
Network number and address of the computer |
WordLengthsimpleHybirdLockCoreSocket, fileCacheSize, LogNet, TokenLogNet| 构造器和说明 |
|---|
OmronFinsUdp() |
OmronFinsUdp(String ipAddress,
int port) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected byte[] |
PackCommandWithHeader(byte[] command)
对当前的命令进行打包处理,通常是携带命令头内容,标记当前的命令的长度信息,需要进行重写,否则默认不打包
|
OperateResultExOne<byte[]> |
Read(String[] address)
从欧姆龙PLC中读取多个地址的数据,返回读取结果,每个地址按照字为单位读取,地址格式为"D100","C100","W100","H100","A100"
|
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)
|
void |
setIpAddress(String ipAddress)
重写Ip地址的赋值的实现
|
String |
toString()
返回当前对象表示的字符串
Returns the string represented by the current object |
protected OperateResultExOne<byte[]> |
UnpackResponseContent(byte[] send,
byte[] response)
根据对方返回的报文命令,对命令进行基本的拆包,例如各种Modbus协议拆包为统一的核心报文,还支持对报文的验证
|
OperateResult |
Write(String address,
boolean[] values)
|
OperateResult |
Write(String address,
byte[] value)
写入原始的byte数组数据到指定的地址,返回是否写入成功
Write the original byte array data to the specified address, and return whether the write was successful |
ConnectClose, getByteTransform, ReadBool, ReadCustomer, ReadDouble, ReadDouble, ReadFloat, ReadFloat, ReadInt16, ReadInt16, ReadInt32, ReadInt32, ReadInt64, ReadInt64, ReadString, ReadString, ReadUInt16, ReadUInt16, ReadUInt32, ReadUInt32, setByteTransform, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, WriteCustomer, WriteUnicodeString, WriteUnicodeStringgetConnectionId, getIpAddress, getPort, getReceiveCacheLength, getReceiveTimeOut, ReadFromCoreServer, ReadFromCoreServer, setConnectionId, setPort, setReceiveCacheLength, setReceiveTimeOutCheckRemoteToken, 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, waitReadFromCoreServergetConnectionId, setConnectionIdpublic byte ICF
public byte RSV
public byte GCT
public byte DNA
public byte DA1
public byte DA2
public byte SNA
public byte SA1
public byte SA2
public byte SID
public int ReadSplits
public OmronFinsUdp(String ipAddress, int port)
public OmronFinsUdp()
public void setIpAddress(String ipAddress)
setIpAddress 在类中 NetworkUdpBaseipAddress - IP地址protected byte[] PackCommandWithHeader(byte[] command)
NetworkUdpBasePackCommandWithHeader 在类中 NetworkUdpBasecommand - 发送的数据命令内容protected OperateResultExOne<byte[]> UnpackResponseContent(byte[] send, byte[] response)
NetworkUdpBaseUnpackResponseContent 在类中 NetworkUdpBasesend - 发送的原始报文数据response - 设备方反馈的原始报文内容public OperateResultExOne<byte[]> Read(String address, short length)
IReadWriteNetRead 在接口中 IReadWriteNetRead 在类中 NetworkUdpDeviceBaseaddress - 数据地址length - 数据长度public OperateResultExOne<byte[]> Read(String[] address)
address - 从欧姆龙PLC中读取多个地址的数据,返回读取结果,每个地址按照字为单位读取,地址格式为"D100","C100","W100","H100","A100"public OperateResult Write(String address, byte[] value)
IReadWriteNetWrite 在接口中 IReadWriteNetWrite 在类中 NetworkUdpDeviceBaseaddress - 起始地址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 在类中 NetworkUdpDeviceBaseaddress - 数据地址length - 数据长度public OperateResult Write(String address, boolean[] values)
IReadWriteNetWrite 在接口中 IReadWriteNetWrite 在类中 NetworkUdpDeviceBaseaddress - 起始地址values - 写入值public String toString()
NetworkBasetoString 在类中 NetworkUdpDeviceBaseCopyright © 2022. All rights reserved.