Move spindle (M3/M4/M5)

M03

Spindle rotation clock wise (cw)

(modal)

M04

Spindel rotation counter clock wise (ccw)

(modal)

M05

Spindel stop

(modal)

The spindle M-functions M03 and M04 define the spindle direction of rotation and must be used in conjunction with the spindle speed (REV-word). M05 stops spindle rotation. Note that this spindle M-function is the default spindle mode after boot-up of the control system and the first time the program is started. These M-functions have a stopping action and may each be programmed only on their own within the bracketed expression.

Spindle rotation is activated if M03 or M04 has been programmed and a valid speed (REV) is set.

If no M05 is set at the end of the program, the spindle continues to rotate.

Programming example

Programming of one spindle „S“:

N10 S[REV1000] (Speed 1000 U/min. is stored, no spindle rotation)
(because M05 is default)
N20 S[M03] (Spindle rotation cw with 1000 U/min.)
N30 S[M04] (Spindle rotation ccw with 1000 U/min.)
N40 S[REV500] (Spindle rotation ccw with 500 U/min.)
N50 S[M05 REV300] (Spindle rotation, speed 300 U/min. is stored)
N60 S[M04] (Spindle rotation ccw with 300 U/min.)
N70 S[M05] (Spindle stops)
N80 S[M03 REV1000] (Spindle rotation cw with 1000 U/min.)
N90 M30 (Program end)

Programming example

Programming of two spindles „S“ and „S2“:

N10 S[M03 REV1000] S2[M04 REV2000] (S cw 1000 U/min., S2 ccw 2000 U/min.) 
N20 S[M05] S2[REV1500] (S stop, S2 ccw with 1500 U/min.)
N30 S[M04] (S ccw 1000 U/min.)
N40 S2[M05] (S2 stop)
N50 S[M05 REV300] (S stop, speed 300 U/min. is stored)
N60 S[M04] S2[M04] (S ccw 300 U/min., S2 ccw 1500 U/min.)
N70 S[M05] S2[M05] (S stop, S2 stop)
N80 M30 (Program end)

Extract from channel parameters list [1]:

The synchronization modes must be defined spindle-specifically for M3, M4, M5. The M-function is not executed in the case of synchronization mode “0” (NO_SYNCH).

: 
spindel[0].bezeichnung S1
spindel[0].log_achs_nr 6
spindel[0].s_synch 0x00000001
spindel[0].m3_synch 0x00000002
spindel[0].m4_synch 0x00000002
spindel[0].m5_synch 0x00000008
spindel[0].m19_synch 0x00000001
: