Omron FINS protocol stack for Elixir — client and PLC-simulator server, over TCP (FINS/TCP) and UDP (FINS/UDP). Supports the I/O memory commands (0101 read, 0102 write, 0103 fill, 0104 multiple read) with word and bit access on CIO/WR/HR/AR/DM/TIM/CNT areas (CS/CJ/CP series).
If available in Hex, the package can be installed
by adding finex to your list of dependencies in mix.exs:
def deps do
[
{:finex, "~> 0.1.0"}
]
end# UDP (default FINS port 9600)
{:ok, pid} = Finex.Udp.Client.start_link(ip: {192, 168, 250, 1})
:ok = Finex.Udp.Client.connect(pid)
{:ok, [w0, w1]} = Finex.Udp.Client.read(pid, "D100", 2)
:ok = Finex.Udp.Client.write(pid, {:dm, 200}, [0xABCD])
# TCP (handshake and node negotiation are automatic)
{:ok, pid} = Finex.Tcp.Client.start_link(ip: {192, 168, 250, 1})
:ok = Finex.Tcp.Client.connect(pid)
{:ok, [bit]} = Finex.Tcp.Client.read(pid, "CIO20.05", 1)
# PLC simulator for tests
{:ok, server} = Finex.Udp.Server.start_link(port: 9600)Design and protocol references: docs/superpowers/specs/2026-08-27-finex-fins-design.md.