Spindle gear change (M40 - M45)

A spindle gear change is programmed with M40...M45. These M functions define max. 6 gear stages. A separate gear data record must be parameterised for each gear stage in the associated spindle axis list [AXIS].

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>..] [ M03 | M04 ]

modal

M40 to M45

Gear stages 1 to 6

<spindle_name>=<expr>

Spindle speed consisting of spindle name according to P-CHAN-00053 and speed value in [rpm].

Programing Example

prg_example

Spindle gear change (M40 - M45)

S800 M41 M03 ;Spindle speed 800, gear stage 2, rotation cw

Channel parameter 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)

#

:

Programing Example

prg_example

Spindle gear change (M40 - M45)

Automatic determination of the gear stage: ON

:

spindel[0].autom_range 1

:

NC program:

S650 M03                   OK, M41⇒ PLC

S750                       OK, no change, M41 already selected

S950                       OK, automatic change, M42=> PLC

S1050                      OK, no change, M42 already selected

S750                       OK, automatic change, M41=> PLC

S500                       OK, no change, M41 already selected    

S8000                      Error, speed too high

A programmed gear stage is always checked:

M41 S750                   OK, "automatic" change, M41=> PLC

...but

M40 S750                   Error, incorrect gear stage

Programing Example

prg_example

Spindle gear change (M40 - M45)

Automatic determination of the gear stage: OFF

:

spindel[0].autom_range 0

:

NC program:

M41 S650 M03                OK, M41 => PLC

M41 S750                    OK, no change, M41 already selected

M42 S950       OK, change, M42=> PLC

M42 S1050      OK, no change, M41 already selected

M41 S750       OK, change, M41=> PLC

M41 S500                    OK, no change, M41 already selected

M41 S200 Error, program different gear stage (M40)

S950       Error, no gear stage (M42) programmed