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)
- The decoded functions M40 to M45 are modal and are activated at the start of a block. M40 to M45 cancel each other.
- The system allows definition of max. six spindle gear stages (M40... M45). The minimum and maximum speeds are defined for each gear stage in a "table of speed ranges" in [1]-21 (unit = rpm).
- The maximum speed for the 10 V output in the case of closed-loop position-controlled spindles is defined in the case of analog drives via the Multi-Gain-factor [2]-2.
- On a system with automatic selection of the gear stage, this is determined solely by programming the speed S. M40 to M45 then do not need to be programmed.
- M40 to M45 can be programmed only in the case of the closed-loop position-controlled spindles.
- The NC-kernel always attempts to minimize gear changing (if, for instance, a new speed can be used with the current gear stage, gear change is suppressed even if this has been explicitly programmed with M40 to M45).
Extract from channel parameters list [1]:
- Definition of the M-functions M40 - M45 and definition of the synchronization modes.
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
:
- Activating gear change:
:
main_spindle_gear_change 1 0: OFF 1: ON
:
- Configuring the spindle transmission (search direction, speed ranges):
:
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
- Automatic gear stage determination: ON
:
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
- Automatic gear stage determination: OFF
:
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