K1: Mode group, channel, program operation, reset response
9.16 Program runtime / Part counter
Basic Functions
670
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Workpiece counting with user-defined M command
If the corresponding bit is set in MD27880, then the count pulse can be triggered via a user-defined M command
instead of via the end of program
M2
/
M30
.
The M command code is defined with the machine data:
MD27882 $MC_PART_COUNTER_MCODE[<n>] (workpiece counting with user-defined M command)
The respective workpiece counter is incremented by "1", when a user-defined M command is called.
Boundary conditions
• Mode change / NC RESET
The counters are not affected by a mode change or NC RESET.
• $AC_REQUIRED_PARTS ≤ 0
Where $AC_REQUIRED_PARTS ≤ 0 and MD27880 $MC_PART_COUNTER bit 0 = 1, the counting
procedure and the identity comparison set with MD27880 are not conducted for all the activated counters.
Examples
• Activation of the workpiece counter $AC_REQUIRED_PARTS:
MD27880 $MC_PART_COUNTER = 'H3'
- $AC_REQUIRED_PARTS is active
- Display alarm at: $AC_REQUIRED_PARTS == $AC_SPECIAL_PARTS
• Activation of the workpiece counter $AC_TOTAL_PARTS:
MD27880 $MC_PART_COUNTER = 'H10'
MD27882 $MC_PART_COUNTER_MCODE[0] = 80
- $AC_TOTAL_PARTS is active; the counter is incremented by the value 1 with each
M02
.
- $MC_PART_COUNTER_MCODE[0] has no significance.
• Activation of the workpiece counter $AC_ACTUAL_PARTS:
MD27880 $MC_PART_COUNTER = 'H300'
MD27882 $MC_PART_COUNTER_MCODE[1] = 17
- $AC_TOTAL_PARTS is active; the counter is incremented by a value of "1" with each
M17
.
<n>
Significance
0
MD27882[0] defines the M command code, in which $AC_TOTAL_PARTS is incremented.
1
MD27882[1] defines the M command code, in which $AC_ACTUAL_PARTS is incremented.
2
MD27882[2] defines the M command code, in which $AC_SPECIAL_PARTS is incremented.