lathe-user.txt
1 [[cha:lathe-user-information]] 2 3 = Lathe User Information 4 5 == Lathe Mode 6 7 If your CNC machine is a lathe, there are some specific changes you 8 will probably want to make to your ini file in order to get the 9 best results from LinuxCNC. 10 11 If you are using the AXIS display, 12 have Axis display your lathe tools properly. 13 See the <<cha:ini-configuration,INI Configuration>> section for more details. 14 15 To set up AXIS for Lathe Mode. 16 17 --------------------------------------- 18 [DISPLAY] 19 20 # Tell the Axis Display our machine is a lathe. 21 LATHE = TRUE 22 --------------------------------------- 23 24 Lathe Mode in Axis does not set your default plane to G18 (XZ). You 25 must program that in the preamble of each gcode file or 26 (better) add it to your ini file, like this: 27 28 --------------------------------------- 29 [RS274NGC] 30 31 # g-code modal codes (modes) that the interpreter is initialized with on startup 32 RS274NGC_STARTUP_CODE = G18 G20 G90 33 --------------------------------------- 34 35 If your using Gmoccapy then see the 36 <<gmoccapy:lathe-section,the Gmoccapy Lathe section>>. 37 38 == Lathe Tool Table [[sec:lathe-tool-table]] 39 40 The "Tool Table" is a text file that contains information about each tool. 41 The file is located in the same directory as your configuration and is called "tool.tbl" by default. 42 The tools might be in a tool changer or just changed manually. 43 The file can be edited with a text editor or be updated using G10 L1,L10,L11. 44 There is also a built-in tool table editor in the Axis display. 45 The maximum number of entries in the tool table is 56. 46 The maximum tool and pocket number is 99999. 47 48 Earlier versions of LinuxCNC had two different tool table formats for mills and lathes, 49 but since the 2.4.x release, one tool table format is used for all machines. 50 Just ignore the parts of the tool table that don't pertain to your machine, 51 or which you don't need to use. 52 For more information on the specifics of the tool table format, 53 see the <<sec:tool-table,Tool Table>> Section. 54 55 == Lathe Tool Orientation[[lathe-tool-orientation]] 56 57 The following figure shows the lathe tool orientations 58 with the center line angle of each orientation and 59 info on FRONTANGLE and BACKANGLE. 60 The FRONTANGLE and BACKANGLE are clockwise starting at a line parallel to Z+. 61 62 .Lathe Tool Orientations 63 64 image::images/tool-positions_en.svg[align="center", alt="Lathe Tool Orientations"] 65 66 In AXIS the following figures show what the Tool Positions look like, as entered in the tool table. 67 68 .Tool Positions 1, 2, 3 & 4 69 70 image:images/tool-pos-1_en.svg[alt="Tool Position 1"] 71 image:images/tool-pos-2_en.svg[alt="Tool Position 2"] 72 image:images/tool-pos-3_en.svg[alt="Tool Position 3"] 73 image:images/tool-pos-4_en.svg[alt="Tool Position 4"] 74 75 .Tool Positions 5, 6, 7 & 8 76 77 image:images/tool-pos-5_en.svg[alt="Tool Position 5"] 78 image:images/tool-pos-6_en.svg[alt="Tool Position 6"] 79 image:images/tool-pos-7_en.svg[alt="Tool Position 7"] 80 image:images/tool-pos-8_en.svg[alt="Tool Position 8"] 81 82 == Tool Touch Off 83 84 When running in lathe mode in AXIS you can set the X and Z in the tool 85 table using the Touch Off window. If you have a tool turret you normally 86 have 'Touch off to fixture' selected when setting up your turret. When 87 setting the material Z zero you have 'Touch off to material' selected. 88 For more information on the G codes used for tools see 89 <<mcode:m6,M6>>, <<sec:select-tool,Tn>>, and <<gcode:g43,G43>>. 90 For more information on tool touch off options in Axis see 91 <<axis:tool-touch-off,Tool Touch Off>>. 92 93 === X Touch Off 94 95 The X axis offset for each tool is normally an offset 96 from the center line of the spindle. 97 98 One method is to take your normal turning tool and 99 turn down some stock to a known diameter. 100 Using the Tool Touch Off window enter the measured diameter 101 (or radius if in radius mode) for that tool. 102 Then using some layout fluid or a marker to coat the part 103 bring each tool up 104 till it just touches the dye and set it's X offset to 105 the diameter of the part used using the tool touch off. 106 Make sure any tools in the corner quadrants have the nose radius 107 set properly in the tool table so the control point is correct. 108 Tool touch off automatically adds a G43 109 so the current tool is the current offset. 110 111 A typical session might be: 112 113 . Home each axis if not homed. 114 . Set the current tool with 'Tn M6 G43' where 'n' is the tool number. 115 . Select the X axis in the Manual Control window. 116 . Move the X to a known position or take a test cut and measure the diameter. 117 . Select Touch Off and pick Tool Table then enter the position or the diameter. 118 . Follow the same sequence to correct the Z axis. 119 120 Note: if you are in Radius Mode you must enter the radius, not the diameter. 121 122 === Z Touch Off 123 124 The Z axis offsets can be a bit confusing at first 125 because there are two elements to the Z offset. 126 There is the tool table offset, and the machine coordinate offset. 127 First we will look at the tool table offsets. 128 One method is to use a fixed point on your lathe and 129 set the Z offset for all tools from this point. 130 Some use the spindle nose or chuck face. 131 This gives you the ability to change to a new tool and 132 set its Z offset without having to reset all the tools. 133 134 A typical session might be: 135 136 . Home each axis if not homed. 137 . Make sure no offsets are in effect for the current coordinate system. 138 . Set the current tool with 'Tn M6 G43' where 'n' is the tool number. 139 . Select the Z axis in the Manual Control window. 140 . Bring the tool close to the control surface. Using a cylinder move the 141 Z away from the control surface until the cylinder just passes between 142 the tool and the control surface. 143 . Select Touch Off and pick Tool Table and set the position to 0.0. 144 . Repeat for each tool using the same cylinder. 145 146 Now all the tools are offset the same distance from a standard position. 147 If you change a tool like a drill bit you repeat the above and 148 it is now in sync with the rest of the tools for Z offset. 149 Some tools might require a bit of cyphering to determine 150 the control point from the touch off point. 151 For example, if you have a 0.125" wide parting tool and 152 you touch the left side off but want the right to be Z0, 153 then enter 0.125" in the touch off window. 154 155 === The Z Machine Offset 156 157 Once all the tools have the Z offset entered into the tool table, 158 you can use any tool to set the machine offset 159 using the machine coordinate system. 160 161 A typical session might be: 162 163 . Home each axis if not homed. 164 . Set the current tool with "Tn M6" where "n" is the tool number. 165 . Issue a G43 so the current tool offset is in effect. 166 . Bring the tool to the work piece and set the machine Z offset. 167 168 If you forget to set the G43 for the current tool when you set the 169 machine coordinate system offset, you will not get what you expect, 170 as the tool offset will be added to the current offset when 171 the tool is used in your program. 172 173 == Spindle Synchronized Motion 174 175 Spindle synchronized motion requires a quadrature encoder connected 176 to the spindle with one index pulse per revolution. See the motion 177 man page and the <<cha:spindle-control,Spindle Control Example>> for more 178 information. 179 180 .Threading 181 The G76 threading cycle is used for both internal and external threads. 182 For more information see the <<gcode:g76,G76>> Section. 183 184 .Constant Surface Speed 185 CSS or Constant Surface Speed uses the machine X origin modified by the tool X 186 offset to compute the spindle speed in RPM. CSS will track changes in tool 187 offsets. The X <<sec.machine-corrdinate-system,machine origin>> should be when 188 the reference tool (the one with zero offset) is at the center of rotation. 189 For more information see the <<gcode:g96-g97,G96>> Section. 190 191 .Feed per Revolution 192 Feed per revolution will move the Z axis by the F amount per revolution. 193 This is not for threading, use G76 for threading. 194 For more information see the <<gcode:g93-g94-g95,G95>> Section. 195 196 == Arcs 197 198 Calculating arcs can be mind challenging enough without considering 199 radius and diameter mode on lathes as well as machine coordinate system 200 orientation. The following applies to center format arcs. On a lathe 201 you should include G18 in your preamble as the default is G17 even if 202 you're in lathe mode, in the user interface Axis. Arcs in G18 XZ plane 203 use I (X axis) and K (Z axis) offsets. 204 205 === Arcs and Lathe Design 206 207 The typical lathe has the spindle on the left of the operator and the 208 tools on the operator side of the spindle center line. This is 209 typically set up with the imaginary Y axis (+) pointing at the floor. 210 211 The following will be true on this type of setup: 212 213 - The Z axis (+) points to the right, away from the spindle. 214 - The X axis (+) points toward the operator, and when on the operator 215 side of the spindle the X values are positive. 216 217 Some lathes with tools on the back side have the imaginary Y axis (+) 218 pointing up. 219 220 G2/G3 Arc directions are based on the axis they rotate around. In the 221 case of lathes, it is the imaginary Y axis. If the Y axis (+) points 222 toward the floor, you have to look up for the arc to appear to go in the 223 correct direction. So looking from above you reverse the G2/G3 for the 224 arc to appear to go in the correct direction. 225 226 === Radius & Diameter Mode 227 228 When calculating arcs in radius mode you only have to remember the 229 direction of rotation as it applies to your lathe. 230 231 When calculating arcs in diameter mode X is diameter and the X offset 232 (I) is radius even if you're in G7 diameter mode. 233 234 == Tool Path 235 236 === Control Point 237 238 The control point for the tool follows the programmed path. The 239 control point is the intersection of a line parallel to the X and Z 240 axis and tangent to the tool tip diameter, as defined when you touch 241 off the X and Z axes for that tool. When turning or facing straight 242 sided parts the cutting path and the tool edge follow the same path. 243 When turning radius and angles the edge of the tool tip will not follow 244 the programmed path unless cutter comp is in effect. In the following 245 figures you can see how the control point does not follow the tool edge 246 as you might assume. 247 248 .Control Point 249 250 image::images/control-point_en.svg[align="center", alt="Control Point"] 251 252 === Cutting Angles without Cutter Comp 253 254 Now imagine we program a ramp without cutter comp. The programmed path 255 is shown in the following figure. As you can see in the figure the 256 programmed path and the desired cut path are one and the same as long 257 as we are moving in an X or Z direction only. 258 259 .Ramp Entry 260 261 image::images/ramp-entry_en.svg[align="center", alt="Ramp Entry"] 262 263 Now as the control point progresses along the programmed path the 264 actual cutter edge does not follow the programmed path as shown in the 265 following figure. There are two ways to solve this, cutter comp and 266 adjusting your programmed path to compensate for tip radius. 267 268 .Ramp Path 269 270 image::images/ramp-cut_en.svg[align="center", alt="Ramp Path"] 271 272 In the above example it is a simple exercise to adjust the programmed 273 path to give the desired actual path by moving the programmed path for 274 the ramp to the left the radius of the tool tip. 275 276 === Cutting a Radius 277 278 In this example we will examine what happens during a radius cut 279 without cutter comp. In the next figure you see the tool turning the OD 280 of the part. The control point of the tool is following the programmed 281 path and the tool is touching the OD of the part. 282 283 .Turning Cut 284 285 image::images/radius-1_en.svg[align="center", alt="Turning Cut"] 286 287 In this next figure you can see as the tool approaches the end of the 288 part the control point still follows the path but the tool tip has left 289 the part and is cutting air. You can also see that even though a radius 290 has been programmed the part will actually end up with a square corner. 291 292 .Radius Cut 293 294 image::images/radius-2_en.svg[align="center", alt="Radius Cut"] 295 296 Now you can see as the control point follows the radius programmed the 297 tool tip has left the part and is now cutting air. 298 299 .Radius Cut 300 301 image::images/radius-3_en.svg[align="center", alt="Radius Cut"] 302 303 In the final figure we can see the tool tip will finish cutting the 304 face but leave a square corner instead of a nice radius. Notice also 305 that if you program the cut to end at the center of the part a small 306 amount of material will be left from the radius of the tool. To finish 307 a face cut to the center of a part you have to program the tool to go 308 past center at least the nose radius of the tool. 309 310 .Face Cut 311 312 image::images/radius-4_en.svg[align="center", alt="Face Cut"] 313 314 === Using Cutter Comp 315 316 When using cutter comp on a lathe think of the tool tip radius as the 317 radius of a round cutter. When using cutter comp the path must be large 318 enough for a round tool that will not gouge into the next line. When 319 cutting straight lines on the lathe you might not want to use cutter 320 comp. For example boring a hole with a tight fitting boring bar you may 321 not have enough room to do the exit move. The entry move into a cutter 322 comp arc is important to get the correct results. 323 324