OMRON FINS Driver
Overview
OMRON FINS over TCP. A self-contained Java implementation built solely from the wire spec in OMRON's official manuals (W342, W421), with no dependency on external libraries or external processes.
| Item | Value |
|---|---|
opc_type | FINS |
| Implementation class | plantpulse.driver.protocol.fins.FINSDriver |
| Library | (none — in-house implementation. OMRON W342/W421) |
| read | Good (Memory Area Read 0101) |
| write | Good (Memory Area Write 0102) |
| Default port | 9600 |
| Security | None |
Classes / Structure
FINSDriver (BaseProtocolDriver)
├── Socket — host:9600
├── clientNode/serverNode — connect() 의 Auto-Assign 응답에서 획득
├── sid — 0~255 순환 (요청-응답 매칭, 0 회피)
├── ParsedAddr — areaChar, wordAddr, bit
├── putBeInt / beInt — 4-byte big-endian helper
└── memAreaRead / memAreaWrite — synchronized
On connect(), client/server nodes are issued via FINS/TCP Node Address Auto-Assign (CIP cmd=0).
Wire Format Summary
CIP header (16 bytes, big-endian)
'F' 'I' 'N' 'S' | length(4) | command(4) | error(4)
command = 0Auto-Assign Request,=1Auto-Assign Response,=2FINS frame sendlength= number of bytes fromcommandto the end
FINS header (10 bytes)
ICF | RSV | GCT | DNA | DA1 | DA2 | SNA | SA1 | SA2 | SID
0x80 0x00 0x02 <dn> <sn> <du> <sn> <cn> <su> <sid>
ICF=0x80: response required- DA1 = server node, SA1 = client node (result of auto-assign)
Memory Area Read (MRC=01 SRC=01)
01 01 | area(1) | addrHi addrLo | bit | countHi countLo
Response = FINS header (10) + 01 01 + MRES(1) SRES(1) + data.
Memory Area Codes
| Area | word code | bit code |
|---|---|---|
| CIO | 0xB0 | 0x30 |
| W (Work) | 0xB1 | 0x31 |
| H (Holding) | 0xB2 | 0x32 |
| A (Auxiliary) | 0xB3 | 0x33 |
| D (DM) | 0x82 | 0x02 |
| Timer / Counter PV | 0x89 | 0x09 (completion flag) |
wordAreaCode(char) / bitAreaCode(char) performs the conversion.
OPC Registration Options (options)
| Key | Meaning | Default |
|---|---|---|
dna | Destination Network Address | 0 |
da2 | Destination Unit | 0 |
sna | Source Network Address | 0 |
sa2 | Source Unit | 0 |
connect-timeout | ms | 3000 |
read-timeout | ms | 3000 |
Tag Address Format
| Notation | Meaning |
|---|---|
D100 | DM 100 (16-bit word) |
D100.05 or D100/5 | Bit 5 of DM 100 |
H0.05 | Holding bit |
CIO10 | CIO word |
W50 | Work word |
format keywords (uppercase):
| format | Meaning |
|---|---|
X / BIT | bit |
W / WORD | signed 16 |
UI / UW / UWORD | unsigned 16 |
DW / DWORD | signed 32 (low word first) |
UDW / DUW / UDWORD | unsigned 32 |
LW / LWORD | signed 64 |
REAL / FLOAT | IEEE 32-bit |
LREAL / DOUBLE | IEEE 64-bit |
BIN[n] | Extract bit n of a word |
32/64-bit multi-word values follow the OMRON convention: low word first.
Supported / Not Supported
- ✅ Memory Area Read / Write (MRC=01 SRC=01/02)
- ✅ Bit / Word / DWord / LWord / Float / Double
- ✅ FINS/TCP Auto-Assign handshake
- ❌ Multiple Memory Area Read (MRC=01 SRC=04)
- ❌ Program Area / Parameter Area / Clock commands
- ❌ FINS over UDP
Test Coverage
test/java/plantpulse/driver/protocol/fins/
| Class | Tests |
|---|---|
FINSDriverTest | 38 |
38 tests in total — address parsing, area code mapping, word decoding, handshake simulation, and more.
References
- OMRON W342 FINS Communications Reference Manual
- OMRON W421 CS/CJ Series Communications Commands Reference
- Code:
src/plantpulse/driver/protocol/fins/FINSDriver.java