Gear changing of spindles (M40 - M45)

Changing of the spindle transmission is programmed with M40...M45. These M-functions define max. six gear stages.

The M-functions can be programmed together with the spindle speed and the M-function for the direction of rotation in the same NC-block. Functions M40 to M45 are used to select the gear stage and to trigger mechanical gear change.

Syntax:

M40 | M41 | M42 | M43 | M44 | M45 [ <spindle_name><expr> ] [ M03 | M04 ] (modal)

M40 to M45 Gear stages 1 to 6

<spindle_name><expr>Spindle speed consisting of spindle name in accordance with[1]and mathematical expression

Programming example

S800 M41 M03    (Speed 800 U/min, gear range 2,
rotation cw)

Extract from channel parameters list [1]:

m_synch[1] 0x00000001 MOS 
m_synch[2] 0x00000002 MVS_SVS
:
m_synch[40] 0x00000002 MVS_SVS
m_synch[41] 0x00000002 MVS_SVS
m_synch[42] 0x00000002 MVS_SVS
m_synch[43] 0x00000002 MVS_SVS
m_synch[44] 0x00000002 MVS_SVS
m_synch[45] 0x00000002 MVS_SVS
m_synch[48] 0x00000008 MNS_SNS
m_synch[49] 0x00000002 MVS_SVS
:
:
main_spindle_gear_change        1   0: OFF  1: ON
:
: 
spindel[0].range_way 0 0:bottom up 1: top down
#
spindel[0].range_table[0].min_speed 50 (M40)
spindel[0].range_table[0].max_speed 560 (M40)
spindel[0].range_table[1].min_speed 400 (M41)
spindel[0].range_table[1].max_speed 800 (M41)
spindel[0].range_table[2].min_speed 700 (M42)
spindel[0].range_table[2].max_speed 3500 (M42)
spindel[0].range_table[3].min_speed 3501 (M43)
spindel[0].range_table[3].max_speed 4000 (M43)
spindel[0].range_table[4].min_speed 3800 (M44)
spindel[0].range_table[4].max_speed 5500 (M44)
spindel[0].range_table[5].min_speed 5400 (M45)
spindel[0].range_table[5].max_speed 7000 (M45)
#
:

Programming example

: 
spindel[0].autom_range 1
:
NC-program:
S650 M03 OK, M41 ⇒ SPS
S750 OK, no changing , M41 already selected
S950 OK, automatic changing , M42 ⇒ SPS
S1050 OK, no changing, M42 already selected
S750 OK, automatic changing, M41 ⇒ SPS
S500 OK, no changing, M41 already selected
S350 OK, no changing, M41 already selected
S8000 Error, speed too high
A programmed gear stage is always checked:
M41 S750 OK, " automatic" changing , M41 ⇒ SPS

..but

M40 S750 Error, wrong gear stage 

Programming example

: 
spindle[0].autom_range 0
:
NC-program:
M41 S650 M03 OK, M41 ⇒ SPS
M41 S750 OK, no changing , M41 already selected
M42 S950 OK, changing, M42 ⇒ SPS
M42 S1050 OK, no changing , M42 already selected
M41 S750 OK, changing , M41 ⇒ SPS
M41 S500 OK, no changing, M41 already selected
M41 S350 OK, no changing, M41 already selected
M41 S200 Error, program different gear stage (M40)
S950 Error, no gear stage (M42) programmed