FOCAS (Fanuc Open CNC API Specification) is the library Fanuc provides for reading and writing controller data over Ethernet. It is a C library with a long list of functions — cnc_rdspeed for spindle and feed, cnc_rdprgnum for the active program, cnc_rdalmmsg for alarms, cnc_rdparam for parameters — and it is the most direct path to a Fanuc control.
There are three practical routes. FOCAS directly gives you everything and requires the library, a licence for it, and a host that can load it. An MTConnect adapter in front of FOCAS is the common production pattern: the adapter handles the library, and you consume ordinary HTTP and XML. OPC UA is available on newer controls and avoids FOCAS entirely, at the cost of a different model to map.
The trap is not the API — it is what comes out of it. In the corpus, Fanuc spindle speed appears under 29 distinct spellings: ACT SP SPEED(RPM), ACTSPSPEED [1/min], SPRPM (1/min), Sp Rpm_min-1 and more, because the adapter author chose the label, not Fanuc. Feed rate is worse — 53 spellings, and several encode the unit in the name, so mm/min and in/min arrive under names that differ by three characters and by a factor of 25.4.
So whichever route you take, plan for the mapping layer as a first-class part of the project rather than a config file. Forge's Fanuc pack alone holds 759 deterministic mappings for exactly this reason.
The library is licensed by Fanuc rather than freely redistributable, which is a large part of why the MTConnect-adapter route is so common in production.
Yes — via an MTConnect adapter that speaks FOCAS on the machine side, or via the OPC UA server on newer controls.
Because the adapter author picks the label, not the controller. Fanuc exposes a function call; whoever wrote the adapter decided what to call the result, and every integrator decided differently.