/ docs / src / gcode / other-code.txt
other-code.txt
 1  [[cha:other-codes]]
 2  
 3  = Other Codes
 4  
 5  [[sec:set-feed-rate]]
 6  == F: Set Feed Rate
 7  (((F: Set Feed Rate)))
 8  
 9  'Fx' - set the feed rate to 'x'.  'x' is usually in machine units
10  (inches or millimeters) per minute.
11  
12  The application of the feed rate is as described in the
13  <<sub:feed-rate,Feed Rate>> Section, unless 'inverse time feed rate mode'
14  or 'feed per revolution mode' are in effect, in which case the feed rate
15  is as described in the <<gcode:g93-g94-g95,G93 G94 G95>> Section.
16  
17  [[sec:set-spindle-speed]]
18  == S: Set Spindle Speed
19  (((S: Set Spindle Speed)))
20  
21  'Sx [$n]' - set the speed of the spindle to 'x' revolutions per minute (RPM)
22  with the optional $ set the spindle speed for a specific spindle. Without the $
23  all spindles will be set at the S speed.
24  
25  The spindle(s) or selected spindle will turn at that speed when a 'M3' or 'M4'
26  is in effect. It is OK to program an S word whether the spindle is turning or
27  not. If the speed override switch is enabled and not set at 100%, the speed will
28  be different from what is programmed. 
29  
30  It is OK to program S0, the spindle will not turn if that is done.
31  
32  It is an error if:
33  
34  * the S number is negative.
35  
36  [[sec:select-tool]]
37  == T: Select Tool
38  (((T: Select Tool)))
39  
40  'Tx' - prepare to change to tool 'x'.
41  
42  The tool is not changed until an 'M6' is programmed (see Section
43  <<mcode:m6,M6>>). The T word may appear on the same line as the
44  'M6' or on a previous line. It is OK if T words appear on two or more
45  lines with no tool change. Only the the most recent T word will take
46  effect at the next tool change.
47  
48  NOTE: When LinuxCNC is configured for a nonrandom toolchanger (see
49  the entry for RANDOM_TOOLCHANGER in the <<sec:emcio-section,EMCIO
50  Section>>), 'T0' gets special handling: no tool will be selected. This
51  is useful if you want the spindle to be empty after a tool change.
52  
53  NOTE: When LinuxCNC is configured for a random toolchanger (see
54  the entry for RANDOM_TOOLCHANGER in the <<sec:emcio-section,EMCIO
55  Section>>), 'T0' does not get any special treatment: T0 is a valid
56  tool like any other.  It is customary to use T0 on a random toolchanger
57  machine to track an empty pocket, so that it behaves like a nonrandom
58  toolchanger machine and unloads the spindle.
59  
60  It is an error if:
61  
62  * a negative T number is used,
63  
64  * T number is used that does not appear in the tool table file (with
65      the exception that T0 on nonrandom toolchangers *is* accepted,
66      as noted above).
67  
68  On some machines, the carousel will move when a T word is programmed,
69  at the same time machining is occurring. On such machines, programming
70  the T word several lines before a tool change will save time. A common
71  programming practice for such machines is to put the T word for the
72  next tool to be used on the line after a tool change. This maximizes
73  the time available for the carousel to move.
74  
75  Rapid moves after a 'T<n>' will not show on the AXIS preview until after
76  a feed move. This is for machines that travel long distances to change
77  the tool like a lathe. This can be very confusing at first. To turn
78  this feature off for the current tool program a G1 without any
79  move after the 'T<n>'.
80  
81  // vim: set syntax=asciidoc: