System variables for workpiece countingSystem variable Meaning$AC_REQUIRED_PARTS Number of workpieces to be produced (setpoint number of workpieces)In this counter the number of workpieces at which the actual workpiececount ($AC_ACTUAL_PARTS) will be reset to "0" can be defined.MD27880 can be used to activate the generation of the display alarm:"Channel %1 workpiece target = %2 reached"and of the channel-specific NC/PLC interface signal:DB21, DBX317.1 (workpiece target reached).$AC_TOTAL_PARTS Total number of completed workpieces (actual workpiece total)This counter specifies the total number of workpieces produced sincethe start time. The value is only automatically reset to "0" when thecontrol runs up with default values.$AC_ACTUAL_PARTS Number of completed workpieces (actual workpiece total)This counter registers the total number of workpieces produced sincethe start time. On condition that $AC_REQUIRED_PARTS > 0, thecounter is automatically reset to "0" when the required number of work‐pieces ($AC_REQUIRED_PARTS) is reached.$AC_SPECIAL_PARTS Number of workpieces selected by the userThis counter supports user-specific workpiece counts. An alarm can bedefined to be output when the setpoint number of workpieces is reached($AC_REQUIRED_PARTS). Users must reset the counter themselves.NoteAll workpiece counters are set to "0" when the control runs up with default values and can beread and written independent of their activation.ActivationThe workpiece counter is activated with the machine data:MD27880 $MC_PART_COUNTER (activation of workpiece counters)Bit Value Meaning0 1 $AC_REQUIRED_PARTS is active1 0 Alarm / signal output in case of: $AC_ACTUAL_PARTS = $AC_REQUIRED_PARTS1 Alarm / signal output in case of: $AC_SPECIAL_PARTS = $AC_REQUIRED_PARTS4 1 $AC_TOTAL_PARTS is active.5 0 $AC_TOTAL_PARTS is incremented by the value "1" through M02/M30.1 $AC_TOTAL_PARTS is incremented by the value "1" through the M command definedwith MD27882[0].6 0 $AC_TOTAL_PARTS is also active for program test / block search.7 1 $AC_TOTAL_PARTS is incremented by the value "1" upon a jump back with GOTOS.8 1 $AC_ACTUAL_PARTS is activeK1: Mode group, channel, program operation, reset response9.18 Program runtime / part counterBasic Functions648 Function Manual, 01/2015, 6FC5397-0BP40-5BA2