Spindle speed (S-word)
<spindle_name> [ = ] <speed> (modal)
<spindle_name> Spindle name in accordance with [1]-16
<speed> Mathematical expression for specifying the spindle speed
During configuration, the main spindle can be assigned a string in the channel parameters list [1]-18. In order to avoid ambiguities, there must be an equal’s sign in front of the speed entry after all spindle names with more than one character.
Values can be assigned directly or by means of parameters to the S-word, and decimal numbers are also allowed (REAL64 format).
We must distinguish between the following types of use in conjunction with the spindle M-functions in the case of the S-word:
- S-word in conjunction with M03, M04, M19:
If the S-word or the string used for it is programmed in conjunction with M03/M04 or M19, the value following the S-word is interpreted as the spindle speed and output to the spindle. - S-word in conjunction with M05:
The value following the S-word is accepted as the spindle speed in the work data in conjunction with M05, but it is not output to the spindle.
The S-word alone does not generate a movement in the NC-program. A spindle mode M03, M04, M19 must be known for this. Accordingly, programming M03, M04 and M19 does not cause movement until the S-word is set (> 0, analogous to G01, G02 and G03 in which traversing occurs only when the feedrate and the axes to be traversed have been specified).
In the case of a negative S-value, an error message is output. |
Programming example
Programming with Spindle S:
N10 S300 (Speed 300 U/min. is stored)
N20 M04 (Spindle rotation ccw with 300 U/min.)
N30 M03 S1000 (Spindle rotation cw with 1000 U/min.)
N40 S500 (M03 active, Spindle rotation cw with 500 U/min.)
N50 M05 S100 (Spindle stops, speed 100 U/min. is stored)
N60 M04 (Spindle rotation ccw mit 100 U/min.)
N70 M05 (Spindle stops)
N80 M30 (Program end)
Extract from channel parameters list [1]:
The synchronization mode must be defined spindle-specifically for the S-word. An error message is generated in the case of synchronization mode 0 (NO_SYNCH) since an S-word may not be ignored.
:
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
:
Programming example
N10 M03 S100 (Spindle rotation cw with 100 U/min.)
N20 M19 S.POS90 (With 100 U/min cw to position 90)
N30 M04 (Spindle rotation ccw with 100 U/min.)
N40 M19 S200 S.POS 180 (With 200 U/min ccw to position 180)
N50 M05 S150 (Spindle stops, speed 150 U/min. is stored)
N60 M19 S.POS=135 (Positioning with 150 U/min. with shortest)
(way to position 135.)
N70 M03 S300 (Spindle rotation cw with 300 U/min.)
N80 M19 S200 S.POS270 (With 200 U/min cw to position 270)
N90 M03 S400 S.POS45 (Spindle rotation cw with 400 U/min., )
(position 45 is stored)
N100 M19 (With 400 U/min. cw to position 45)
N110 M04 S800 (Spindle rotation ccw with 800 U/min.)
N120 S1200 (Spindle rotation ccw with 1200 U/min.)
N130 M5 (Spindle stops)
N140 M03 (Spindle rotation cw with 1200 U/min.)
N150 M19 (With 1200 U/min. cw to position 45)