Releases: Dimo4ka174/FanucConsole
Releases · Dimo4ka174/FanucConsole
Release list
v1.0.0 — First public release
First stable release.
What this is
A console test harness for FANUC CNC controllers via the FOCAS Ethernet API. Connects to one or more machines, reads a fixed set of status registers, and optionally writes each poll to PostgreSQL.
Published as a reference for anyone wiring the FOCAS C API into .NET — the SDK is barely documented, and clean C# wrappers are rare.
Highlights
- One
IFocasNativeinterface, two platform implementations (FocasNativeWindows/FocasNativeLinux), picked at runtime. - Correct calling convention per platform (
stdcallon Windows,cdeclon Linux) — the #1 source of hard-to-debug crashes in FOCAS integrations. - Struct marshaling mirrors
fwlib32.hexactly, includingunionfields via[StructLayout(LayoutKind.Explicit)]. - Twelve status registers per poll.
- Optional PostgreSQL persistence (five tables).
- Docker Compose and
maketargets.
Native libraries
The FANUC FOCAS SDK is not included — it's FANUC's property and can't be redistributed. See NativeLibs/README.md for how to obtain it.
Tested on
- Windows 10 (x86 process,
Fwlib32.dll) - Linux (x64 process,
libfwlib32.so, inside Docker)
Three FANUC CNCs, all over Ethernet. Observations from that bench are in docs/focas-errors.md — including the EW_HANDLE behaviour and the registers that weren't available on those models.
Known limitations
EW_HANDLE (-8)after ~5–6 seconds on the tested machines; the service reconnects once per cycle.- No unit tests — behaviour against a real CNC can't be mocked faithfully.