<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/" >

<channel>
	<title>Learn G-Code – CNCGRAF: Software for controlling CNC machines</title>
	<atom:link href="https://cncgraf.com/en/tag/g-code-lernen/feed/" rel="self" type="application/rss+xml" />
	<link>https://cncgraf.com/en</link>
	<description></description>
	<lastBuildDate>Fri, 02 Feb 2024 18:34:48 +0000</lastBuildDate>
	<language>English (UK)</language>
	<sy:updateperiod>
	hourly	</sy:updateperiod>
	<sy:updatefrequency>
	1	</sy:updatefrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://cncgraf.com/wp-content/uploads/2023/04/cropped-app-32x32.png</url>
	<title>Learn G-Code – CNCGRAF: Software for controlling CNC machines</title>
	<link>https://cncgraf.com/en</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>CNC programming: Learn G-code</title>
		<link>https://cncgraf.com/en/2023/12/20/cnc-programming-g-code-learn-commands/</link>
		
		<dc:creator><![CDATA[Michael Boenigk]]></dc:creator>
		<pubDate>Wed, 20 Dec 2023 13:09:53 +0000</pubDate>
				<category><![CDATA[G-Code]]></category>
		<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[CNC Programmierung]]></category>
		<category><![CDATA[CNC-Maschinen-Emulator]]></category>
		<category><![CDATA[G-Code lernen]]></category>
		<category><![CDATA[G-Code-Simulator]]></category>
		<guid ispermalink="false">https://cncgraf.com/?p=3742</guid>

					<description><![CDATA[In modern manufacturing, G-code is generated automatically by CAD/CAM software, which means that manual programming of G-code is rarely necessary. Nevertheless, it is important to know the basics of G-code programming.]]></description>
										<content:encoded><![CDATA[<div class="wp-block-group alignfull has-tertiary-background-color has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h1 class="wp-block-heading alignwide has-text-align-center has-tertiary-background-color has-background has-large-font-size" id="cnc-programmierung-g-code-lernen-einfach-und-schnell">CNC programming: <br>Learn G-code - Quick and easy</h1>



<p class="wp-block-paragraph">G-code is a computer language that is used to control CNC machines. CNC stands for Computerised Numerical Control, which means that machines are controlled by computers.</p>



<p class="wp-block-paragraph">In modern manufacturing, G-code is generated automatically by CAD/CAM software, which means that manual programming of G-code is rarely necessary. Nevertheless, it is important to know the basics of G-code programming. In particular, there are the following reasons for this:</p>



<ul class="wp-block-list">
<li><strong>Manual adjustment of the G-code:</strong> In production, simple parts are often manufactured that differ only slightly from one another. In such cases, it is advantageous to programme and adapt the G-code manually in the text editor. This saves time, as a new G-code file does not have to be generated using CAD/CAM software for every small variant or customisation.</li>
</ul>



<ul class="wp-block-list">
<li><strong>Troubleshooting and optimisation:</strong> An understanding of G-code programming enables CNC operators to quickly recognise and rectify errors in the programmes. If a CNC machine does not work as expected, the cause can often lie in the programming details of the G-code. An operator who is familiar with G-code programming can identify and correct such errors independently.</li>
</ul>



<ul class="wp-block-list">
<li><strong>Post-processor customisation:</strong> Sometimes it is necessary to adapt the post-processor in the CAD/CAM software to output the G-code, as the automatically generated G-code does not meet the requirements. In such cases, basic knowledge of G-code is advantageous.</li>
</ul>



<p class="wp-block-paragraph"><strong>In this blog article, you will learn the basics of G-code.</strong> You will then be able to write your own simple G-code programmes and solve the above-mentioned problems independently.</p>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<hr class="wp-block-separator alignfull has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-default"/>
</div>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h4>Learning G-Code Part 1/2: Basics</h4><nav><ul><li class=""><a href="#was-benotige-ich-fur-die-g-code-programmierung">What do I need for G-code programming?</a><ul><li class=""><a href="#kostenloser-g-code-simulator-cnc-gra-f">Free G-code simulator: cncGraF</a></li></ul></li><li class=""><a href="#aufbau-einer-g-code-datei">Structure of a G-code file</a></li><li class=""><a href="#g-code-kreise-und-kreisbogen">G-Code: Circles and arcs</a><ul><li class=""><a href="#g-code-bogenbefehl-g-02-g-03">G-Code: Sheet command G02/G03</a></li></ul></li><li class=""><a href="#tabelle-mit-den-wichtigsten-g-code-befehlen">Table with the most important G-code commands</a><ul><li class=""><a href="#befehlsubersicht-der-wichtigsten-g-code-befehle">Command overview of the most important G-code commands</a></li></ul></li><li class=""><a href="#zusammenfassung">Summary</a></li><li class=""><a href="#g-code-lernen-teil-2-2-fortgeschrittene-konzepte">Learning G-Code Part 2/2: Advanced concepts</a></li></ul></nav></div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="was-benotige-ich-fur-die-g-code-programmierung">What do I need for G-code programming?</h2>



<p class="wp-block-paragraph">The G-code consists of a series of text instructions that are stored in a text file (ASCII file). The CNC machine executes these commands in the sequence from the beginning of the text file to the end. </p>



<p class="wp-block-paragraph">Only a text editor is required for CNC programming and G-code. However, as a visual check of the programmed G-code is necessary, a CNC simulation must be used. </p>



<h3 class="wp-block-heading has-large-font-size" id="kostenloser-g-code-simulator-cnc-gra-f">Free G-code simulator: cncGraF</h3>



<p class="wp-block-paragraph">The CNC control software <a href="https://cncgraf.com/en/cncgraf-8-cnc-control-software-range-of-functions/" data-type="page" data-id="8">cncGraF</a> is ideal for training purposes: It offers a built-in G-code simulator and CNC machine emulator, is free of charge (freeware) and does not require a real CNC controller.</p>



<p class="wp-block-paragraph"><a href="https://cncgraf.com/en/download-cncgraf-cnc-control-software/" target="_blank" data-type="page" data-id="24" rel="noreferrer noopener">Click here to download cncGraF free of charge.</a></p>



<p class="wp-block-paragraph">The screenshot below presents CNC control cncGraF, including the G-code text editor and the 2D view. The CNC machine emulator is switched on and the G-code file is executed in emulator mode. <br>To find out more, click on the blog article <br><a href="https://cncgraf.com/en/2023/12/20/free-g-code-simulator-cnc-emulator/">cncGraF: Free G-code simulator and CNC machine emulator</a>.</p>



<figure class="wp-block-image aligncenter size-full is-resized"><img fetchpriority="high" decoding="async" width="949" height="1211" src="https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator.jpg" alt="The CNC control software cncGraF can be used as a free G-code simulator to help you learn G-code." class="wp-image-3809" style="width:443px;height:auto" srcset="https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator.jpg 949w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-600x766.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-235x300.jpg 235w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-802x1024.jpg 802w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-768x980.jpg 768w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-9x12.jpg 9w" sizes="(max-width: 949px) 100vw, 949px" /></figure>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="aufbau-einer-g-code-datei">Structure of a G-code file</h2>



<p class="wp-block-paragraph"><strong>The following example of a G-code file is available:</strong></p>



<p class="wp-block-paragraph"><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; G-code file: Production of a rectangle, created on 24/10/2023<br>; Activate tool number 1</mark></em><br><strong>T1</strong><br><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; Lift the tool at rapid speed to the height Z = 10 mm above the zero point<br></mark></em><strong>G00 Z10</strong><br><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; Move to position X = 10 and Y = 10 at rapid speed</mark></em><br><strong>G00 X10 Y10</strong><br><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; Switch on the work spindle with M3 at a speed of 20000 rpm</mark></em><br><strong>M3 S20000</strong><br><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; Wait 5 seconds until the spindle speed is reached</mark></em><br><strong>G04 H5</strong><br><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; plunge 2 mm into the workpiece at a feed rate of 600 mm per minute</mark></em><br><strong>G01 Z-2 F600</strong><br><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; Traverse rectangle 100×100 mm at a feed rate of 600 mm per minute</mark></em><br><strong>G01 X110<br>G01 Y110<br>G01 X10<br>G01 Y10</strong><br><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; Lift the tool at rapid speed to the height Z = 10 mm above the zero point</mark></em><br><strong>G00 Z10</strong><br><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; End of programme</mark></em><br><strong>M5 M30</strong></p>



<figure class="wp-block-image size-full"><img decoding="async" width="203" height="208" src="https://cncgraf.com/wp-content/uploads/2023/11/g-code-rechteck.jpg" alt="" class="wp-image-3874" srcset="https://cncgraf.com/wp-content/uploads/2023/11/g-code-rechteck.jpg 203w, https://cncgraf.com/wp-content/uploads/2023/11/g-code-rechteck-12x12.jpg 12w" sizes="(max-width: 203px) 100vw, 203px" /></figure>



<p class="wp-block-paragraph">This G-code describes the machining of a rectangle with a CNC machine. The G-code begins with comments that are separated by a semicolon<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong> (;)</strong> </mark>are labelled. These comments are not relevant for the machine, but help the operator to understand the code.</p>



<ul class="wp-block-list">
<li><strong>Tool selection:</strong> First, tool 1 is selected with the command <code><strong>T1</strong></code> selected.</li>



<li><strong>Positioning of the tool:</strong> The command <code><strong>G00 Z10</strong></code> lifts the tool to 10 mm above the zero point of the machine. <code><strong>G00</strong></code> the machine travels at rapid traverse, i.e. at maximum speed. </li>



<li><strong>Moving to the start position:</strong> The machine runs with <code><strong>G00 X10 Y10</strong></code> to position X=10 Y=10.</li>



<li><strong>Switch on the spindle:</strong> With <code><strong>M3 S20000</strong></code> the spindle is switched on and set to 20000 revolutions per minute.</li>



<li><strong>Waiting time:</strong> The command <code><strong>G04 H5</strong></code> ensures that the machine waits 5 seconds for the spindle to reach the desired speed.</li>



<li><strong>Immerse yourself in the material:</strong> With <code><strong>G01 Z-2 F600</strong></code> the tool plunges 2 mm deep into the material at a feed rate of 600 mm per minute. <strong><code>G01</code> </strong>is used for the milling movements.</li>



<li><strong>Rectangular machining:</strong> The next commands (<code>G01 X110</code>, <code>G01 Y110</code>, <code>G01 X10</code>, <code>G01 Y10</code>) move the tool to mill a 100×100 mm rectangle.</li>



<li><strong>Return to the starting position Z:</strong> <code><strong>G00 Z10</strong></code> lifts the tool back to 10 mm above the zero point.</li>



<li><strong>End of programme:</strong> The command <strong>M05 </strong>switches the spindle and the command <strong>M<code>30</code> </strong>ends the programme.</li>
</ul>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="g-code-kreise-und-kreisbogen">G-Code: Circles and arcs</h2>



<p class="wp-block-paragraph">Next, we extend our example with <strong>a circular milling that must be carried out before the rectangle. </strong>The extended and modified G-code lines are colour-coded in <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>Light red </strong></mark>highlighted. The G-code then looks like this:</p>



<p class="wp-block-paragraph"><em>; G-code file: Production of a rectangle, created on 24/10/2023<br>; Tool number 1 is selected<br></em><strong>T1</strong><br><em>; Lift the tool at rapid speed to the height Z = 10 mm above the zero point<br></em><strong>G00 Z10</strong><br><em>; Move to position X = 10 and Y = 10 at rapid speed</em><br><strong>G00 X10 Y10</strong><br><em>; Switch on the work spindle with M3 at a speed of 2000 rpm</em><br><strong>M3 S2000</strong><br><em>; Wait 5 seconds until the spindle speed is reached</em><br><strong>G04 H5</strong><br><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><em>; Move to the centre of the rectangle</em><br><strong>G00 X60 Y40</strong><br><em>; plunge 2 mm into the workpiece at a feed rate of 600 mm per minute</em><br><strong>G01 Z-2 F600</strong><br><em>; Circle (d=20mm, centre 60×60) clockwise </em></mark><br><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><em>; with feed 600 mm per minute</em></mark> <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><em>drive</em><br><strong>G02 I60 J60 X60 Y40</strong><br>; Lift tool at rapid speed : Z = 10mm above the zero point<br><strong>G00 Z10</strong><br><em>; Move to position X = 10 and Y = 10 at rapid speed</em><br><strong>G00 X10 Y10</strong></mark><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-2-ffd-57-c-color"><br></mark><em>; plunge 2 mm into the workpiece at a feed rate of 600 mm per minute</em><br><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>G01 Z-2</strong></mark><br><em>; Traverse rectangle 100×100 mm at a feed rate of 600 mm per minute</em><br><strong>G01 X110<br>G01 Y110<br>G01 X10<br>G01 Y10</strong><br><em>; Lift tool at rapid speed : Z = 10mm above the zero point</em><br><strong>G00 Z10</strong><br><em>; End of programme</em><br><strong>M5 M30</strong></p>



<p class="wp-block-paragraph">The G-code simulator (see screenshot) shows a rectangle and a circle placed in the centre of the rectangle.</p>



<p class="wp-block-paragraph"><img decoding="async" width="24" height="24" class="wp-image-1774" style="width: 24px;" src="https://cncgraf.com/wp-content/uploads/2023/08/warnung.png" alt=""> <strong>Important:</strong> If the drawing is not displayed correctly, this may be due to the incorrect setting for the G02/G03 circle (arc) commands. The G02/G03 commands can be interpreted as relative or absolute. This example refers to G02/G03 in absolute form. In this case, the „G02/03 relative“ option must be deactivated in the cncGraF G-code simulator in the main menu „Settings → Options → File → G-code“.“</p>



<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="702" height="1024" src="https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-2-702x1024.jpg" alt="Free G-code simulator: cncGraF" class="wp-image-3854" style="width:516px;height:auto" srcset="https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-2-702x1024.jpg 702w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-2-600x875.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-2-206x300.jpg 206w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-2-768x1120.jpg 768w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-2-8x12.jpg 8w, https://cncgraf.com/wp-content/uploads/2023/11/texteditor-g-code-simulator-2.jpg 898w" sizes="auto, (max-width: 702px) 100vw, 702px" /></figure>



<h3 class="wp-block-heading has-large-font-size" id="g-code-bogenbefehl-g-02-g-03">G-Code: Sheet command G02/G03</h3>



<p class="wp-block-paragraph">The G02 command is used to programme a circular or arc-shaped movement in a clockwise direction. Command G03 does the same, but in an anti-clockwise direction.</p>



<p class="wp-block-paragraph">The G02 command in the G code has the following syntax:<br><strong>G02 X... Y... I... J...</strong><br>It says:</p>



<ul class="wp-block-list">
<li>‚<strong>G02</strong>‚ for the command itself, which represents a clockwise arc. The last position of the previous G-code command is the start position of the circle or arc.</li>



<li><strong>X</strong>... and <strong>Y</strong>... indicate the end coordinates of the circle or arc.</li>



<li><strong>I</strong>... and <strong>J</strong>... indicate the distance from the current point to the centre of the arc on the X and Y axes.</li>
</ul>



<p class="wp-block-paragraph"><strong>G00 X60 Y40</strong> <em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; This is the start position X,Y of the arc.</mark></em><br><strong>G02 I60 J60 X60 Y40</strong> <em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; This command moves the tool in a clockwise arc.</mark></em></p>



<ul class="wp-block-list">
<li><strong>I60 J60:</strong> These are the coordinates of the centre of the circle relative to the current position <br>X = 60 Y = 40 In this case, the centre point is at X = 60, Y = 60.</li>



<li><strong>X60 Y40:</strong> These are the end coordinates of the arc. The tool moves to the point X = 60, Y = 40.</li>



<li>The diameter of the circle (d = 20 mm) is determined by the position of the tool and the coordinates of the centre point.</li>
</ul>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="tabelle-mit-den-wichtigsten-g-code-befehlen">Table with the most important G-code commands</h2>



<p class="wp-block-paragraph">In this example, you have learnt the basic G-code commands: G01 and G00 for simple movements, the arc command G02, switching the spindle on and off with M03 (and M05), the ‚S‘ command for the spindle speed, the tool number command ‚T‘, G04 for waiting times, ‚F‘ for the working speed and M30 for the end of file. These commands form the basis and are already sufficient for writing your own simple G-code programmes.</p>



<p class="wp-block-paragraph">Below you will find a tabular overview of all the most important G-code commands.</p>



<h4 class="wp-block-heading has-large-font-size" id="befehlsubersicht-der-wichtigsten-g-code-befehle">Command overview of the most important G-code commands</h4>



<p class="wp-block-paragraph">The tabular list of G commands (G code) contains only those commands that are suitable for manual programming as they are easy to use. The complete list of all G-code commands can be found in the cncGraF CNC simulator in the online help [F1 key].</p>



<figure class="wp-block-table is-style-stripes"><table><thead><tr><th class="has-text-align-center" data-align="center">G-Code</th><th class="has-text-align-left" data-align="left">Description of the</th></tr></thead><tbody><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">; ()</mark></strong></td><td class="has-text-align-left" data-align="left">The comments are closed with a semicolon ‚<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">;</mark></strong>‚ or with brackets ‚<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>()</strong></mark>‚ is labelled. The comments are ignored by the CNC machine.<br><br>Example:<br><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><em>(Move to position Z10)</em></mark></strong><br>G00 Z10 <br><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><em>; Move to position Z10</em></mark></strong><br>G00 Z10 </td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">N</mark></strong></td><td class="has-text-align-left" data-align="left"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>N</strong></mark> for record number (optional)<br><br>Example:<br><em>; Record number is not necessary.</em><br><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">N10 </mark></strong>T1 M3 S2501</td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">F</mark></strong></td><td class="has-text-align-left" data-align="left"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>F</strong></mark> for feed rate in mm/min<br><br>Example:<br><em>; travel at 300 mm/min</em><br>G01 X100 Y10 <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">F300</mark></strong></td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">T</mark></strong></td><td class="has-text-align-left" data-align="left"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>T</strong></mark> for tool number<br><br>Example:<br><em>; Tool 1 is active</em><br><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">T1</mark></strong></td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">M03 S</mark></strong></td><td class="has-text-align-left" data-align="left"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>M03</strong></mark> switches the spindle on,<strong> <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">S</mark> </strong>defines the spindle speed in rpm<br><br>Example:<br><em>; Spindle is switched at 2000 revolutions per minute</em><br><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>M3 S2000</strong></mark></td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">D</mark></strong></td><td class="has-text-align-left" data-align="left"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>D</strong></mark> Tool diameter in millimetres.<br><br>Example:<br><em>; Diameter 2.5 mm. D must be directly behind T</em><br><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">T1 D2.5</mark></strong></td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G00</mark></strong></td><td class="has-text-align-left" data-align="left">With <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>G00</strong> </mark>the machine travels at rapid traverse, i.e. at maximum speed. <br>The tool is not in the material (empty run).<br><br>Example:<br><em>; Position X = 100 Y = 10</em> <em>Start up</em><br><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G00 </mark></strong>X100 Y10</td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G01</mark></strong></td><td class="has-text-align-left" data-align="left">With <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>G01</strong> </mark>the programmed path is travelled at the milling speed (feed speed ‚F‘). <br>This path is visualised as a vector in the cncGraF G-code simulator.<br><br>Example:<br><em>; Position X = 100 Y = 100 <em>with 300 mm/min</em> Start up</em><br><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G01 </mark></strong>X100 Y10 <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">F300</mark></strong></td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G02/G03</mark></strong></td><td class="has-text-align-left" data-align="left"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G02</mark></strong> Circle (arc) clockwise, <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G03</mark></strong> Circle (arc) anti-clockwise.<br>Parameters: <strong>X Y I J K</strong><br><strong>X</strong> End coordinate in X direction<br><strong>Y</strong> End coordinate in Y direction<br><strong>I </strong>Centre point in X direction<br><strong>J</strong> Centre point in Y direction<br><strong>K</strong> Centre point in Z direction<br><br>Example:<br>G00 X10 Y10 F100<br>G01 Z-2 F50<br><em>; Move in an arc from X10, Y10 to X30, Y10 with the centre point I20 and J10</em><br><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>G02</strong> </mark>I20 J10 X30 Y10</td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G04 H</mark></strong></td><td class="has-text-align-left" data-align="left">With <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G04 </mark></strong>a dwell time is programmed.<br>Parameters: <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">H</mark></strong> - Specification of the time in seconds<br><br>Example:<br><em>; Waiting time 2.5 seconds. This command instructs the CNC machine to </em><br>; <em>to pause for the specified time before executing the next command.<br></em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>G04</strong> </mark><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">H</mark></strong>2.5</td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G70/G71</mark></strong></td><td class="has-text-align-left" data-align="left">With <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G70 </mark></strong>and<strong> </strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>G71</strong> </mark>the dimensioning of the coordinates is defined between inches (G70) and millimetres (G71). If not specified, G71 is active.<br><br>Example:<br><em>; Dimensioning of the coordinates is in millimetres </em><br><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G71</mark></strong></td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G80/G81/G82</mark></strong></td><td class="has-text-align-left" data-align="left">The drilling cycle <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G81/G82</mark></strong> is suitable for simple drilling and drilling with dwell time. The drilling cycle is started with the command <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G80 </mark></strong>or by another G command such as. <strong>G00</strong> or <strong>G01 </strong>deleted. Format: <strong>G98(G99) G81(G82) X Y Z R F (P)</strong><br><br>Parameters <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G81</mark></strong><br><strong>X</strong> - Position X<br><strong>Y</strong> - Position Y<br><strong>Z</strong> - Depth Z (absolute)<br><strong>R</strong> - Incremental value of the retraction plane, in relation to the starting point in the Z-axis<br><strong>F</strong> - Feed rate<br><br>Additional parameters for <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G82</mark></strong><br><strong>P</strong> - Waiting time in milliseconds (1000ms = 1sec.) at the bottom of the hole<br><br>With commands <strong>G98 </strong>and <strong>G99 </strong>The retraction height to which the tool should move after the drilling cycle is defined.<br><br><strong>G98 </strong>- The starting height (starting height) is approached after the drilling cycle.<br><strong>G99 </strong>- the retraction height (defined in parameter R) is approached after the drilling cycle.<br><br>Example:<br><em>; Drilling with dwell time, depth Z = 10mm, waiting 100 milliseconds at the bottom of the hole<br></em>G98 <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G82 </mark></strong>X10 Y10 Z-10 F300 P100</td></tr><tr><td class="has-text-align-center" data-align="center"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G90/G91</mark></strong></td><td class="has-text-align-left" data-align="left">With <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>G90</strong> </mark>Absolute dimension is activated, i.e. all subsequent coordinate values are specified in absolute dimension. <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G91 </mark></strong>activates the relative dimensioning (incremental dimension). Without specification <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G90 </mark></strong>active.<br><br>Example:<br><em>; Relative dimension (incremental dimension) is set<br></em><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G91</mark></strong></td></tr></tbody></table></figure>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="zusammenfassung">Summary</h2>



<p class="wp-block-paragraph">G-code programming for CNC machines is not that difficult. With an understanding of only about ten basic G-code commands, you can already achieve impressive results. Learning G-code is definitely worthwhile as it allows you to better understand and utilise your CNC machines.</p>



<p class="wp-block-paragraph">I hope this blog article helps you to quickly familiarise yourself with G-code programming.</p>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
</div>



<div class="wp-block-group alignwide has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="g-code-lernen-teil-2-2-fortgeschrittene-konzepte">Learning G-Code Part 2/2: Advanced concepts</h2>



<p class="wp-block-paragraph">In the second part of this series, you will learn how to modify simple G-code files in production by using parameters without having to create a new file. In part 2, we will focus specifically on the commands for subroutines, the G25/G26 loops, the IF statement and the use of parameters.</p>



<p class="wp-block-paragraph">Click on the blog article „<a href="https://cncgraf.com/en/2024/01/15/cnc-programming-g-code-learning-part2/" data-type="post" data-id="4387">Learning G-Code Part 2/2: Advanced CNC programming</a>“ to find out more.</p>



<p class="wp-block-paragraph">Yours sincerely, Your BOENIGK-electronics Team</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://www.cnc-controller.eu/" target="_blank" rel="noopener">To the online shop</a></div>
</div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
</div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>