On a two-pallet machine, a monitoring system that reads the controller's run status counts the wait for the next pallet as cutting time. The pallet-change M-code is still executing, so the control reports "in cycle" until the swap can go ahead and the next pallet comes in. On one horizontal machining center we monitor, it added up to 30 hours in two weeks.
This post is about that one machine: what the wait looks like in the controller, what it did to the numbers, and how we changed the way it's recorded. It applies to any pallet-change machine on a FANUC control, but the details (which M-code, how the ladder holds it) depend on the machine builder, so treat this as the pattern to look for rather than a rule.
What the machine is actually doing during a pallet change
The pallet change is a short sequence inside a cycle, not a separate state. On a typical two-pallet horizontal, the operator unloads and reloads the outside pallet while the inside one is being cut. When the program reaches the pallet change, it issues an M-code; the ladder runs the changer, then the program carries on with the next pallet.
The catch is that the swap can't always go ahead straight away. If the next pallet isn't loaded yet, there is nothing to swap in, and on many machines the operator also has to press pallet-ready (or the equivalent) at the load station to say the outside pallet is clamped and safe to bring in. Until the swap can go ahead, the machine waits.
On the machine in this post, the pallet change sits inside a short macro: the M-code, a brief dwell, and a return to the main program. The M-code is M80, not M60. M60 is the pallet-change code you'll see most often in programs and forum threads, but codes outside FANUC's standard set are assigned by the machine builder, and this builder chose M80. That's the first thing to check on your own floor.
Why status monitoring reads the wait as "running"
When a FANUC control executes an M-code, it hands the code to the ladder (the PMC) and waits for a finish signal (FIN) before moving to the next block. Normally that takes a fraction of a second. During a pallet change, the ladder holds FIN back until the swap can go ahead and is done.
While it waits, the control is still in automatic operation: the program is running, it's just sitting on one block. Read the status over FOCAS and you get "automatic operation started", the same value you get while cutting. The usual mapping turns that value into running or in cycle: the widely used open-source FANUC driver for MTConnect reports it as ACTIVE and never looks at the M-function flag, and ours did the same until October. MTConnect even defines a WAIT state for a program held up by a secondary operation, but it only helps if the driver can tell the difference.
So the machine is in this state:
- the spindle may be stopped and nothing is being cut;
- the program is mid-cycle, sitting on the pallet-change block;
- the operator may be at the load station, on a break, or fetching the next fixture;
- the dashboard shows green.
A short wait is invisible and doesn't matter. A long one (the operator hasn't loaded the next part yet) is real idle time, and it's being recorded as production.
What it did to one machine's numbers
We measured it on a two-pallet horizontal machining center at a customer plant, using the same FOCAS data the dashboard already collects. Over the 14 days to 9 October 2026:
| Measure | Value |
|---|---|
| Pallet-change waits | 451 |
| Total time spent waiting | 30.2 hours |
| Median wait | 15 seconds |
| 90th percentile wait | about 9 minutes |
| Longest single wait | 4.4 hours |
The shape matters more than the total. Half the waits were 15 seconds or less, which is a normal swap. The total comes from the long tail: waits of several minutes, and a few of hours, where the next pallet simply wasn't ready. That is exactly the time a supervisor wants to see, and the dashboard was showing it as cutting.
Over the two months before the fix, about 65 hours of pallet waiting had been added into recorded cycle times, touching 2,014 of the machine's 2,026 cycles. Nearly every cycle on that machine was reporting longer than its real cut time. The waiting wasn't steady, either: almost half of those 65 hours fell in the last two weeks.
What it does to OEE (and why the total can hide it)
The obvious guess is "OEE comes out too high". The more accurate answer is that the total often doesn't move, but the breakdown does, and the breakdown is what tells you what to fix.
Here's a worked example. The 2.16 hours of waiting per day is from the machine above (30.2 hours over the 14 days to 9 October); the other numbers are illustrative, chosen to keep the arithmetic simple:
- Planned production time: 21 hours a day
- Parts made: 120, all good
- Ideal cycle time: 6 minutes a part, so 12 hours of ideal output
- Time the dashboard records as running: 16 hours, of which 2.16 hours is pallet waiting
| Pallet wait counted as running | Pallet wait counted as idle | |
|---|---|---|
| Run time | 16.0 h | 13.84 h |
| Availability (run ÷ planned) | 76.2% | 65.9% |
| Performance (ideal output ÷ run) | 75.0% | 86.7% |
| Quality | 100% | 100% |
| OEE | 57.1% | 57.1% |
| Average cycle time per part | 8.0 min | 6.9 min |
| Utilization (run ÷ planned) | 76.2% | 65.9% |
OEE is the same either way, because OEE comes down to good output against planned time, and neither of those changed. What changed is where the loss shows up:
- Counted as running, the machine looks well utilized but slow. The loss sits in performance, which points the team at feeds, speeds and programs.
- Counted as idle, the machine looks fast but often waiting. The loss sits in availability, which points the team at loading, staffing and fixture readiness, which is where it actually is.
Cycle time and utilization are wrong outright in the first column, and those are the numbers most plants quote day to day (more on what belongs inside a cycle time in the cycle time formula). If you're costing jobs from recorded cycle times, a pallet machine with this problem makes every job on it look more expensive than it is. (For how the three OEE factors fit together, see OEE calculation, step by step, or run your own numbers through the OEE calculator.)
The fix: tell the monitor which M-code means "waiting"
The fix is small once you know where to look. It needs two pieces of data the monitor already reads over FOCAS:
- The status says an M-code is waiting for its finish signal. FANUC's status read includes a flag for an M, S, T or B function in progress. On its own that only says the control is waiting on something.
- The executing block says which M-code. Read the block the control is currently executing and check it for the pallet-change code.
When both match, record that time as idle instead of running, and attach a label. We made the M-code a per-machine setting rather than a global rule, because it's builder-specific: M80 on this machine, possibly M60 or something else on the next, and nothing at all on a single-table machine.
Three things we learned building it:
- Only match the first line of the executing block. The control returns the next few blocks too (look-ahead). Matching the pallet M-code anywhere in what comes back gave us about 900 false hits, because M80 was a few lines ahead while the machine was still cutting.
- No extra read was needed. We considered reading the M-code from the signals the control passes to the ladder (the M-function strobe and code signals). It works, but the executing block already names the code, so it cost nothing extra to poll.
- A wait started by hand still counts. If the operator resets out of the pallet change and then runs the M-code in MDI to finish the swap, the control really is waiting on it, and it's recorded the same way.
Plain idle, or a pre-classified stop?
There was a real decision here, and it was the plant's to make, not ours. We had two alternatives planned:
- A dedicated downtime reason, applied automatically, so pallet waits land in their own bucket without anyone classifying them.
- A grace period, so the first few seconds of each wait count as a normal swap and only the excess counts as downtime.
The plant chose neither. They wanted the whole wait counted as ordinary idle, the same as any other stop, with a "Pallet change" note attached so the supervisor knows where the stop happened. Their reasoning: a pallet-change wait can happen for any of the reasons already on their downtime list, so a 4-hour wait with "pallet change" as its reason says nothing about why the machine waited. Left as plain idle, it gets a real reason from the operator, like any other stop.
Either choice is defensible. What isn't defensible is the default: counting it as cutting.
One practical consequence: the change isn't retroactive. From the day it went live, that machine's cycle times got shorter and its utilization dropped, because the numbers became accurate. If you make the same change, mark the date on your reports so nobody reads it as the machine suddenly getting worse.
How to check your own pallet machines
You can check this without any software change:
- Find the pallet-change M-code. It's in the machine builder's M-code list, or look at the pallet-change section of a program that runs on the machine.
- Watch one pallet change against the dashboard. Stand at the machine when the operator is slow to load the next pallet. If the screen stays green while nothing is cutting, you have this problem.
- Compare recorded cycle time with the cut time. Take one part's cycle time from the monitoring system and compare it with the program's cut time (or a stopwatch on a part where the next pallet was ready). A consistent gap, longer on some cycles than others, is the wait.
- Check that the pallet code is the first thing in the executing block when the machine is waiting. If it's buried inside a macro, the block you see may be the macro's line rather than the main program's call.
If your machines are on a FANUC control, the FANUC integration page covers what ThingConnect reads over FOCAS, and OEE for CNC machines covers how the three factors map onto a CNC floor.





