Ero sivun ”G-koodi” versioiden välillä

Helsinki Hacklabin wikistä
Siirry navigaatioon Siirry hakuun
 
(22 välissä olevaa versiota samalta käyttäjältä ei näytetä)
Rivi 2: Rivi 2:
 
|-
 
|-
 
| width="500" |  
 
| width="500" |  
''Left column Finnish!''
+
__TOC__
 
| width="500" |
 
| width="500" |
''Right column English''
+
G-Code
 
|
 
|
  
Rivi 16: Rivi 16:
 
A CNC program that follows G-code syntax consists of low-level functions called blocks. Sentences, in turn, are built from words (code). The words are either "preparatory" G-codes or "Miscellaneous" M-codes. <br />
 
A CNC program that follows G-code syntax consists of low-level functions called blocks. Sentences, in turn, are built from words (code). The words are either "preparatory" G-codes or "Miscellaneous" M-codes. <br />
 
The G-code syntax is almost unstructured because no program control controls are included in the language. A subroutine call using M codewords exists but little else. <br />
 
The G-code syntax is almost unstructured because no program control controls are included in the language. A subroutine call using M codewords exists but little else. <br />
G-code is interpreted code in the sense that the code interpreter always parses one whole sentence at a time and optimizes the execution of the content before it is launched. Lota's Fanuc controller works in such a way that the last of the conflicting command words in a sentence remains valid and executed. <br />
+
G-code is interpreted code in the sense that the code interpreter always parses one whole sentence at a time and optimizes the execution of the content before it is launched. Lotta's Fanuc controller works in such a way that the last of the conflicting command words in a sentence remains valid and executed. <br />
 
In particular, it should be noted that almost all G codewords are "modal", meaning that they remain in effect until another code belonging to the same modal group replaces them. Similarly, an argument that is missing from a sentence gets the value it last had in an earlier sentence. Therefore, the unchanged argument does not need to be repeated sentence by sentence. <br />
 
In particular, it should be noted that almost all G codewords are "modal", meaning that they remain in effect until another code belonging to the same modal group replaces them. Similarly, an argument that is missing from a sentence gets the value it last had in an earlier sentence. Therefore, the unchanged argument does not need to be repeated sentence by sentence. <br />
 
|-
 
|-
Rivi 38: Rivi 38:
 
'''X510.''' <br />
 
'''X510.''' <br />
 
'''X520.''' <br />
 
'''X520.''' <br />
Coordinated movement at machining speed to coordinates 500/60/0, then 510/60/0 and 520/60/0 because G01 is modal. <br />
+
Coordinated movement at machining speed to coordinates 500/60/0, then 510/60/0 and 520/60/0 because G01 is modal.<br />
 
|-
 
|-
 
|
 
|
Rivi 84: Rivi 84:
 
Since most G codewords are modal, it is often sufficient to simply mention the arguments in the statement statement, in which case the valid modal statement is repeated with those arguments. A simple example of this above.
 
Since most G codewords are modal, it is often sufficient to simply mention the arguments in the statement statement, in which case the valid modal statement is repeated with those arguments. A simple example of this above.
  
== G codeword arguments ==
+
== G codeword arguments==
 
{| class = "wikitable"
 
{| class = "wikitable"
 
|-
 
|-
Rivi 91: Rivi 91:
 
| '''P_''' || --- || Abbreviated position coordinate format. Same as X_ Y_ Z_ where _ is the numeric value of the coordinate. Also alternative coordinates such as IJK, UVW, etc.
 
| '''P_''' || --- || Abbreviated position coordinate format. Same as X_ Y_ Z_ where _ is the numeric value of the coordinate. Also alternative coordinates such as IJK, UVW, etc.
 
|-
 
|-
| '''X, Y, Z''' || Modal 01 codes Position coordinates for motion
+
| '''X, Y, Z''' || Modal 01 codes || Position coordinates for motion
 
|-
 
|-
| A, B, C || Modal 01 codes Angular coordinates for rotation about the X, Y, Z axes (4th axis)
+
| A, B, C || Modal 01 codes || Angular coordinates for rotation about the X, Y, Z axes (4th axis)
 
|-
 
|-
 
| '''I, J, K''' || G02, G03 || Relative position coordinates to position the center of the arc
 
| '''I, J, K''' || G02, G03 || Relative position coordinates to position the center of the arc
 
|-
 
|-
| U, V, W || Modal 01 codes Relative position coordinates along the X, Y, Z axes for motion
+
| U, V, W || Modal 01 codes || Relative position coordinates along the X, Y, Z axes for motion
 
|-
 
|-
 
| '''S''' || M03, M04 || Spindle speed setpoint
 
| '''S''' || M03, M04 || Spindle speed setpoint
 
|-
 
|-
| '''F''' || Modal 01 codes Feed speed mm / min
+
| '''F''' || Modal 01 codes || Feed speed mm / min
 
|-
 
|-
| '''H''' || Modal 01 codes Tool length and radius compensation
+
| '''H''' || Modal 01 codes || Tool length and radius compensation
 
|-
 
|-
 
| '''T''' || --- || Tool selection
 
| '''T''' || --- || Tool selection
Rivi 112: Rivi 112:
 
Radius definition in circular interpolation
 
Radius definition in circular interpolation
 
|-
 
|-
| Q || Modal 09 codes Drilling step depth in break drilling, etc.
+
| Q || Modal 09 codes || Drilling step depth in break drilling, etc.
 
|-
 
|-
 
| P || G04 || Pause time ms
 
| P || G04 || Pause time ms
Rivi 120: Rivi 120:
 
|-
 
|-
 
|
 
|
 +
 
==Varsinaiset G-koodisanat==
 
==Varsinaiset G-koodisanat==
 
{| class="wikitable"
 
{| class="wikitable"
Rivi 259: Rivi 260:
 
| '''[[G90]]''' || 03 || Absoluuttikoordinaattien valinta
 
| '''[[G90]]''' || 03 || Absoluuttikoordinaattien valinta
 
|-
 
|-
| '''[G90|G91]]''' || 03 || Suhteellisten koordinaattien valinta
+
| '''[[G90|G91]]''' || 03 || Suhteellisten koordinaattien valinta
 
|-
 
|-
 
| G92 || 00 || Absoluuttikoordinaatiston origon asetus
 
| G92 || 00 || Absoluuttikoordinaatiston origon asetus
Rivi 274: Rivi 275:
 
|-
 
|-
 
| [[G98|G99]] || 10 || Työkierrossa välipaluu R-koordinaatin tasalle
 
| [[G98|G99]] || 10 || Työkierrossa välipaluu R-koordinaatin tasalle
 
 
|}
 
|}
 +
|
  
|
+
==Actual G codewords==
== Actual G codewords ==
 
 
{| class = "wikitable"
 
{| class = "wikitable"
 
|-
 
|-
 
! G code !! Modal group !! Function
 
! G code !! Modal group !! Function
 
|-
 
|-
| '''[[G00]]''' || 01 || Fast motion to the given coordinates
+
| '''[[G00_Engl|G00]]''' || 01 || Fast motion to the given coordinates
 
|-
 
|-
| '''[[G01]]''' || 01 || Coordinated motion at the machining speed to the given coordinates
+
| '''[[G01_Engl|G01]]''' || 01 || Coordinated motion at the machining speed to the given coordinates
 
|-
 
|-
| '''[[G02]]''' || 01 || [[G02 | Circular interpolation]] clockwise
+
| '''[[G02_Engl|G02]]''' || 01 || [[G02 | Circular interpolation]] clockwise
 
|-
 
|-
| '''[[G02 | G03]]''' || 01 || [[G02 | Circular interpolation]] counterclockwise
+
| '''[[G02_Engl|G03]]''' || 01 || [[G02 | Circular interpolation]] counterclockwise
 
|-
 
|-
| [[G04]] || 00 || Break
+
| [[G04_Engl|G04]] || 00 || Break
 
|-
 
|-
| G05 || 00 || Machining with high speed cycle
+
| G05_Engl|G05 || 00 || Machining with high speed cycle
 
|-
 
|-
| G09 || 00 || Accurate positioning
+
| G09_Engl|G09 || 00 || Accurate positioning
 
|-
 
|-
| G15 || 17 || Canceling the polar coordinate mode
+
| G15_Engl|G15 || 17 || Canceling the polar coordinate mode
 
|-
 
|-
| G16 || 17 || Polar coordinate mode setting
+
| G02_Engl|G16 || 17 || Polar coordinate mode setting
 
|-
 
|-
| '''[[G02 | G17]]''' || 02 || XY plane setting for circular interpolation
+
| '''[[G02_Engl| G17]]''' || 02 || XY plane setting for circular interpolation
 
|-
 
|-
| [[G02 | G18]] || 02 || ZX plane setting for circular interpolation
+
| [[G02_Engl|G18]] || 02 || ZX plane setting for circular interpolation
 
|-
 
|-
| [[G02 | G19]] || 02 || YZ level setting for circular interpolation
+
| [[G02_Engl|G19]] || 02 || YZ level setting for circular interpolation
 
|-
 
|-
| [[G20]] || 06 || Units of measurement in inches
+
| [[G06_Engl|G20]] || 06 || Units of measurement in inches
 
|-
 
|-
| '''[[G20 | G21]]''' || 06 || Units of measurement in millis
+
| '''[[G06_Engl | G21]]''' || 06 || Units of measurement in millis
 
|-
 
|-
| G22 || 00 || Example
+
| G22_Engl|G22 || 00 || Example
 
|-
 
|-
| G23 || 00 || Example
+
| G23_Engl|G23 || 00 || Example
 
|-
 
|-
| G27 || 00 || Home drive check
+
| G27_Engl|G27 || 00 || Home drive check
 
|-
 
|-
 
| '''[[G28]]''' || 00 || Driving to your home station
 
| '''[[G28]]''' || 00 || Driving to your home station
Rivi 321: Rivi 321:
 
| [[G29]] || 00 || Return from home station
 
| [[G29]] || 00 || Return from home station
 
|-
 
|-
| G30 || 00 || Return to 2nd home station
+
| G30_Engl|G30 || 00 || Return to 2nd home station
 
|-
 
|-
| G31 || 00 || Bypass function
+
| G31_Engl|G31 || 00 || Bypass function
 
|-
 
|-
| G33 || 01 || Threading
+
| G33_Engl|G33 || 01 || Threading
 
|-
 
|-
| G39 || 00 || Angle rotation by circular interpolation
+
| G39_Engl|G39 || 00 || Angle rotation by circular interpolation
 
|-
 
|-
 
| [[G40]] || 07 || Cancel tool radius compensation
 
| [[G40]] || 07 || Cancel tool radius compensation
Rivi 337: Rivi 337:
 
| '''[[G43]]''' || 08 || Tool length compensation by summing (+ direction)
 
| '''[[G43]]''' || 08 || Tool length compensation by summing (+ direction)
 
|-
 
|-
| G44 || 08 || Tool length compensation decreasing (- direction)
+
| G44_Engl|G44 || 08 || Tool length compensation decreasing (- direction)
 
|-
 
|-
| G45 || 00 || Tool offset breeding
+
| G45_Engl|G45 || 00 || Tool offset breeding
 
|-
 
|-
| G46 || 00 || Tool offset reduction
+
| G46_Engl|G46 || 00 || Tool offset reduction
 
|-
 
|-
| G47 || 00 || 2x increase in tool offset
+
| G47_Engl|G47 || 00 || 2x increase in tool offset
 
|-
 
|-
| G48 || 00 || 2x reduction of tool offset
+
| G48_Engl|G48 || 00 || 2x reduction of tool offset
 
|-
 
|-
 
| [[G49]] || 08 || Cancel tool length compensation
 
| [[G49]] || 08 || Cancel tool length compensation
 
|-
 
|-
| G50 || 11 || Cancel scaling
+
| G50_Engl|G50 || 11 || Cancel scaling
 
|-
 
|-
| G51 || 11 || Scaling setting
+
| G51_Engl|G51 || 11 || Scaling setting
 
|-
 
|-
| G52 || 00 || Transfer of work coordinate system
+
| G52_Engl|G52 || 00 || Transfer of work coordinate system
 
|-
 
|-
| G53 || 00 || Reference of motion to machine coordinates
+
| G53_Engl|G53 || 00 || Reference of motion to machine coordinates
 
|-
 
|-
 
| '''[[G54]]''' || 14 || Selection of work coordinate system 1
 
| '''[[G54]]''' || 14 || Selection of work coordinate system 1
Rivi 371: Rivi 371:
 
| [[G60]] || 00 || One-way parking
 
| [[G60]] || 00 || One-way parking
 
|-
 
|-
| G61 || 15 || Exact stop mode
+
| G61_Engl|G61 || 15 || Exact stop mode
 
|-
 
|-
| G62 || 15 || Automatic corner bypass mode
+
| G62_Engl|G62 || 15 || Automatic corner bypass mode
 
|-
 
|-
| G63 || 15 || Threading mode
+
| G63_Engl|G63 || 15 || Threading mode
 
|-
 
|-
| G64 || 15 || Cutting machine mode
+
| G64_Engl|G64 || 15 || Cutting machine mode
 
|-
 
|-
| G65 || 12 || Macro instruction, macro call
+
| G65_Engl|G65 || 12 || Macro instruction, macro call
 
|-
 
|-
| G66 || 12 || Modal call to the custom macro
+
| G66_Engl|G66 || 12 || Modal call to the custom macro
 
|-
 
|-
| G67 || 12 || Cancel a modal call to a custom macro
+
| G67_Engl|G67 || 12 || Cancel a modal call to a custom macro
 
|-
 
|-
| G68 || 16 || Coordinate system rotation
+
| G68_Engl|G68 || 16 || Coordinate system rotation
 
|-
 
|-
| G69 || 16 || Canceling the coordinate system rotation
+
| G69_Engl|G69 || 16 || Canceling the coordinate system rotation
 
|-
 
|-
 
| [[G73]] || 09 || Intermittent drilling cycle 1
 
| [[G73]] || 09 || Intermittent drilling cycle 1
Rivi 397: Rivi 397:
 
| [[G80]] || 09 || Cycle cancellation
 
| [[G80]] || 09 || Cycle cancellation
 
|-
 
|-
| G81 || 09 || Spot drilling cycle
+
| G81_Engl|G81 || 09 || Spot drilling cycle
 
|-
 
|-
| G82 || 09 || Counter-drilling cycle
+
| G82_Engl|G82 || 09 || Counter-drilling cycle
 
|-
 
|-
| G83 || 09 || Intermittent drilling cycle 2
+
| G83_Engl|G83 || 09 || Intermittent drilling cycle 2
 
|-
 
|-
| G84 || 09 || Threading cycle
+
| G84_Engl|G84 || 09 || Threading cycle
 
|-
 
|-
| G85 || 09 || Boring cycle
+
| G85_Engl|G85 || 09 || Boring cycle
 
|-
 
|-
| G86 || 09 || Boring cycle
+
| G86_Engl|G86 || 09 || Boring cycle
 
|-
 
|-
| G87 || 09 || Counter-reaming cycle
+
| G87_Engl|G87 || 09 || Counter-reaming cycle
 
|-
 
|-
| G88 || 09 || Boring cycle
+
| G88_Engl|G88 || 09 || Boring cycle
 
|-
 
|-
| G89 || 09 || Boring cycle
+
| G89_Engl|G89 || 09 || Boring cycle
 
|-
 
|-
 
| '''[[G90]]''' || 03 || Selection of absolute coordinates
 
| '''[[G90]]''' || 03 || Selection of absolute coordinates
 
|-
 
|-
| '''[G90 | G91]]''' || 03 || Selection of relative coordinates
+
| '''[[G90 | G91]]''' || 03 || Selection of relative coordinates
 
|-
 
|-
| G92 || 00 || Setting the origin of the absolute coordinate system
+
| G92_Engl|G92 || 00 || Setting the origin of the absolute coordinate system
 
|-
 
|-
| G94 || 05 || Input one / minute
+
| G94_Engl|G94 || 05 || Input one / minute
 
|-
 
|-
| G95 || 05 || Feed one / spindle revolution
+
| G95_Engl|G95 || 05 || Feed one / spindle revolution
 
|-
 
|-
| G96 || 13 || Constant surface speed control on
+
| G96_Engl|G96 || 13 || Constant surface speed control on
 
|-
 
|-
| G97 || 13 || Constant surface speed control off
+
| G97_Engl|G97 || 13 || Constant surface speed control off
 
|-
 
|-
 
| [[G98]] || 10 || In the cycle, a snippet returns to the starting point
 
| [[G98]] || 10 || In the cycle, a snippet returns to the starting point
 
|-
 
|-
 
| [[G98 | G99]] || 10 || In the cycle, return to the R coordinate
 
| [[G98 | G99]] || 10 || In the cycle, return to the R coordinate
 
 
|}
 
|}
 +
|-
 +
|
  
 
==Lotan tunnistamat M-koodisanat==
 
==Lotan tunnistamat M-koodisanat==
Rivi 478: Rivi 479:
 
| M99 || Aliohjelmasta paluu
 
| M99 || Aliohjelmasta paluu
 
|}
 
|}
 
+
|
 +
==M-code words recognized by Lotta==
 +
{| class = "wikitable"
 +
|-
 +
! M code !! Function
 +
|-
 +
| M00_Engl|M00 || Mandatory break. The program stops here until the user presses [CYCLE START] at which point the program continues
 +
|-
 +
| M01_Engl|M01 || Conditional break. Same as above, but only if panel [OPT STOP] is pressed active
 +
|-
 +
| M02_Engl|M02 || End of the program. Execution ends and the program is acknowledged as run.
 +
|-
 +
| '''M03''' || Spindle moved clockwise. The spindle starts rotating at the speed previously set by argument S.
 +
|-
 +
| '''M04''' || Spindle moved counterclockwise.
 +
|-
 +
| '''M05''' || Kara stand.
 +
|-
 +
| '''M06''' || Tool change - execution command. The pre-selection using the command word T is performed with this function.
 +
|-
 +
| '''M08''' || Cutting fluid on. Requires (COOLANT) [CLNT AUTO] to be selected as active on the panel
 +
|-
 +
| '''M09''' || Cutting fluid off
 +
|-
 +
| M19_Engl|M19 || Spindle orientation. Rotates the spindle to the position where the tool is changed. The same position is used e.g. counter-reaming, etc.
 +
|-
 +
| M29_Engl|M29 || Rigid threading mode on
 +
|-
 +
| '''M30''' || Ending the program and returning to the beginning
 +
|-
 +
| M40_Engl|M40 || 4th axle lock
 +
|-
 +
| M41_Engl|M41 || 4th shaft release
 +
|-
 +
| M94_Engl|M94 || Axis mirroring cancellation
 +
|-
 +
| M95_Engl|M95 || X-axis mirroring
 +
|-
 +
| M96_Engl|M96 || Y-axis mirroring
 +
|-
 +
| M98_Engl|M98 || Subroutine call
 +
|-
 +
| M99_Engl|M99 || Return from the subroutine
 +
|}
 +
|}
 
<br clear=all>
 
<br clear=all>
 
----
 
----

Nykyinen versio 12. helmikuuta 2021 kello 21.21

G-Code

G-koodisyntaksia noudattava CNC-ohjelma koostuu matalan tason toiminnoista joita kutsutaan lauseiksi (block). Lauseet puolestaan rakentuvat sanoista (code). Sanat ovat joko "valmistelevia" G-koodeja tai "sekalaisia" M-koodeja.
G-koodisyntaksi on lähes rakenteeton sillä mitään ohjelmakontrollin ohjausrakenteita kieleen ei kuulu. Aliohjelmakutsu käyttäen M-koodisanoja on olemassa mutta ei juuri muuta.
G-koodi on tulkattua koodia siinä mielessä, että kooditulkki jäsentää aina yhden kokonaisen lauseen kerrallaan ja optimoi sisällön suorituksen ennen sen käynnistämistä. Lotan Fanuc-ohjain toimii siten, että lauseessa mahdollisesti olevista ristiriitaisista käskysanoista viimeksi kirjoitettu jää voimaan ja toteutetaan.
On erityisesti syytä tiedostaa, lähes kaikki G-koodisanat ovat modaalisia eli ne jäävät voimaan kunnes samaan modaaliryhmään kuuluva toinen koodi astuu niiden tilalle. Samoin lauseesta puuttuva argumentti saa sen arvon joka sillä on viimeksi ollut jossain aikaisemmassa lauseessa. Näin ollen muuttumatonta argumenttia ei tarvitse toistaa lause lauseelta.

A CNC program that follows G-code syntax consists of low-level functions called blocks. Sentences, in turn, are built from words (code). The words are either "preparatory" G-codes or "Miscellaneous" M-codes.
The G-code syntax is almost unstructured because no program control controls are included in the language. A subroutine call using M codewords exists but little else.
G-code is interpreted code in the sense that the code interpreter always parses one whole sentence at a time and optimizes the execution of the content before it is launched. Lotta's Fanuc controller works in such a way that the last of the conflicting command words in a sentence remains valid and executed.
In particular, it should be noted that almost all G codewords are "modal", meaning that they remain in effect until another code belonging to the same modal group replaces them. Similarly, an argument that is missing from a sentence gets the value it last had in an earlier sentence. Therefore, the unchanged argument does not need to be repeated sentence by sentence.

Esimerkki yksinkertaisesta NC-lauseesta:
N001 G01 X500.000 Y60.000 Z0.000 M03
Rivinumero 001; koordinoitu liike työstönopeudella koordinaatteihin XYZ samalla käynnistäen kara pyörimään myötäpäivään

Esimerkki modaalisesta NC-lauseesta:
G01 X500. Y60. Z0. M03
X510.
X520.
Koordinoitu liike työstönopeudella koordinaatteihin 500/60/0, sen jälkeen 510/60/0 ja 520/60/0 koska G01 on modaalinen.

Example of a simple NC block:
N001 G01 X500.000 Y60.000 Z0.000 M03
Line number 001; coordinated movement at machining speed to XYZ coordinates while starting the spindle to rotate clockwise

Example of a modal NC block:
G01 X500. Y60. Z0. M03
X510.
X520.
Coordinated movement at machining speed to coordinates 500/60/0, then 510/60/0 and 520/60/0 because G01 is modal.

Lotan tunnistamat G-koodisanat

Useimmat G-koodilauseet muodostuvat valmistelevasta G-koodista, sekä siihen liittyvistä yhdestä tai useammasta argumentista. Lauseissa käytetään myös "sekalaisia" M-koodisanoja ohjaamaan koneen toimintoja päälle ja pois.
Koska useimmat G-koodisanat ovat modaalisia, usein riittää pelkkä argumenttien mainitseminen läskylauseessa, jolloin voimassa oleva modaalinen käsky toistetaan kyseisillä argumenteilla. Tästä edellä yksinkertainen esimerkki.

G-koodisanojen argumentit

Argumentti Ohjaa koodeja Toiminto
P_ --- Lyhennetty asemakoordinaatin esitystapa. Sama kuin X_ Y_ Z_ missä _ tarkoittaa koordinaatin numeroarvoa. Myös vaihtoehtoiset koordinaatit kuten IJK, UVW jne.
X, Y, Z Modaali 01 koodit Paikkakoordinaatit liikettä varten
A, B, C Modaali 01 koodit Kulmakoordinaatit X, Y, Z-akselien ympäri tapahtuvaa kiertoa varten (4. akseli)
I, J, K G02, G03 Suhteelliset paikkakoordinaatit ympyränkaaren keskipisteen sijoitamiseksi
U, V, W Modaali 01 koodit X, Y, Z-akselien suuntaiset suhteelliset paikkakoordinaatit liikettä varten
S M03, M04 Karan kierosluvun ohjearvo
F Modaali 01 koodit Syöttöliikkeen nopeus mm/min
H Modaali 01 koodit Työkalun pituus- ja sädekompensointi
T --- Työkalun valinta
R modaali 09 koodit

G02, G03

Liikkeen paluutaso katkoporauksessa ja vastaavissa

Säteen määrittely ympyräinterpolaatiossa

Q Modaali 09 koodit Porauksen askelsyvyys katkoporauksessa tms
P G04 Taukoaika ms
N --- Lauseen rivinumero (ei pakollinen)

G-code words recognized by Lotta

Most G-code statements consist of a preparatory G-code, and one or more arguments associated with it. The sentences also use "Miscellaneous" M-code words to control the machine functions on and off.
Since most G codewords are modal, it is often sufficient to simply mention the arguments in the statement statement, in which case the valid modal statement is repeated with those arguments. A simple example of this above.

G codeword arguments

Argument Control codes Function
P_ --- Abbreviated position coordinate format. Same as X_ Y_ Z_ where _ is the numeric value of the coordinate. Also alternative coordinates such as IJK, UVW, etc.
X, Y, Z Modal 01 codes Position coordinates for motion
A, B, C Modal 01 codes Angular coordinates for rotation about the X, Y, Z axes (4th axis)
I, J, K G02, G03 Relative position coordinates to position the center of the arc
U, V, W Modal 01 codes Relative position coordinates along the X, Y, Z axes for motion
S M03, M04 Spindle speed setpoint
F Modal 01 codes Feed speed mm / min
H Modal 01 codes Tool length and radius compensation
T --- Tool selection
R modal 09 codes

G02, G03

The return level of the movement in break drilling and the like

Radius definition in circular interpolation

Q Modal 09 codes Drilling step depth in break drilling, etc.
P G04 Pause time ms
N --- Sentence line number (optional)

Varsinaiset G-koodisanat

G-koodi Modaaliryhmä Toiminto
G00 01 Pikaliike annettuihin koordinaatteihin
G01 01 Koordinoitu liike työstönopeudella annettuihin koordinaatteihin
G02 01 Ympyräinterpolaatio myötäpäivään
G03 01 Ympyräinterpolaatio vastapäivään
G04 00 Tauko
G05 00 Suurnopeussyklillä koneistus
G09 00 Täsmällinen paikoitus
G15 17 Polaarikoordinaattimoodin peruutus
G16 17 Polaarikoordinaatimoodin asetus
G17 02 XY-tason asetus ympyräinterpolaatioon
G18 02 ZX-tason asetus ympyräinterpolaatioon
G19 02 YZ-tason asetus ympyräinterpolaatioon
G20 06 Mittayksiköt tuumina
G21 06 Mittayksiköt milleinä
G22 00 Esimerkki
G23 00 Esimerkki
G27 00 Kotiasemaan ajon tarkistus
G28 00 Ajo kotiasemaan
G29 00 Paluu kotiasemasta
G30 00 Paluu 2. kotiasemaan
G31 00 Toiminnon ohitus
G33 01 Kierteitys
G39 00 Nurkan kierto ympyräinterpolaation avulla
G40 07 Työkalun säteen kompensoinnin peruutus
G41 07 Työkalun säteen kompensointi vasemmalle
G42 07 Työkalun säteen kompensointi oikealle
G43 08 Työkalun pituuskompensointi summaten (+ suuntaan)
G44 08 Työkalun pituuskompensointi vähentäen (- suuntaan)
G45 00 Työkaluoffsetin kasvatus
G46 00 Työkaluoffsetin vähennys
G47 00 Työkaluoffsetin 2x kasvatus
G48 00 Työkaluoffsetin 2x vähennys
G49 08 Työkalun pituuskompensoinnin peruutus
G50 11 Skaalauksen peruutus
G51 11 Skaalauksen asetus
G52 00 Työkoordinaatiston siirto
G53 00 Liikkeen referointi konekoordinaatteihin
G54 14 Työkoordinaatiston 1 valinta
G55 14 Työkoordinaatiston 2 valinta
G56 14 Työkoordinaatiston 3 valinta
G57 14 Työkoordinaatiston 4 valinta
G58 14 Työkoordinaatiston 5 valinta
G59 14 Työkoordinaatiston 6 valinta
G60 00 Yksisuuntainen paikoitus
G61 15 Tarkka pysäytystila
G62 15 Automaattinen nurkan ohitustila
G63 15 Kierteitystila
G64 15 Leikkuutyöstötila
G65 12 Makrokäsky, makrokutsu
G66 12 Kustom-makron modaalinen kutsu
G67 12 Kustom-makron modalisen kutsun peruutus
G68 16 Koordinaatiston kierto
G69 16 Koordinaatiston kieron peruutus
G73 09 Katkoporaus-työkierto 1
G74 09 Vastakierteitys-työkierto
G76 09 Tarkkuusavarrus
G80 09 Työkierron peruutus
G81 09 Pisteporaus-työkierto
G82 09 Vastaporaus-työkierto
G83 09 Katkoporaus-työkierto 2
G84 09 Kierteitys-työkierto
G85 09 Avarrustyökierto
G86 09 Avarrustyökierto
G87 09 Vasta-avarrustyökierto
G88 09 Avarrustyökierto
G89 09 Avarrustyökierto
G90 03 Absoluuttikoordinaattien valinta
G91 03 Suhteellisten koordinaattien valinta
G92 00 Absoluuttikoordinaatiston origon asetus
G94 05 Syöttö yks/minuutti
G95 05 Syöttö yks/karan kierros
G96 13 Vakio-pintanopeussäätö päälle
G97 13 Vakio-pintanopeussäätö pois päältä
G98 10 Työkierrossa välipaluu alkupisteen tasalle
G99 10 Työkierrossa välipaluu R-koordinaatin tasalle

Actual G codewords

G code Modal group Function
G00 01 Fast motion to the given coordinates
G01 01 Coordinated motion at the machining speed to the given coordinates
G02 01 Circular interpolation clockwise
G03 01 Circular interpolation counterclockwise
G04 00 Break
G05 00 Machining with high speed cycle
G09 00 Accurate positioning
G15 17 Canceling the polar coordinate mode
G16 17 Polar coordinate mode setting
G17 02 XY plane setting for circular interpolation
G18 02 ZX plane setting for circular interpolation
G19 02 YZ level setting for circular interpolation
G20 06 Units of measurement in inches
G21 06 Units of measurement in millis
G22 00 Example
G23 00 Example
G27 00 Home drive check
G28 00 Driving to your home station
G29 00 Return from home station
G30 00 Return to 2nd home station
G31 00 Bypass function
G33 01 Threading
G39 00 Angle rotation by circular interpolation
G40 07 Cancel tool radius compensation
G41 07 Tool radius compensation to the left
G42 07 Tool radius compensation to the right
G43 08 Tool length compensation by summing (+ direction)
G44 08 Tool length compensation decreasing (- direction)
G45 00 Tool offset breeding
G46 00 Tool offset reduction
G47 00 2x increase in tool offset
G48 00 2x reduction of tool offset
G49 08 Cancel tool length compensation
G50 11 Cancel scaling
G51 11 Scaling setting
G52 00 Transfer of work coordinate system
G53 00 Reference of motion to machine coordinates
G54 14 Selection of work coordinate system 1
G55 14 Selection of work coordinate system 2
G56 14 Selection of work coordinate system 3
G57 14 Selection of work coordinate system 4
G58 14 Selection of work coordinate system 5
G59 14 Selection of work coordinate system 6
G60 00 One-way parking
G61 15 Exact stop mode
G62 15 Automatic corner bypass mode
G63 15 Threading mode
G64 15 Cutting machine mode
G65 12 Macro instruction, macro call
G66 12 Modal call to the custom macro
G67 12 Cancel a modal call to a custom macro
G68 16 Coordinate system rotation
G69 16 Canceling the coordinate system rotation
G73 09 Intermittent drilling cycle 1
G74 09 Counter-threading cycle
G76 09 Precision armature
G80 09 Cycle cancellation
G81 09 Spot drilling cycle
G82 09 Counter-drilling cycle
G83 09 Intermittent drilling cycle 2
G84 09 Threading cycle
G85 09 Boring cycle
G86 09 Boring cycle
G87 09 Counter-reaming cycle
G88 09 Boring cycle
G89 09 Boring cycle
G90 03 Selection of absolute coordinates
G91 03 Selection of relative coordinates
G92 00 Setting the origin of the absolute coordinate system
G94 05 Input one / minute
G95 05 Feed one / spindle revolution
G96 13 Constant surface speed control on
G97 13 Constant surface speed control off
G98 10 In the cycle, a snippet returns to the starting point
G99 10 In the cycle, return to the R coordinate

Lotan tunnistamat M-koodisanat

M-koodi Toiminto
M00 Pakollinen tauko. Ohjelma pysähtyy tähän kunnes käyttäjä painaa [CYCLE START] jolloin ohjelma jatkaa
M01 Ehdollinen tauko. Sama kuin edellä, mutta vain mikäli paneelin [OPT STOP] on painettuna aktiiviseksi
M02 Ohjelman lopetus. Suoritus päättyy ja ohjelma kuitataan ajetuksi.
M03 Kara liikkeelle myötäpäivään. Kara lähtee pyörimään nopeudella joka on aiemmin asetettu argumentilla S
M04 Kara liikkeelle vastapäivään.
M05 Kara seis.
M06 Työkalun vaihto - suorituskäsky. Edeltävä valinta käyttäen käskysanaa T toteutetaan tällä toiminnolla.
M08 Leikkuuneste päälle. Edellytää, että paneelissa on valittu (COOLANT) [CLNT AUTO] aktiiviseksi
M09 Leikkuuneste pois
M19 Karan orientointi. Kiertää karan asentoon jossa työkalun vaihto tapahtuu. Samaa asentoa käytetään mm. vasta-avarruksessa jne
M29 Jäykkä kierteitystila päälle
M30 Ohjelman lopetus ja paluu alkuun
M40 4. akselin lukitus
M41 4. akselin vapautus
M94 Akselin peilauksen peruutus
M95 X-akselin peilaus
M96 Y-akselin peilaus
M98 Aliohjelman kutsu
M99 Aliohjelmasta paluu

M-code words recognized by Lotta

M code Function
M00 Mandatory break. The program stops here until the user presses [CYCLE START] at which point the program continues
M01 Conditional break. Same as above, but only if panel [OPT STOP] is pressed active
M02 End of the program. Execution ends and the program is acknowledged as run.
M03 Spindle moved clockwise. The spindle starts rotating at the speed previously set by argument S.
M04 Spindle moved counterclockwise.
M05 Kara stand.
M06 Tool change - execution command. The pre-selection using the command word T is performed with this function.
M08 Cutting fluid on. Requires (COOLANT) [CLNT AUTO] to be selected as active on the panel
M09 Cutting fluid off
M19 Spindle orientation. Rotates the spindle to the position where the tool is changed. The same position is used e.g. counter-reaming, etc.
M29 Rigid threading mode on
M30 Ending the program and returning to the beginning
M40 4th axle lock
M41 4th shaft release
M94 Axis mirroring cancellation
M95 X-axis mirroring
M96 Y-axis mirroring
M98 Subroutine call
M99 Return from the subroutine



Ylös