📄 tool_compensation.lyx
字号:
\layout StandardExample 1 : \layout StandardHere is an NC program which cuts material away from the outside of the triangle in figure above. In this example, the cutter compensation radius is the actual radius of the tool in use, which is 0.5, The value for the diameter in the tool table is twice the radius, which is 1.0.\layout Standard\family typewriter N0010 G41 G1 X2 Y2 (turn compensation on and make entry move)\layout Standard\family typewriter N0020 Y-1 (follow right side of triangle)\layout Standard\family typewriter N0030 X-2 (follow bottom side of triangle)\layout Standard\family typewriter N0040 X2 Y2 (follow hypotenuse of triangle)\layout Standard\family typewriter N0050 G40 (turn compensation off)\layout StandardThis will result in the tool following a path consisting of an entry move and the path shown on the left going clockwise around the triangle. Notice that the coordinates of the triangle of material appear in the NC code. Notice also that the tool path includes three arcs which are not explicitly programmed; they are generated automatically.\layout Subsubsection*Tool Path Contour\layout StandardWhen the contour is a tool path contour, the path is described in the NC program. It is expected that (except for during the entry moves) the path is intended to create some part geometry. The path may be generated manually or by a post-processor, considering the part geometry which is intended to be made. For the interpreter to work, the tool path must be such that the tool stays in contact with the edge of the part geometry, as shown on the left side of Figure 7. If a path of the sort shown on the right of Figure 7 is used, in which the tool does not stay in contact with the part geometry all the time, the interpreter will not be able to compensate properly when undersized tools are used.\layout StandardFor a tool path contour, the value for the cutter diameter in the tool table will be a small positive number if the selected tool is slightly oversized and will be a small negative number if the tool is slightly undersized. As implemented, if a cutter diameter value is negative, the interpreter compensates on the other side of the contour from the one programmed and uses the absolute value of the given diameter. If the actual tool is the correct size, the value in the table should be zero.\layout StandardTool Path Contour example\layout StandardSuppose the diameter of the cutter currently in the spindle is 0.97, and the diameter assumed in generating the tool path was 1.0. Then the value in the tool table for the diameter for this tool should be -0.03. Here is an NC program which cuts material away from the outside of the triangle in the figure.\layout Standard\family typewriter \size small N0010 G1 X1 Y4.5 (make alignment move)\newline N0020 G41 G1 Y3.5 (turn compensation on and make first entry move)\newline N0030 G3 X2 Y2.5 I1 (make second entry move)\newline N0040 G2 X2.5 Y2 J-0.5 (cut along arc at top of tool path)\newline N0050 G1 Y-1 (cut along right side of tool path)\newline N0060 G2 X2 Y-1.5 I-0.5 (cut along arc at bottom right of tool path)\newline N0070 G1 X-2 (cut along bottom side of tool path)\newline N0080 G2 X-2.3 Y-0.6 J0.5 (cut along arc at bottom left of tool path)\newline N0090 G1 X1.7 Y2.4 (cut along hypotenuse of tool path)\newline N0100 G2 X2 Y2.5 I0.3 J-0.4 (cut along arc at top of tool path)\newline N0110 G40 (turn compensation off)\layout StandardThis will result in the tool making an alignment move and two entry moves, and then following a path slightly inside the path shown on the left in Figure 7 going clockwise around the triangle. This path is to the right of the programmed path even though G41 was programmed, because the diameter value is negative.\layout Subsubsection*Programming Errors and Limitations \layout StandardThe interpreter will issue the following messages involving cutter radius compensation.\layout EnumerateCannot change axis offsets with cutter radius comp\layout EnumerateCannot change units with cutter radius comp\layout EnumerateCannot turn cutter radius comp on out of XY-plane\layout EnumerateCannot turn cutter radius comp on when already on\layout EnumerateCannot use G28 or G30 with cutter radius comp\layout EnumerateCannot use G53 with cutter radius comp\layout EnumerateCannot use XZ plane with cutter radius comp\layout EnumerateCannot use YZ plane with cutter radius comp\layout EnumerateConcave corner with cutter radius comp\layout EnumerateCutter gouging with cutter radius comp\layout EnumerateD word on line with no cutter comp on (G41 or G42) command\layout EnumerateTool radius index too big\layout EnumerateTool radius not less than arc radius with cutter radius comp\layout EnumerateTwo G codes used from same modal group.\layout StandardFor some of these messages additional explanation is given below.\layout StandardChanging a tool while cutter radius compensation is on is not treated as an error, although it is unlikely this would be done intentionally. The radius used when cutter radius compensation was first turned on will continue to be used until compensation is turned off, even though a new tool is actually being used.\layout Standard\begin_inset Minipageposition 1inner_position 0height "0pt"width "40col%"collapsed false\layout Standard\align left When cutter radius compensation is on, it must be physically possible for a circle whose radius is the half the diameter given in the tool table to be tangent to the contour at all points of the contour.\end_inset \hfill \begin_inset Minipageposition 1inner_position 0height "0pt"width "60col%"collapsed false\layout Standard\align center \begin_inset Graphics filename radius_comp_error.png width 3in\end_inset \end_inset \layout StandardIn particular, the interpreter treats concave corners and concave arcs into which the circle will not fit as errors, since the circle cannot be kept tangent to the contour in these situations. This error detection does not limit the shapes which can be cut, but it does require that the programmer specify the actual shape to be cut (or path to be followed), not an approximation. In this respect, the interpreter differs from interpreters used with many other controllers, which often allow these errors silently and either gouge the part or round the corner. If cutter radius compensation has already been turned on, it cannot be turned on again. It must be turned off first; then it can be turned on again. It is not necessary to move the cutter between turning compensation off and back on, but the move after turning it back on will be treated as a first move, as described below.\layout StandardIt is not possible to change from one cutter radius index to another while compensation is on because of the combined effect of rules 4 and 11. It is also not possible to switch compensation from one side to another while compensation is on. If the tool is already covering up the next XY destination point when cutter radius compensation is turned on, the gouging message is given when the line of NC code which gives the point is reached. In this situation, the tool is already cutting into material it should not cut.\layout StandardIf a D word is programmed that is larger than the number of tool carrousel slots, an error message is given. In the current implementation, the number of slots is 68.\layout StandardThe error message. "two G Codes Used from Same Modal Group," is a generic message used for many sets of G codes. As applied to cutter radius compensation, it means that more than one of G40, G41, and G42 appears on a line of NC code. This is not allowed.\layout Subsection*First Move \layout Standard\begin_inset Minipageposition 1inner_position 0height "0pt"width "40col%"collapsed false\layout StandardThe algorithm used for the first move when the first move is a straight line is to draw a straight line from the destination point which is tangent to a circle whose center is at the current point and whose radius is the radius of the tool. The destination point of the tool tip is then found as the center of a circle of the same radius tangent to the tangent line at the destination point. This is shown in Figure 9. If the programmed point is inside the initial cross section of the tool (the circle on the left), an error is signalled.\end_inset \hfill \begin_inset Minipageposition 1inner_position 0height "0pt"width "60col%"collapsed false\layout Standard\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \begin_inset Graphics filename radius_comp_straight.png width 3in\end_inset \layout Standard\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \begin_inset Graphics filename radius_comp_arc.png width 3in\end_inset \end_inset \layout StandardIf the first move after cutter radius compensation has been turned on is an arc, the arc which is generated is derived from an auxiliary arc which has its center at the programmed center point, passes through the programmed end point, and is tangent to the cutter at its current location. If the auxiliary arc cannot be constructed, an error is signalled. The generated arc moves the tool so that it stays tangent to the auxiliary arc throughout the move. This is shown in Figure 10.\layout StandardRegardless of whether the first move is a straight line or an arc, the Z axis may also move at the same time. It will move linearly, as it does when cutter radius compensation is not being used.Rotary axis motions (A, B, and C axes) are allowed with cutter radius compensation, but using them would be very unusual.\layout StandardAfter the entry moves of cutter radius compensation, the interpreter keeps the tool tangent to the programmed path on the appropriate side. If a convex corner is on the path, an arc is inserted to go around the corner. The radius of the arc is half the diameter given in the tool table.\layout StandardWhen cutter radius compensation is turned off, no special exit move takes place. The next move is what it would have been if cutter radius compensation had never been turned on and the previous move had placed the tool at its current position.\layout Subsubsection*Programming Entry Moves\layout StandardIn general, an alignment move and two entry moves are needed to begin compensation correctly. However, where the programmed contour is a material edge contour and there is a convex corner on the contour, only one entry move (plus, possibly, a pre-entry move) is needed. The general method, which will work in all situations, is described first. We assume here that the programmer knows what the contour is already and has the job of adding entry moves.\layout Subsubsection*General Method\layout Standard
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -