Activating workpiece counters

The SINUMERIK control system can be configured to automatically accept the number of workpieces produced in Analyze MyPerformance /OEE Monitor. This data is evaluated and further processed in the "Production quality" window. SINUMERIK produces and counts the workpieces, and this is then accepted as a data input in Analyze MyPerformance.

The system variable $AC_TOTAL_PARTS in the SINUMERIK control system is used to count the number of workpieces produced.

System variable



Total number of workpieces produced (actual workpiece total) as from start time.

The value is only automatically reset to "0" when the control system runs up with default values.


The counter is not reset either by a RESET or by an HMI restart of the SINUMERIK control system.

The default procedure is that the value of the $AC_TOTAL_PARTS counter is incremented by 1 as soon as the end of the NC program is reached (M02 or M30 command). Other M commands can be configured as count pulses with the machine data.


Set the following bits of the machine data to activate and configure the workpiece counters for Analyze MyPerformance /OEE Monitor.


Activation of the workpiece counters

Bit 4 = 1

The counter $AC_TOTAL_PARTS is active

Bit 5 = 0

M02/M30 increments the $AC_TOTAL_PARTS counter by 1

Bit 5 = 1

The M command defined in MD27882[0] increments the $AC_TOTAL_PARTS counter by 1

Bit 6 = 0

$AC_TOTAL_PARTS is also active for program test / block search

Bit 7 = 1

A return with GOTOS increments the $AC_TOTAL_PARTS counter by 1

User-defined M commands for the count pulse are stored in MD27882[0].


Workpiece counting with user-defined M command


  1. Start the SINUMERIK Operate operating software on the controller.

  2. Press the "Setup", "" and "Channel MD" softkeys.

  3. Set the machine data MD27880 to the desired value.

    • Value for activating the counter: MD27880 $MC_PART_COUNTER ="10H"

  4. If necessary, set the machine data MD27882[0] to the desired value.

  5. Restart SINUMERIK Operate to activate the changes.