Wiki source code of G40, G41, G42: Компенсация диаметра инструмента
Last modified by writer on 2022/08/18 17:30
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | (% style="margin-left: 30.0px;" %) | ||
| 2 | (% style="color:#a0be2d" %)//**G40**//(%%) – turn cutter compensation off. | ||
| 3 | |||
| 4 | The command to disable compensation for tool diameter should be followed by linear movement with a value greater than the tool diameter. Duplication of the command cannot cause a control program error. | ||
| 5 | |||
| 6 | {{error title="**It is an error if:**"}} | ||
| 7 | * the code is followed by a circular movement ([[(% style="color:#a0be2d" %)**//G2/G3//**>>doc:Руководство пользователя.Описание G-кодов.Список G-кодов, поддерживаемых системой.G0-G10.G2, G3: Круговое перемещение]](%%)); | ||
| 8 | * linear displacement (**[[(% style="color:#a0be2d" %)//G0//>>doc:Руководство пользователя.Описание G-кодов.Список G-кодов, поддерживаемых системой.G0-G10.G0: Ускоренное линейное перемещение]](%%)[[(% style="color:#a0be2d" %)///G1//>>doc:Руководство пользователя.Описание G-кодов.Список G-кодов, поддерживаемых системой.G0-G10.G1: Линейное перемещение]](%%)**) after switching off the compensation is less than the diameter of the tool. | ||
| 9 | {{/error}} | ||
| 10 | |||
| 11 | (% style="margin-left: 30.0px;" %) | ||
| 12 | (% style="color:#a0be2d" %)//**G41 **//(%%)– enable compensation mode to the left of the programmed path. | ||
| 13 | (% style="color:#a0be2d" %)//**G42**//(%%) – enable compensation mode to the right of the programmed path. | ||
| 14 | |||
| 15 | (% style="color:#a0be2d" %)//**G41/G42**//(%%) are set after tool change macro whose value is the tool number from the corresponding [[table>>doc:Руководство пользователя.Ответы на типовые вопросы.Для чего нужна Таблица инструментов?.WebHome]]. When a command is called, the control program changes the path, moving it to the right ((% style="color:#a0be2d" %)//**G42**//(%%)) or to the left ((% style="color:#a0be2d" %)//**G41**//(%%)) from the original one. | ||
| 16 | |||
| 17 | {{code language="g-code" title="(% style=~"color:#a0be2d~" %)//**G41**//(%%)// example~~://"}} | ||
| 18 | M6 T26 (command tool change to tool No. 26) | ||
| 19 | G0 X-10 Y-10 Z0 (rapig linear interpolation) | ||
| 20 | G41 (enable compensation on the left) | ||
| 21 | G0 X0 Y0 (fast linear movement) | ||
| 22 | G1 Z0 (feed linear interpolation) | ||
| 23 | G1 Y50 | ||
| 24 | G1 X50 Y0 | ||
| 25 | G1 X0 | ||
| 26 | G40 (off compensation mode) | ||
| 27 | G0 X-10 Y-10 | ||
| 28 | |||
| 29 | {{/code}} | ||
| 30 | |||
| 31 | {{error title="**It is an error if:**"}} | ||
| 32 | * if the YZ work plane is active ([[more...>>doc:Руководство пользователя.Описание G-кодов.Список G-кодов, поддерживаемых системой.G11-G30.G17 - G19\.1: Выбор рабочей плоскости]]); | ||
| 33 | * the current tool is not selected or the diameter of the selected tool is not specified; | ||
| 34 | * tool diameter compensation has been included previously. | ||
| 35 | {{/error}} |