The part counter is the most-used number a CNC control keeps — and the easiest to get quietly wrong. It counts program endings, not good parts.
What makes it count
Most controls increase the counter when the program reaches its end — typically M30 (program end and rewind) or M02, or a specific M-code the control is set to count on. Many controls also hold a target count next to it, the number of parts the job needs.
Some shops don’t use the built-in counter at all. Instead, the program adds one to a macro variable at the end of each part, which gives full control over what counts.
Why the count can be wrong
Program loops with M99 instead of ending with M30
- What happens to the count
- Never increases
Multi-part fixture (several parts per cycle)
- What happens to the count
- Counts one per cycle, not per part
Prove-out or dry run
- What happens to the count
- Counts parts that were never made
Operator resets or edits the counter
- What happens to the count
- Jumps or drops
Rejected part
- What happens to the count
- Still counted — the counter knows nothing about quality
| Situation | What happens to the count |
|---|---|
| Program loops with M99 instead of ending with M30 | Never increases |
| Multi-part fixture (several parts per cycle) | Counts one per cycle, not per part |
| Prove-out or dry run | Counts parts that were never made |
| Operator resets or edits the counter | Jumps or drops |
| Rejected part | Still counted — the counter knows nothing about quality |
The counter is a record of program endings. Good-part numbers need rejects subtracted on top — see FPY.
Turning counts into cycle time
ThingConnect reads the counter directly from the controller — or, where a shop counts with a macro variable, reads that variable instead. Each time the count goes up, a part is complete, and the time since the previous part becomes its cycle time. If one cycle makes two parts and the program adds two to the counter, both are credited, and parts per cycle can be set per part so the hourly target accounts for it.
If the connection drops and the count has jumped by several when it returns, those parts are not credited as one impossibly fast cycle — the gap is flagged instead of trusted.
