1. Touch-Off
Mit dem Touch Off Screen in der AXIS Schnittstelle können Sie die Werkzeugtabelle automatisch aktualisieren.
Typische Schritte zum Aktualisieren der Werkzeugtabelle:
-
Nach der Referenzfahrt laden Sie ein Werkzeug mit Tn M6, wobei n die Werkzeugnummer (engl. tool number) ist.
-
Fahren Sie das Werkzeug mit Hilfe einer Lehre auf einen festgelegten Punkt oder machen Sie einen Testschnitt und messen Sie.
-
Klicken Sie auf der Registerkarte "Manuelle Steuerung" auf den Button "Ausschalten" (oder drücken Sie die Taste "Ende" auf Ihrer Tastatur).
-
Wählen Sie „Werkzeugtabelle“ im Dropdown-Feld „Koordinatensystem“ aus.
-
Geben Sie das Messgerät oder die gemessene Bemaßung ein und wählen Sie OK aus.
The Tool Table will be changed with the correct Z length to make the DRO display the correct Z position and a G43 command will be issued so the new tool Z length will be in effect. Tool table touch off is only available when a tool is loaded with Tn M6.

1.1. Verwendung von G10 L1/L10/L11
Die G10-Befehle L1/L10/L11 können zum Einstellen von Werkzeugtabellen-Offsets verwendet werden:
-
G10 L1 P__n__
- Set offset(s) to a value. Current position irrelevant (see G10 L1 for details). -
G10 L10 P__n__
- Set offset(s) so current position w/ fixture 1-8 becomes a value (see G10 L10 for details). -
G10 L11 P__n__
- Set offset(s) so current position w/ fixture 9 becomes a value (see G10 L11 for details).
Anmerkung
|
Dies ist nur eine kurze Darstellung, genauere Erläuterungen finden Sie im Referenzhandbuch des G-Codes. |
2. Werkzeugtabelle
The Tool Table is a text file that contains information about each tool. The file is located in the same directory as your configuration and is called tool.tbl by default. A file name may be specified with the INI file [EMCIO]TOOL_TABLE setting. The tools might be in a tool changer or just changed manually. The file can be edited with a text editor or be updated using G10 L1. See the Lathe Tool Table section for an example of the lathe tool table format. The maximum pocket number is 1000.
The Tool Editor or a text editor can be used to edit the tool table. If you use a text editor make sure you reload the tool table in the GUI.
2.1. Werkzeugtabellen-Format
T# | P# | X | Y | Z | A | B | C | U | V | W | Durchm | FA | BA | Ori | Rem |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
; |
(keine Daten nach dem öffnenden Semikolon) |
||||||||||||||
T1 |
P17 |
X0 |
Y0 |
Z0 |
A0 |
B0 |
C0 |
U0 |
V0 |
W0 |
D0 |
I0 |
J0 |
Q0 |
;rem |
T2 |
P5 |
X0 |
Y0 |
Z0 |
A0 |
B0 |
C0 |
U0 |
V0 |
W0 |
D0 |
I0 |
J0 |
Q0 |
;rem |
T3 |
P12 |
X0 |
Y0 |
Z0 |
A0 |
B0 |
C0 |
U0 |
V0 |
W0 |
D0 |
I0 |
J0 |
Q0 |
;rem |
Im Allgemeinen ist das Zeilenformat der Werkzeugtabelle wie folgt:
-
T - Werkzeugnummer (Werkzeugnummern müssen eindeutig sein)
-
P - Taschennummer, 1-1000 (Taschennummern müssen eindeutig sein, Tasche 0 steht für die Spindel)
-
X.. W - Werkzeugversatz auf vorgegebener Achse - Gleitkommazahl
-
D - Werkzeugdurchmesser - Fließkommazahl, absoluter Wert
-
I - Frontwinkel (nur Drehbank) - Gleitkommazahl
-
J - Rückenwinkel (nur Drehmaschine) - Gleitkommazahl
-
Q - Werkzeugausrichtung (nur Drehmaschine) - ganze Zahl, 0-9
-
; - Beginn des Kommentars oder der Bemerkung - Text
Werkzeugnummern sollten eindeutig sein. Zeilen, die mit einem Semikolon beginnen, werden ignoriert.
Die Einheiten für Länge, Durchmesser usw. werden in Maschineneinheiten angegeben.
Wahrscheinlich werden Sie die Werkzeugeinträge in aufsteigender Reihenfolge halten wollen, besonders wenn Sie einen zufälligen Werkzeugwechsler verwenden. Die Werkzeugtabelle erlaubt jedoch Werkzeugnummern in beliebiger Reihenfolge.
One line may contain as many as 16 entries, but will likely contain much fewer. The entries for T (tool number) and P (pocket number) are required. The last entry (a remark or comment, preceded by a semicolon) is optional. It makes reading easier if the entries are arranged in columns, as shown in the table, but the only format requirement is that there be at least one space or tab after each of the entries on a line and a newline character at the end of each entry.
Die Bedeutung der Einträge und die Art der Daten, die sie enthalten, sind wie folgt.
- Werkzeugnummer (erforderlich)
-
The T column contains the number (unsigned integer) which represents a code number for the tool. The user may use any code for any tool, as long as the codes are unsigned integers.
- Taschen-Nummer (erforderlich)
-
The P column contains the number (unsigned integer) which represents the pocket number (slot number) of the tool changer slot where the tool can be found. The entries in this column must all be different.
The pocket numbers will typically start at 1 and go up to the highest available pocket on your tool changer. But not all tool changers follow this pattern. Your pocket numbers will be determined by the numbers that your tool changer uses to refer to the pockets. So all this is to say that the pocket numbers you use will be determined by the numbering scheme used in your tool changer, and the pocket numbers you use must make sense on your machine.
- Daten-Offset-Nummern (optional)
-
The Data Offset columns (XYZABCUVW) contain real numbers which represent tool offsets in each axis. This number will be used if tool length offsets are being used and this tool is selected. These numbers can be positive, zero, or negative, and are in fact completely optional. Although you will probably want to make at least one entry here, otherwise there would be little point in making an entry in the tool table to begin with.
In a typical mill, you probably want an entry for Z (tool length offset). In a typical lathe, you probably want an entry for X (X tool offset) and Z (Z tool offset). In a typical mill using cutter diameter compensation (cutter comp), you probably also want to add an entry for D (cutter diameter). In a typical lathe using tool nose diameter compensation (tool comp), you probably also want to add an entry for D (tool nose diameter).
A lathe also requires some additional information to describe the shape and orientation of the tool. So you probably want to have entries for I (tool front angle) and J (tool back angle). You probably also want an entry for Q (tool orientation).
Siehe das Kapitel Informationen für Nutzer von Drehmaschinen für weitere Details.
The Diameter column contains a real number. This number is used only if cutter compensation is turned on using this tool. If the programmed path during compensation is the edge of the material being cut, this should be a positive real number representing the measured diameter of the tool. If the programmed path during compensation is the path of a tool whose diameter is nominal, this should be a small number (positive or negative, but near zero) representing only the difference between the measured diameter of the tool and the nominal diameter. If cutter compensation is not used with a tool, it does not matter what number is in this column.
The Comment column may optionally be used to describe the tool. Any type of description is OK. This column is for the benefit of human readers only. The comment must be preceded by a semicolon.
Anmerkung
|
Frühere Versionen von LinuxCNC hatte zwei verschiedene Werkzeug-Tabelle Formate für Fräsen und Drehen, aber seit der 2.4.x Release, wird dasselbe Werkzeug-Tabellen-Format für alle Maschinen verwendet. |
2.2. Tool IO
The non-realtime program specified by [EMCIO]EMCIO = io
is conventionally used for tool changer management (and other io functions for enabling LinuxCNC and the control of coolant/lube hardware). The HAL pins used for tool management are prefixed with iocontrol.0.
.
A G-code T command asserts the HAL output pin iocontrol.0.tool-prepare
. The HAL input pin, iocontrol.0.tool-prepared
, must be set by external HAL logic to complete tool preparation leading to a subsequent reset of the tool-prepare pin.
A G-code M6 command asserts the HAL output pin iocontrol.0.tool-change
. The related HAL input pin, iocontrol.0.tool-prepared
, must be set by external HAL logic to indicate completion of the tool change leading to a subsequent reset of the tool-change pin.
Tooldata is accessed by an ordered index (idx) that depends on the type of toolchanger specified by [EMCIO]RANDOM_TOOLCHANGER=
type.
-
For
RANDOM_TOOLCHANGER = 0
, (0 is default and specifies a non-random toolchanger) idx is a number indicating the sequence in which tooldata was loaded. -
For
RANDOM_TOOLCHANGER = 1
, idx is the current pocket number for the tool number specified by the G-code select tool command Tn.
Das io-Programm bietet HAL Ausgangsstifte, um die Verwaltung des Werkzeugwechslers zu erleichtern:
-
iocontrol.0.tool-prep-number
-
iocontrol.0.tool-prep-index
-
iocontrol.0.tool-prep-pocket
-
iocontrol.0.tool-from-pocket
2.2.1. E/A (I/O) für nicht-zufälligen Werkzeugwechsler
-
Werkzeugnummer n==0 zeigt an, dass kein Werkzeug vorhanden ist.
-
Die Platznummer für ein Werkzeug wird beim Laden/Nachladen der Werkzeugdaten aus der Datenquelle ([EMCIO]TOOL_TABLE oder [EMCIO]DB_PROGRAM) festgelegt.
-
Beim Befehl G-Code Tn (n != 0):
-
iocontrol.0.tool-prep-index = idx (index based on tooldata load sequence)
-
iocontrol.0.tool-prep-number = n
-
iocontrol.0.tool-prep-pocket = the pocket number for n
-
-
At G-code T0 (n == 0 remove) command:
-
iocontrol.0.tool-prep-index = 0
-
iocontrol.0.tool-prep-number = 0
-
iocontrol.0.tool-prep-pocket = 0
-
-
At M-code M6 (following iocontrol.0.tool-changed pin 0-->1):
-
iocontrol.0.tool-from-pocket = pocket number used to retrieve tool
-
2.2.2. E/A (I/O) für zufälligen Werkzeugwechsler
-
Die Werkzeugnummer n==0 ist nicht speziell.
-
Die Taschennummer 0 ist speziell, da sie die Spindel anzeigt.
-
Die aktuelle Platznummer für Werkzeug n ist der Werkzeugdatenindex (idx) für Werkzeug n.
-
Bei G-Code Befehl Tn:
-
iocontrol.0.tool-prep-index = tooldata index (idx) for tool n
-
iocontrol.0.tool-prep-number = n
-
iocontrol.0.tool-prep-pocket = pocket number for tool n
-
-
At M-code M6 (following iocontrol.0.tool-changed pin 0-->1):
-
iocontrol.0.tool-from-pocket = pocket number used to retrieve tool
-
Anmerkung
|
Beim Start ist iocontrol.0.tool-from-pocket = 0. Ein M61Qn (n!=0) Befehl ändert iocontrol.0.tool-from-pocket nicht. Ein M61Q0 (n==0) Befehl setzt iocontrol.0.tool-from-pocket auf 0. |
2.3. Tool Changers
LinuxCNC supports three types of tool changers: manual, random location and non-random or fixed location. Information about configuring a LinuxCNC tool changer is in the EMCIO Section of the INI chapter.
Manual tool changer (you change the tool by hand) is treated like a fixed location tool changer. Manual toolchanges can be aided by a HAL configuration that employs the non-realtime program hal_manualtoolchange and is typically specified in an INI file with INI statements:
[HAL] HALFILE = axis_manualtoolchange.hal
Fixed location tool changers always return the tools to a fixed position in the tool changer. This would also include designs like lathe turrets. When LinuxCNC is configured for a fixed location tool changer the P number is not used internally (but read, preserved and rewritten) by LinuxCNC, so you can use P for any bookkeeping number you want.
Anmerkung
|
When using [EMCIO]RANDOM_TOOLCHANGER = 0 (the default), the P pocket number is a parameter of the tooldata that is retrieved from the tooldata source ([EMCIO]TOOL_TABLE or [EMCIO]DB_PROGRAM ). In many applications it is fixed but it may be changed by edits to the [EMCIO]TOOL_TABLE or programmatically when the [EMCIO]DB_PROGRAM is used. LinuxCNC pushes updates to the data source ([EMCIO]TOOL_TABLE or [EMCIO]DB_PROGRAM ) for G-codes G10L1, G10L10, G10L11, M61. LinuxCNC can pull tooldata updates from the data source by UI (user-interface) commands (Python example: linuxcnc.command().load_tool_table() ) or by the G-code: G10L0 . |
Random location tool changers ([EMCIO]RANDOM_TOOLCHANGER = 1
) swap the tool in the spindle with the one in the changer. With this type of tool changer the tool will always be in a different pocket after a tool change. When a tool is changed LinuxCNC rewrites the pocket number to keep track of where the tools are. T can be any number but P must be a number that makes sense for the machine.
3. Tool Length Compensation
The tool length compensations are given as positive numbers in the tool table. A tool compensation is programmed using G43 H_n_, where n is the index number of the desired tool in the tool table. It is intended that all entries in the tool table are positive. The value of H is checked, it must be a non-negative integer when read. The interpreter behaves as follows:
-
If G43 H_n_ is programmed, a call to the function
USE_TOOL_LENGTH_OFFSET(`__length__
)` is made (where length is the length difference, read from the tool table, of the indexed tool n), tool_length_offset is repositioned in the machine settings model and the value of current_z in the model is adjusted. Note that n does not have to be the same as the slot number of the tool currently in the spindle. -
If G49 is programmed,
USE_TOOL_LENGTH_OFFSET(0.0)
is called, tool_length_offset is reset to 0.0 in the machine settings template and the current value of current_z in the model is adjusted. The effect of the tool length compensation is illustrated in the capture below. Note that the tool length is subtracted from Z so that the programmed control point corresponds to the tip of the tool. Note also that the effect of the length compensation is immediate when you see the compensation is immediate when the position of Z is seen as a relative coordinate, but it has no effect on the actual machine position until a Z movement is programmed.
N01 G1 F15 X0 Y0 Z0
N02 G43 H1 Z0 X1
N03 G49 X0 Z0
N04 G0 X2
N05 G1 G43 H1 G4 P10 Z0 X3
N06 G49 X2 Z0
N07 G0 X0
Mit diesem Programm wird die Maschine in den meisten Fällen den Offset in Form einer Rampe während der Bewegung in xyz nach dem Wort G43 anwenden.
4. Cutter Radius Compensation
Cutter Compensation allows the programmer to program the tool path without knowing the exact tool diameter. The only caveat is the programmer must program the lead in move to be at least as long as the largest tool radius that might be used.
There are two possible paths the cutter can take since the cutter compensation can be on to the left or right side of a line when facing the direction of cutter motion from behind the cutter. To visualize this imagine you were standing on the part walking behind the tool as it progresses across the part. G41 is your left side of the line and G42 is the right side of the line.
The end point of each move depends on the next move. If the next move creates an outside corner the move will be to the end point of the compensated cut line. If the next move creates in an inside corner the move will stop short so to not gouge the part. The following figure shows how the compensated move will stop at different points depending on the next move.
4.1. Übersicht
4.1.1. Werkzeugtabelle
Cutter compensation uses the data from the tool table to determine the offset needed. The data can be set at run time with G10 L1.
4.1.2. Einstiegsbewegungen programmieren
Any move that is long enough to perform the compensation will work as the entry move. The minimum length is the cutter radius. This can be a rapid move above the work piece. If several rapid moves are issued after a G41/42 only the last one will move the tool to the compensated position.
In the following figure you can see that the entry move is compensated to the right of the line. This puts the center of the tool to the right of X0 in this case. If you were to program a profile and the end is at X0 the resulting profile would leave a bump due to the offset of the entry move.
4.1.3. Z-Bewegung
Z axis motion may take place while the contour is being followed in the XY plane. Portions of the contour may be skipped by retracting the Z axis above the part and by extending the Z-axis at the next start point.
4.1.4. Eilgänge
Eilgänge können programmiert werden, während die Kompensation eingeschaltet ist.
4.1.5. Gute Praktiken
Starten Sie ein Programm mit G40, um sicherzustellen, dass die Kompensation ausgeschaltet ist.
4.2. Beispiele
4.2.1. Beispiel für ein äußeres Profil

4.2.2. Beispiel für ein Innenprofil
