Fanuc Part Counters
Overview
Part counters play a few important roles when using Chatter:
- Track parts output
- Enable prediction of production completion time
- Signal to Chatter that a machine is being set up
Part Counter Variables
Fanuc part counters are tied to the following macro variables:
Chatter Description | Fanuc Description | Variable # |
---|---|---|
Part Count | PART COUNT | #3901 |
Part Goal | PART REQUIRED | #3902 |
Accessing Part Counter Variables via the Control
To access your part counter variables, first press the OFFSET / SETTING
hardkey, then press the SETTING
softkey, and finally press PAGE DOWN
until you see the page with the part count variables.
You can edit these values by selecting the input field, typing in the desired value, and pressing INPUT
.

Incrementing the Part Counter Variables via G-Code Macros
You can increment the part counter at the end of the program by adding the following lines before the M30
or M99
command:
%
O1000 (PART COUNTER EXAMPLE);
(YOUR PROGRAM);
#3901 = #3901 + 1; (Increment the part count by 1)
M30;
%
For programs that produce multiple parts per cycle, you can change the + 1
to the number of parts produced in the cycle.
Modifying your Post Processor
We recommend modifying your post processor to automatically increment the part counter at the end of each program to ensure consistent behavior across programs and avoid manual editing of G-code. In a typical post, you'll just add the following lines before the M30
or M99
command:
#3901 = #3901 + 1;
If your post processor allows for exposing custom settings to the post UI, consider adding an option for multiple part incrementing as shown in this blog post. The technique demonstrated in Fusion 360 is applicable to other CAM systems as well.
Configure Auto-Incrementing
Depending on the builder, machines may be shipped configured to automatically increment the part counter on specific M-codes (e.g. M30
or M02
). Below are the parameters you can edit to enable or disable this feature.
Relevant Parameters
The auto-incrementing behavior is defined by two parameters:
Parameter 6700 Bit 0 (PCM
): Controls which M-codes increment the part counter.
- 0:
M02
,M30
, or an M-code specified by parameter No.6710 will increment the part counter. - 1: Only M code specified by parameter No.6710 (if not set to
0
) will increment the part counter.
Parameter 6710: Specifies the M-code that increments the part counter. When this is set to 0
, it is disabled.
In plain English, if you want the part counter to increment automatically, set parameter 6700 BIT 0
to 1, and set parameter 6710
to 0. If you want completely disable automatic incrementing of the part counter so that it can be managed solely via macro variables, set parameter 6700 BIT 0
to 1
, and set parameter 6710
to 0
.
Our Recommendation
We recommend completely disabling automatic incrementing of the part counter, so that it can be managed solely via macro variables. This gives you explicit control over the part count, and allows you to handle cycles with multiple parts in the same way you handle cycles with a single part.
The settings for this configuration are as follows:
Parameter | Value |
---|---|
6700 BIT 0 | 1 |
6710 | 0 |
Be sure to note that in Fanuc parameters, bits are sequenced from right to left, starting at 0. Bit 0 is the rightmost of the 8 bits.
Editing Parameters
To edit Fanuc parameters, first disable the parameter lock by pressing the SETTING
hardkey, then press PAGE DOWN
until you see PARAMETER WRITE
, and set the value to 1
. Next, press the SYSTEM
hardkey and navigate to PARAMETER
on the right.
Then, navigate to parameter 6700
by typing 6700
on the keypad, and press the NO. SRH
softkey to locate the relevant parameter.
Once you've made your desired changes, be sure to re-enable the parameter lock by setting PARAMETER WRITE
back to 0
.
