Fanuc PMC for Programmers

There are effectively three computers in a Fanuc-controlled machine: the CNC that interpolates your G-code, the machine itself (motors, solenoids, switches, pumps), and — sitting between them — the PMC. Fanuc's manuals define the PMC as “a programmable controller built into a CNC to perform sequence control for a machine tool (spindle rotation, tool change, machine operator's panel control, and so on).” Its ladder program is written by the machine tool builder, not by Fanuc and not by you — you can't touch it from a part program. But every M-code, every spindle command, every cycle start you issue passes through it, so knowing how to read the PMC is worth a day of downtime the first time a machine freezes mid-program with no alarm.

Three Computers in the Cabinet

The maintenance manual's basic-configuration figure is worth internalizing, because every address class in the next section is just a position on this diagram:

   CNC  <--- G ---  PMC   <--- X ---  MACHINE
--- F --->  (ladder,  --- Y --->  (switches,
your G-code       R/K/T/C/D)            solenoids,
runs here                               motors)

Your part program executes entirely in the left box. The right box is iron. Nothing crosses between them except through the middle box, running the builder's ladder — scanned continuously, thousands of times a minute, whether a program is running or not. When you press cycle start, that's an X input to the ladder, which decides whether to pass it to the CNC as a G signal. When your program says M8, that's an F signal to the ladder, which decides what "coolant on" physically means on this machine. The PMC is not optional plumbing; it is the machine's definition of itself.

The Signal Map: G, F, X, Y, R, K, D

Everything in the PMC is a signal at an address: a letter for the signal class, an address number (one per 8 signals), and a bit number 0–7 — X127.7 is bit 7 of input byte 127. The letters are the part people misremember, so here they are exactly as the ladder programming manual defines them. The mnemonic that makes G vs. F stick: the direction is named from the PMC's side — G goes toward the NC, F comes from the NC.

LetterManual definitionTypical rangeWhat it means to you
XSignal from the machine to the PMC (MT → PMC)X0–X127 (I/O Link)Real inputs: limit switches, pressure switches, probe, E-stop (*ESP is fixed at X8.4 on many models), tool-pot sensors
YSignal from the PMC to the machine (PMC → MT)Y0–Y127 (I/O Link)Real outputs: solenoids, contactors, stack lights, coolant pump
FSignal from the NC to the PMC (NC → PMC)F0–F511 (+F1000… per path)The CNC reporting its state: M-code strobes, "in cycle", "rewinding", alarm status
GSignal from the PMC to the NC (PMC → NC)G0–G511 (+G1000… per path)The ladder commanding the CNC: mode select, cycle start/feed hold, FIN, overrides, interlocks
RInternal relayR0–R999+ (R9000+ reserved for the PMC system)The ladder's scratch memory — intermediate logic lives here
AMessage request signalA0–A24/A124How the ladder raises the builder's own operator messages and machine alarms on the screen
KKeep relay (PMC parameter, non-volatile)K0–K19/K39 (K17–K19, K900+ reserved)The builder's option switches — survive power-off; this is the "set K5.2 to 1" the builder tells you about
TVariable timer (non-volatile)T0–T79/T299Adjustable time presets: lube intervals, clamp-confirm delays
CCounter (non-volatile)C0–C79/C199Counts things: parts, magazine position, lube shots
DData table (non-volatile)D0–D1859/D7999The builder's number storage: tool-pot tables, pallet data, setup values

Ranges vary by PMC model (PMC-SA1/SB5/SB6/NB… on legacy controls, PMC/PMC-L on 30i-era controls) — the table shows the common spans. The reserved areas are real: R9000+ and the top keep relays belong to the PMC system software, which is why a builder's K-relay list stops where it does. K, T, C, and D are all PMC parameters in non-volatile memory — they survive power-off and they're part of a proper machine backup.

Multi-path gotcha: on dual-path controls (most multi-turret lathes) each path gets its own copy of the CNC interface — path 1 on F0–/G0–, path 2 on F1000–/G1000–. If you're watching G4 for a FIN that path 2 owes, you're a thousand addresses too low.

Fixed X addresses: while the builder assigns most machine I/O freely, a handful of inputs are hard-wired in the NC's expectations because the CNC reads them directly — the ladder manual fixes the skip signal SKIP at X4.7, emergency stop *ESP at X8.4, and the reference-return deceleration switches *DEC1*DEC8 across X9 (Series 16/18 map). Handy when probing or homing misbehaves: those bits are watchable on any Fanuc without knowing anything about this particular ladder.

Why Your M-Code Waits

The operator's manual describes what an M-code actually does: “When a numeral is specified following address M, code signal and a strobe signal are sent to the machine. The machine uses these signals to turn on or off its functions.” Which M-code does what “is determined by the machine tool builder.” The full round trip, with the 30i address map:

CNC executes M8
1. CNC puts the value 8 on the code signals M00-M31   (F10-F13)
2. CNC raises the strobe MF                            (F7.0)
3. Ladder sees MF, decodes the code, does the work
(turns on the coolant output Y, waits for feedback X if the builder wants proof)
4. Ladder raises the completion signal FIN             (G4.3)
5. CNC drops the strobe, ladder drops FIN, next block runs

Every M-code the CNC sends is an open transaction until the ladder answers FIN. That is the single most common "machine is frozen" call: the program sits mid-block, cycle start LED lit, status STRT, distance-to-go zero, no alarm — the maintenance manual's own words for this state are “the system may sometimes seem to be at a halt, although no alarm has occurred.” The CNC isn't hung; it's waiting, exactly as designed, for a FIN that isn't coming. From each side it looks like:

SideWhat you seeWhat it means
OperatorIn cycle, M-code displayed, nothing moving, no alarmThe block can't complete without FIN — don't power-cycle yet, the evidence is still live
PMC signal screenMF (F7.0) still 1, FIN (G4.3) still 0The ladder is waiting on a machine condition — classically an X input that never came true (pressure not made, door switch, tool-pot sensor)
PMC signal screenMF is 1, ladder never reactedM-code the ladder has no rung for — some builders raise their own alarm for unknown codes, others just never answer

You can watch a healthy handshake happen: single-block an M8 with the PMC STATUS screen on F0007 and the MF bit blinks through the sequence. A few refinements the interface adds on top of the basic loop:

  • M98/M99 never reach the ladder. Subprogram and macro-call M-codes are consumed by the CNC itself — “the code and strobe signals are not sent” — so no ladder rung, and no FIN wait, is involved.
  • M00/M01/M02/M30 get dedicated decode signals (DM00, DM01, DM02, DM30 on F9), so the ladder can react to a program stop or end without decoding the binary code signals itself.
  • S, T, and B run the same handshake in parallel with their own strobes (SF, TF, BF beside MF on F7) and their own completion signals (SFIN, TFIN, BFIN on G5). A block like M6 T2 is two transactions, and the slow one sets the pace.
  • The auxiliary function lock signal AFL (G5) makes the control skip sending M/S/T/B entirely — worth knowing when “the machine ignores M-codes” turns out to be a panel switch someone left on.
  • A macro can skip waiting for FIN via bit 1 of #3003 (#_M_FIN) — powerful for overlapping an M-function with motion, and a great way to fool the next person reading the program.
  • A macro can also read which M code is in play: #4113 holds the modal M of the last buffered block and #4313 the M of the block actually executing — useful bookkeeping inside builder cycles.

Macros Talk to the Ladder: #1000–#1035 and #1100–#1135

Custom macros get a dedicated window into the interface: the UI/UO signals, mapped onto ordinary G and F addresses that the builder's ladder reads and writes like any other. The names are from the macro's point of view — UI is input to your macro (the ladder sets it, so it rides G addresses), UO is output from your macro (the ladder reads it, so it rides F addresses). Per the 30i-B Plus operator's manual:

VariableNameR/WSignalsPMC address
#1000#1031#_UI[n]RInterface input UI000–UI031, one bit eachG54–G57 (UI000–UI015 on G54/G55)
#1032#1035#_UIL[n]RUI000–UI031 / UI100–UI131 / UI200–UI231 / UI300–UI331 as 32-bit valuesUI100–UI131 on G276–G279
#1100#1131#_UO[n]R/WInterface output UO000–UO031, one bit eachUO000–UO015 on F54/F55
#1132#1135#_UOL[n]R/WUO000–UO031 / UO100–UO131 / … as 32-bit valuesUO100–UO131 on F56–F59

The semantics follow the direction: the #1000s are read-only in a macro (assigning to one raises an alarm — the ladder owns those bits), while the #1100s are read/write, so #1101 = 1 flips UO001 (F54.1), which the ladder can use to light a lamp, permit a fixture, or branch its own logic. None of these bits mean anything until the builder wires rungs to them: the UI/UO map is a contract between your macro and this machine's specific ladder. The worked example every fixture cell eventually needs — refuse to cut until the ladder confirms the clamp, and don't hang forever doing it:

(WAIT FOR CLAMP-CONFIRM FROM THE LADDER ON UI001, 5 SECOND LIMIT)
#3001 = 0                       (zero the millisecond timer)
WHILE [#1001 EQ 0] DO1          (UI001 = 0 : clamp not confirmed yet)
IF [#3001 GT 5000] THEN #3000 = 101 (CLAMP CONFIRM TIMEOUT)
END1
(CLAMPED - SAFE TO CUT)
#1100 = 1                       (UO000 : tell the ladder the cycle is committed)

The LONG variables read a whole signal group as one number, which is how a ladder hands a macro a value rather than a flag — a fixture ID, a pallet number, a gauge reading the builder latched onto the interface:

(CHECK THE FIXTURE ID THE LADDER PRESENTS ON UI000-UI031)
#500 = #1032                    (all 32 input bits read as one value)
IF [#500 NE 7] THEN #3000 = 102 (WRONG FIXTURE FOR THIS PROGRAM)

The timeout matters: without it, a stuck clamp switch turns your macro into exactly the silent no-alarm hang described above — except now it's your loop, not the FIN handshake, and nobody can see it on the PMC screen. Time out into a #3000 alarm that says what was being waited for. (See Fanuc System Variables for #3000 and #3001.)

Two caveats before trusting an interface read:

  • Look-ahead applies here too. The control buffers blocks ahead of the one executing, so a #1001 read in a straight-line program can be evaluated before the preceding motion finishes. Inside a WHILE loop the re-reads are live, but a one-shot read that must follow a motion needs the buffer drained first — the same G04 idiom covered in the system variables gotchas.
  • These are not general PMC pokes. The macro window is only UI/UO. A macro cannot read an arbitrary X input or write a Y output directly — if you need a machine signal, the builder has to mirror it onto a UI bit in the ladder first.

Try the wait-loop in the Macro Playground — pick the Fanuc control, set #1001 as a machine input, and flip it mid-run to release the loop.

Reading the PMC Screens

You don't need FAPT Ladder or a laptop to diagnose at the signal level — the display-side PMC screens ship on every control. On the 30i family: press the SYSTEM function key, page the soft keys with [+] until the PMC main menu appears, and take the PMC maintenance menu (the ladder and configuration menus sit beside it). The maintenance manual's screen map gives you, in order of usefulness:

ScreenSoft keyWhat it's for
Signal status[STATUS]Live bit display of any address — key in G0004 or X0008 and search. Eight bytes at a time with the builder's symbols next to the bits. This is where you watch MF and FIN during a hang
PMC alarm[PMC ALARM]The ER/WN ladder and I/O Link faults — separate from the CNC alarm screen
Keep relays[KEEP RELAY]Display and set K bits — the builder option switches. Legacy controls reach the same data via [PMCPRM][KEEPRL]
Timers / counters[TIMER] / [COUNTR]The T presets and C values the ladder uses — lube intervals and shot counts live here
Data table[DATA]The D words — tool-pot maps and builder setup numbers
Signal trace[TRACE]Records signal transitions over time — for intermittent faults too fast to watch on STATUS
I/O device monitor[I/O DEVICE]The state of the connected I/O Link devices — first stop when an entire block of inputs and outputs went dark at once

One free check before any of that: the PMC screen header itself displays the ladder execution status and a PMC alarm indicator (legacy screens show MONIT RUN in the corner). A ladder that reads STOP means nothing downstream will respond — no M-code, no cycle start, no panel button — and you've found your problem before touching a soft key.

On pre-30i controls (0/16/18/21, Power Mate) the same screens live under the PMC basic menu as [PMCDGN] (title, status, alarm, trace) and [PMCPRM] (timer, counter, keep relay, data table). Two cautions from the manuals: setting PMC parameters requires the usual write-enable (PWE or the program-protect key), and everything on these screens except STATUS and the alarm list is writable — when the builder says “set K5.2 to 1,” change that bit and nothing else. K relays turn whole machine behaviors on and off, and an undocumented one may be load-bearing.

What Lives in the Ladder on a Real Machine

The builder's ladder is where the machine's personality is implemented. On a typical machining center it carries, at minimum:

  • The tool-change sequence — magazine motor, pot up/down, arm, spindle orient permission, each step gated on X feedback before the next fires; the pot map lives in the D data table.
  • Pallet-changer logic — clamp/unclamp, rotation, seated-confirm, and the interlocks that keep a half-transferred pallet from meeting a rapid move.
  • Lube and chip-conveyor cycles — T variable timers and C counters; when lube interval "changed by itself," someone edited a T preset on the PMC parameter screen.
  • Safety interlocks and the operator's panel — door switches, clamp confirms, mode keys, and overrides all flow through the ladder into G-address signals before the CNC ever sees them.
  • Every custom M-code the machine answers — and the operator messages it raises through the A message-request addresses when something isn't right.

That's why “can we just add an M-code for the air blast?” is not a programming request: the CNC will happily send any M number, but nothing happens until a rung decodes it, drives a Y output, and answers FIN — and that rung is a machine-tool-builder ladder revision, tested and re-installed, not an edit to your program. The realistic self-serve alternatives are an existing spare M-code the builder already wired, or a macro driving a UO bit the ladder already watches.

When Diagnosis Points at the PMC

A workable escalation path when the machine stops and the usual program-side checks come up clean:

StepCheckLooking for
1Alarm screen, then the PMC alarm screenA CNC alarm decodes per Fanuc Alarms & Diagnostics; ER/WN here means the ladder or I/O Link itself is faulted
2Diagnostic display (DGN 000) if in-cycle and stalledWhich wait state the CNC is in — override at 0%, interlock, spindle speed arrival…
3PMC STATUS: the handshake signalsStrobe stuck on with no FIN (F7.0 vs. G4.3)? Then find what X input the ladder is waiting for — the machine side of that signal is usually the broken part
4PMC STATUS: the fixed X inputs*ESP (X8.4), skip, decel switches — a chattering E-stop channel or damaged switch shows up here first
5Keep relay audit against the builder's listA K bit changed since the last time the machine behaved — compare with your PMC parameter backup
6Call the builderWith the alarm text, the stuck signal addresses, and the K-relay diff in hand, the call is minutes instead of a site visit

Photograph the STATUS screen showing the stuck handshake before resetting or power-cycling — the signal state is the evidence, and a power cycle destroys it. And keep a current PMC-parameter backup (the timer/counter/keep-relay/data-table set) alongside the CNC parameter file; the K-relay audit in step 5 only works if there's a known-good copy to diff against.

See also: Fanuc Alarms & Diagnostics for the alarm prefix map and DGN screen numbers, Fanuc System Variables for the full #-number reference around #1000/#1100, Fanuc Parameters for the CNC-side (non-PMC) parameter system, and the Fanuc Series Guide for which PMC generation your control carries.

References

  • Fanuc / GE Fanuc, PMC-PA1/PA3/SA1/SA2/SA3/SA5/SB/SB2/SB3/SB4/SB5/SB6/SC/SC3/SC4/NB/NB2/NB6 Ladder Language Programming Manual, B-61863E/13 (GFZ-61863E), FANUC Corporation.
  • Fanuc, Series 30i/31i/32i-MODEL B Plus Operator’s Manual (Common to Lathe System/Machining Center System), B-64724EN/01, FANUC Corporation.
  • Fanuc, Series 30i/31i/32i-MODEL B Plus Maintenance Manual, B-64725EN/01, FANUC Corporation.

Have a question or want to contribute?

Contact us with corrections, additions, or topics you'd like covered.

Get in Touch