Part Counters


Whenever the core executes a M30 (or whatever M code is specified in parameter 6710) in a G code file (not in MDI), it updates the part counter data. 

The MachMotion screen has some DROs tied to these pieces of information. When the part counters change, the screen should automatically update. The screen also modifies part counter data when Reset is pressed (zeroing the part count if it exceeds the number of required parts).

G Code programs (as well as UserGUIModule functions) can modify the part counter data as well.

MachMotion 1.0.10253 (2018-05-15)

    • Mach 4 version (2018-05-15; shipped with MachMotion 1.0.10253)
    • Mach 4, version (2018-05-06; first revision with new behavior)

Part counter data is saved in system parameters and mirrored in the corresponding pound variables.

Parameter # Name Description
6700 PV_PRTCNTL Setting to 1 only allows M code specified by #6710 to increment part count. (default 0)
6710 PV_PRTINCM Set to a M code that will incremnt part counts with or without M02 and M30 according to #6700.
6711 PV_PRTSA R/W: Total number of parts. Will change/reflect #3901 as well. (cleared on file load).
6712 PV_PRTST R/W: Total number of parts machined.
6713 PV_PRTSN R/W: Number of required parts Will change/reflect #3902 as well.

In order for Mach system parameters to really "exist" (i.e. can hold a value), the parameters file (Mach4\Profiles\<profile>\parameters.ini) must exist and have entries in it for the parameters you want to exist. When one of these parameters changes, Mach internally updates the legacy pound variables (described below).

MachMotion 1.0.10151 (2018-05-10)

    • Mach 4, version (2018-02-07)

In all versions of Mach 4 up to, part counter data was accomplished using pound variables.

Pound Var# Name Description
3901 SV_PRTSA R/W: Total number of parts machined for the file. (cleared on file load).
3902 SV_PRTSN R/W: Number of required parts
3903 SV_PRTST R/W: Total number of parts machined for the machine.


Part Counter Needs Reset After Each Part


If a customer calls in saying their part counter always has to be reset after each part, you will need to look at the parameters .ini file.

Go to C:->Mach4->Profiles->Mill

Open open parameters.ini file

You will want to look for parameter number 6713.  Typically with this issue the Value is set to some random number.  Type needs to be set to 2 and Value needs to be set to 0.