Fanuc CNC PMC Ladder Logic Editing and Keep Relay (K-Parameter) Configuration Guide
1. The Split Dual-Core Architecture of Fanuc CNC & PMC
Fanuc CNC systems isolate task execution into two asynchronous processors: 1. CNC Side (Motion Controller): Interprets G-code trajectories, interpolates contour paths, and manages digital servo loop closures. 2. PMC Side (Programmable Machine Controller): Operates as an integrated industrial PLC managing peripheral machine hardware: coolant pumps, hydraulic chucks, chip conveyors, safety guards, and automatic tool changers (ATC). Both environments exchange handshake words continuously across predefined dual-port memory maps.
2. Standard Fanuc PMC Address Nomenclature
| Register Prefix | Signal Direction | Engineering Definition | Physical Field Device Example |
|---|---|---|---|
| X (e.g. X0004.2) | Machine -> PMC | Physical 24VDC discrete field inputs | Operator pushbuttons, proximity limits, door switches, foot pedals |
| Y (e.g. Y0002.0) | PMC -> Machine | Physical 24VDC discrete field driver outputs | Pneumatic solenoid coils, motor contactors, stack lights |
| F (e.g. F0001.0) | CNC -> PMC | <strong>Status telemetry dispatched from CNC to PMC ladder</strong> | Axis motion flags, active M-code strobe signals, feedrate overrides |
| G (e.g. G0008.5) | PMC -> CNC | <strong>Control interlocks dispatched from PMC ladder to CNC</strong> | Cycle Start commands, Feed Hold, Emergency Stop, axis interlocks |
| R (e.g. R0100.0) | Internal Relay | Volatile internal ladder scratchpad bit memory | Combinatorial intermediate ladder logic flags |
| K (e.g. K0005.2) | Keep Relay | <strong>Non-volatile battery-backed configuration registers</strong> | Machine tool builder option bits (Door interlock bypass, ATC modes) |
3. Toggling Machine Features via Keep Relays (K-Parameters)
Machine builders (Doosan, Mazak, Victor, Hyundai WIA) embed optional subroutines in ladder logic, controlled via non-volatile Keep Relays (K-Parameters). Technicians can toggle these options directly via the CNC keypad without re-compiling source ladder files: Common K-Relay Implementations: - Door Interlock Setup Bypass (K0001.0): Permits manual spindle rotation and low-speed JOG axes while safety operator doors remain open during part edge-finding. - Continuous Chip Conveyor Run (K0003.5): Overrides M30 program-end logic, keeping chip augers running during part changeover. - Automated Machine Power Down (K0008.2): Trips main shunt trip circuit breakers upon un-attended completion of night shift cycles.
4. M-Code Decoding and Completion Handshakes (M10 Chuck Clamp)
// Standard M-Code Execution Sequence in Fanuc PMC Ladder:
// 1. Part program commands M10 -> CNC asserts Strobe Signal F0007.2 (MF)
// 2. Command byte F0010 loads binary value 10
// 3. Decoding logic validates value and asserts intermediate clamp flag:
[ F0007.2 (MF) ] --- [ SUB5 (DECB F0010, K10) ] ---------------- [ R0200.0 (M10 Flag) ]
// 4. Energize hydraulic solenoid valve:
[ R0200.0 ] ---------------------------------------------------- [ Y0004.1 (Chuck Clamp Sol) ]
// 5. Verify physical limit confirmation before signaling completion:
[ R0200.0 ] --- [ X0006.3 (Clamp Sensor Input) ] --------------- [ G0004.3 (FIN Strobe Signal) ]
// (Asserting FIN releases the CNC to advance to the next G-code block)Warning: Missing FIN Signal Causes Cycle Hangs
If a CNC halts mid-program during an M-code (e.g. M08 coolant or M10 chuck) without tripping an alarm, the controller is waiting indefinitely for FIN (Finish Signal G0004.3). Troubleshooting: Access `SYSTEM -> PMC DIAGNOSE -> STATUS` and probe the hardware confirmation input address. Failed pressure switches or misaligned magnetic reed sensors inhibit FIN assertions, freezing sequential execution.