K1: Mode group, channel, program operation, reset response
9.15 Replacing functions by subprograms
Basic Functions
650 Function Manual, 09/2011, 6FC5397-0BP40-2BA0
9.15.3.2 Replacement of M40 - M45 (gear stage change)
Function
When a coupling is active, the commands for gear stage change (M40, M41 ... M45) of the leading spindle are
replaced by calling a user-specific subprogram.
Parameterization
Activation
• MD30465$MA_AXIS_LANG_SUB_MASK, bit 0 = 1
Time that the subprogram is called
• M40
The time of the call cannot be set. The replacement subprogram is always called at the block start.
• M41 ... M45
The call time depends on the configured output behavior of the auxiliary function to the PLC (see below
MD22080):
- Output before or during motion: Subprogram call at the start of the block.
- Output after motion: Subprogram call at the end of the block
MD22080 $MC_AUXFU_PREDEF_SPEC[12 ... 16] (output behavior for M41 ... M45)
System variable to transfer information
The replacement subroutine is provided with all of the information relevant to the functions programmed in the
block via system variables (see Chapter "System variable [Page 652]"). The data refer exclusively to the block, in
which the function to be replaced has been programmed.
Bit Value Meaning
5 1 Output of the auxiliary function before the motion
6 1 Output of the auxiliary function during the motion
7 1 Output of the auxiliary function after the motion