Skip to main content

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.

ItemValue
opc_typeFINS
Implementation classplantpulse.driver.protocol.fins.FINSDriver
Library(none — in-house implementation. OMRON W342/W421)
readGood (Memory Area Read 0101)
writeGood (Memory Area Write 0102)
Default port9600
SecurityNone

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 = 0 Auto-Assign Request, =1 Auto-Assign Response, =2 FINS frame send
  • length = number of bytes from command to 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

Areaword codebit code
CIO0xB00x30
W (Work)0xB10x31
H (Holding)0xB20x32
A (Auxiliary)0xB30x33
D (DM)0x820x02
Timer / Counter PV0x890x09 (completion flag)

wordAreaCode(char) / bitAreaCode(char) performs the conversion.


OPC Registration Options (options)

KeyMeaningDefault
dnaDestination Network Address0
da2Destination Unit0
snaSource Network Address0
sa2Source Unit0
connect-timeoutms3000
read-timeoutms3000

Tag Address Format

NotationMeaning
D100DM 100 (16-bit word)
D100.05 or D100/5Bit 5 of DM 100
H0.05Holding bit
CIO10CIO word
W50Work word

format keywords (uppercase):

formatMeaning
X / BITbit
W / WORDsigned 16
UI / UW / UWORDunsigned 16
DW / DWORDsigned 32 (low word first)
UDW / DUW / UDWORDunsigned 32
LW / LWORDsigned 64
REAL / FLOATIEEE 32-bit
LREAL / DOUBLEIEEE 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/

ClassTests
FINSDriverTest38

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