automatic gear-stage change is possible following an SPOS operation. In order for an automatic
change in gear stage to be performed, the spindle must be in speed-control mode.
Note
If gearbox stage 2 is selected at a spindle speed of 800 rpm, then the switching thresholds for
the maximum and minimum speed must be configured in the relevant machine data of the
second gear-stage data block (see the examples below).
2.9.11.4 Example: Application of the second gear-stage data block
The switching thresholds of the second gear-stage data block for the maximum and minimum
speed are evaluated for G331/G332 and when programming an S value for the active master
spindle. Automatic M40 gear-stage change must be active. The gear stage as determined in the
manner described above is compared with the active gear stage. If they are found to be
different, then the gearbox stage is changed.
Program code Comment
N05 M40 S500 ; Programmed spindle speed: 500 rpm
...
N50 G331 S800 ; Master spindle: Gearbox stage 2 is selected
N55 SPOS=0 ; Position the spindle
N60 G331 Z-10 K5 ; Tapping
; Spindle acceleration from second gearbox stage data block 2
2.9.11.5 Example: Speed is not programmed, the gearbox stage is monitored
If no speed is programmed when using the second gearbox stage data block with G331, then
the last speed programmed will be used to produce the thread. The gear stage does not
change. However, monitoring is performed in this case to check that the last speed
programmed is within the preset speed range (defined by the maximum and minimum speed
thresholds) for the active gear stage. Otherwise, alarm 16748 is output.
Program code Comment
N05 M40 S800 ; Programmed spindle speed: 800 rpm
...
N55 SPOS=0 ; Position the spindle
N60 G331 Z-10 K5 ; Tapping
; Monitoring the spindle speed, 800 rpm
; Gearbox stage 1 is active
; Gearbox stage 2 should be active => Alarm 16748
Fundamentals
2.9 Motion commands
NC programming
242 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0