<?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>G-Code – CNCGRAF: Software for controlling CNC machines</title>
	<atom:link href="https://cncgraf.com/en/tag/g-code/feed/" rel="self" type="application/rss+xml" />
	<link>https://cncgraf.com/en</link>
	<description></description>
	<lastbuilddate>Wed, 19 Jun 2024 07:50:19 +0000</lastbuilddate>
	<language>English (UK)</language>
	<sy:updateperiod>
	hourly	</sy:updateperiod>
	<sy:updatefrequency>
	1	</sy:updatefrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://cncgraf.com/wp-content/uploads/2023/04/cropped-app-32x32.png</url>
	<title>G-Code – CNCGRAF: Software for controlling CNC machines</title>
	<link>https://cncgraf.com/en</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>G-code drilling cycle G81, G82, G83, G73 and G84: Step-by-step instructions</title>
		<link>https://cncgraf.com/en/2024/02/03/g-code-drilling-cycle-g82-cycles-drilling-programme/</link>
		
		<dc:creator><![CDATA[Michael Boenigk]]></dc:creator>
		<pubdate>Sat, 03 Feb 2024 12:00:00 +0000</pubdate>
				<category><![CDATA[G-Code]]></category>
		<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Bohrzyklen]]></category>
		<category><![CDATA[Gewindebohrzyklus]]></category>
		<guid ispermalink="false">https://cncgraf.com/?p=5120</guid>

					<description><![CDATA[In this article, we will take a detailed look at the G-code drilling cycle. You can then easily integrate these commands into your projects. Have fun reading!]]></description>
										<content:encoded><![CDATA[<div class="wp-block-group alignfull has-base-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-7db9d80f wp-block-group-is-layout-constrained" style="padding-right:0;padding-left:0">
<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h1 class="wp-block-heading alignwide has-text-align-center has-base-background-color has-background has-large-font-size" id="g-code-bohrzyklus-g-81-g-82-g-83-g-73-und-g-84-schritt-fur-schritt-anleitung">G-code drilling cycle G81, G82, G83, G73 and G84: Step-by-step instructions</h1>



<p>In the previous blog posts, „<a href="https://cncgraf.com/en/2023/12/20/cnc-programming-g-code-learn-commands/" data-type="post" data-id="3742">CNC programming: Learn G-code - Quick and easy</a>“ and „<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>„, we learnt the basics and advanced aspects of G-code programming. However, one important G-code command has not yet been covered in these articles - the G-code drilling cycle.<br><br>In this article, we will take a detailed look at the G-code drilling cycle. You can then easily integrate these commands into your projects. Have fun reading!<br><br>We use our free G-Code Simulator as a working tool <a href="https://cncgraf.com/en/cncgraf-8-cnc-control-software-range-of-functions/" data-type="page" data-id="8">cncGraF</a>.<br>„<a href="https://cncgraf.com/en/download-cncgraf-cnc-control-software/" target="_blank" rel="noreferrer noopener">Click here to download cncGraF free of charge“</a>.</p>



<p>To find out more about our G-Code Simulator, please click here<br>„<a href="https://cncgraf.com/en/2023/12/20/free-g-code-simulator-cnc-emulator/" data-type="post" data-id="3822">cncGraF: Free G-code simulator and CNC machine emulator</a>„.</p>



<figure class="wp-block-image size-large is-resized"><img fetchpriority="high" decoding="async" width="1024" height="836" src="https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-1024x836.jpg" alt="cncGraF 8: Free G-code simulator and CNC machine emulator" class="wp-image-4998" style="width:625px;height:auto" srcset="https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-1024x836.jpg 1024w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-600x490.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-300x245.jpg 300w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-768x627.jpg 768w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-15x12.jpg 15w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei.jpg 1045w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h4>Overview</h4><nav><ul><li class=""><a href="#bohren-ohne-g-code-bohrzyklus">Drilling without G-code Drilling cycle</a></li><li class=""><a href="#g-code-bohrzyklus-g-81-und-g-82">G-code drilling cycle: G81 and G82</a></li><li class=""><a href="#g-code-befehl-g-80">G-Code command: G80</a></li><li class=""><a href="#g-code-bohrzyklus-g-83-tieflochbohren-mit-spanabfuhr">G-code drilling cycle: G83 Deep-hole drilling with chip removal</a></li><li class=""><a href="#g-code-bohrzyklus-g-73-tieflochbohren">G-code drilling cycle: G73 Deep hole drilling</a></li><li class=""><a href="#g-code-gewindebohrzyklus-g-84">G-code tapping cycle: G84</a></li></ul></nav></div>



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



<hr class="wp-block-separator alignfull has-text-color has-tertiary-color has-alpha-channel-opacity has-tertiary-background-color has-background"/>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-container-core-group-is-layout-7db9d80f wp-block-group-is-layout-constrained" style="padding-right:0;padding-left:0">
<h2 class="wp-block-heading has-base-background-color has-background has-large-font-size" id="bohren-ohne-g-code-bohrzyklus">Drilling without G-code Drilling cycle</h2>



<p>As drilling only requires a lowering in the Z-axis, this can also be carried out without the G-code drilling cycle. To do this, simply use the G-code command <strong>G01 Z</strong> is used. An example (excerpt) of the corresponding G-code looks like this:</p>



<figure class="wp-block-table is-style-stripes"><table><thead><tr><th class="has-text-align-left" data-align="left">Example </th></tr></thead><tbody><tr><td class="has-text-align-left" data-align="left"><em>; 10 mm into the workpiece at a feed rate of 600 mm per minute</em><br><strong>G01 Z-10 F600</strong><br><em>; wait 1 second</em><br><strong>G04 H1</strong><br><em>; Lift the tool at rapid speed to the height Z = 5 mm above the zero point</em><br><strong>G00 Z5</strong></td></tr></tbody></table><figcaption class="wp-element-caption">Drilling with <strong>G01 Z</strong> without G-code drilling cycle</figcaption></figure>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<hr class="wp-block-separator alignfull has-text-color has-tertiary-color has-alpha-channel-opacity has-tertiary-background-color has-background"/>



<h2 class="wp-block-heading has-base-background-color has-background has-large-font-size" id="g-code-bohrzyklus-g-81-und-g-82">G-code drilling cycle: G81 and G82</h2>



<p>The simplest drilling cycle is the G-code command <strong>G81</strong>. This drilling cycle is used for simple drilling, while the command <strong>G82 </strong>additionally enables drilling with a dwell time at the bottom of the hole.<br><br>The <strong>G81</strong>/<strong>G82</strong>-command has the following syntax: <br><strong>G98(G99) G81(G82) X Y Z R F (P)</strong><br><br>The parameters are as follows:</p>



<ol class="wp-block-list">
<li>With the parameter <strong>G98</strong>/<strong>G99 </strong>The retraction height to which the tool should move after the drilling cycle is defined.<br><strong>G98 </strong>- The starting height (starting height) is approached after the drilling cycle.<br><strong>G99 </strong>- the retraction height (defined in the parameter <strong>R</strong>) is approached after the drilling cycle.<br><img decoding="async" width="24" height="24" class="wp-image-1775" style="width: 24px;" src="https://cncgraf.com/wp-content/uploads/2023/08/info.png" alt=""> <strong>Note:</strong> If no parameter <strong>G98 </strong>or <strong>G99 </strong>is specified, then <strong>G98</strong>.</li>



<li>The parameters <strong>X,Y,Z</strong>: <br><strong>X</strong> - Position X<br><strong>Y</strong> - Position Y<br><strong>Z</strong> - Depth Z (absolute)</li>



<li><strong>R</strong> - Incremental value of the retraction plane, in relation to the starting point in the Z-axis</li>



<li><strong>F</strong> - Feed speed in mm/min</li>



<li>The G-Code drilling cycle <strong>G82 </strong>also has the parameter <strong>P</strong> for waiting time in milliseconds <br>(1000ms = 1sec.) at the bottom of the hole</li>
</ol>



<figure class="wp-block-table is-style-stripes"><table><thead><tr><th class="has-text-align-left" data-align="left">Example</th></tr></thead><tbody><tr><td class="has-text-align-left" data-align="left"><strong>G00 Z0</strong><br><strong>G98 G82 X10 Y10 Z-3 F300 P100</strong></td></tr></tbody></table><figcaption class="wp-element-caption">Drilling cycle <strong>G82</strong> with the parameter <strong>P</strong></figcaption></figure>



<p>In the example above, a hole is drilled at positions X10 and Y10, with a drilling depth of 3 millimetres. In addition, a dwell time (parameter <strong>P</strong>) of 100 milliseconds, during which the milling machine pauses. At the end of the drilling process, the starting height, which in this case is Z=0, is approached again.</p>



<h2 class="wp-block-heading has-base-background-color has-background has-large-font-size" id="g-code-befehl-g-80">G-Code command: G80</h2>



<p>The drilling cycle is started with the command <strong>G80</strong> or by another G-code command such as <strong>G00 </strong>or <strong>G01 </strong>deleted.</p>



<figure class="wp-block-table is-style-stripes"><table><thead><tr><th class="has-text-align-left" data-align="left">Example</th></tr></thead><tbody><tr><td class="has-text-align-left" data-align="left"><strong>G98 G82 X20 Y20 Z-3 F300 P100</strong><br><em>; Repeat drilling cycle at three points </em><br>X30 Y20<br>X40 Y20<br>X50 Y20<br><em>; Delete drilling cycle</em><br><strong>G80</strong></td></tr></tbody></table><figcaption class="wp-element-caption">In this example, the drilling cycle <strong>G82 </strong>with the specified parameters. The drilling cycle is then repeated 3 times at different positions, whereby the settings of the drilling cycle are retained. Finally, the drilling cycle is ended with <strong>G80</strong> deleted.</figcaption></figure>



<hr class="wp-block-separator alignfull has-text-color has-tertiary-color has-alpha-channel-opacity has-tertiary-background-color has-background"/>
</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-base-background-color has-background has-large-font-size" id="g-code-bohrzyklus-g-83-tieflochbohren-mit-spanabfuhr">G-code drilling cycle: G83 Deep-hole drilling with chip removal</h2>



<p>Compared to the drilling cycles <strong>G81</strong>/<strong>G82</strong> this drilling cycle contains an additional parameter <strong>Q</strong>. The parameter <strong>Q</strong> is used to control the chip removal. As chips are produced during drilling, this drilling cycle is particularly recommended for deep hole drilling.<br><br>The <strong>G83</strong>-command has the following syntax: <br><strong>G98(G99) G83 X Y Z R F P Q</strong></p>



<p>The parameters are the same as for the G-code drilling cycle <strong>G81/G82</strong>, but with an additional parameter:<br><strong>Q</strong> - Drilling depth per infeed defined in millimetres</p>



<figure class="wp-block-table is-style-stripes"><table><thead><tr><th class="has-text-align-left" data-align="left">Example</th></tr></thead><tbody><tr><td class="has-text-align-left" data-align="left"><strong>G00 Z0</strong><br><strong>G98 G83 X10 Y10 Z-9 F300 P100 Q3</strong></td></tr></tbody></table><figcaption class="wp-element-caption">Drilling cycle <strong>G83 </strong>with the parameter <strong>Q</strong></figcaption></figure>



<p>In the example above, a hole is drilled at positions X10 and Y10, with a drilling depth of 9 millimetres. In addition, a dwell time of 100 milliseconds is executed at the bottom of the hole, during which the milling machine pauses. The hole is drilled with a triple infeed, as the plunge depth per infeed is 3 millimetres (parameter <strong>Q</strong>). At the end of the drilling process, the initial height Z=0 is approached. The graphic below explains the parameter <strong>Q</strong>.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="481" height="296" src="https://cncgraf.com/wp-content/uploads/2024/02/parameter-q.jpg" alt="The parameter Q: G-code drilling cycle G83 " class="wp-image-5202" srcset="https://cncgraf.com/wp-content/uploads/2024/02/parameter-q.jpg 481w, https://cncgraf.com/wp-content/uploads/2024/02/parameter-q-300x185.jpg 300w, https://cncgraf.com/wp-content/uploads/2024/02/parameter-q-18x12.jpg 18w" sizes="(max-width: 481px) 100vw, 481px" /></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-base-background-color has-background has-large-font-size" id="g-code-bohrzyklus-g-73-tieflochbohren">G-code drilling cycle: G73 Deep hole drilling</h2>



<p>This drilling cycle corresponds to drilling cycle G83, with the difference that a short lift-off distance is approached after each chip removal with Q. The setting for the lift-off distance can be made in cncGraF under „Settings -&gt; Options -&gt; G-Code“.</p>
</div>



<div class="wp-block-group alignfull has-tertiary-background-color has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<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"/>



<h2 class="wp-block-heading has-tertiary-background-color has-background has-large-font-size" id="g-code-gewindebohrzyklus-g-84">G-code tapping cycle: G84</h2>



<p>Finally, we turn our attention to the supreme discipline of tapping with the G-code command <strong>G84</strong>. This command can be used to create both right-hand and left-hand threads. Please note that a spindle with both anti-clockwise and clockwise rotation is required.</p>



<p><img decoding="async" width="24" height="24" class="wp-image-1775" style="width: 24px;" src="https://cncgraf.com/wp-content/uploads/2023/08/info.png" alt=""> <strong>Note:</strong> In cncGraF under „Settings -&gt; Options -&gt; G-Code“, the option „<strong>Use old G84 version</strong>“ must be deactivated. This old version of the <strong>G84 </strong>command does not comply with the G-Code standard, but is still supported by cncGraF to ensure compatibility with old G-Code programmes.</p>



<p>The <strong>G84</strong>-command has the following syntax: <br><strong>G98(G99) G84 X Y Z R P F M</strong><br><br>The parameters for <strong>G84 </strong>are as follows:<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>P</strong> - Waiting time in milliseconds (1000ms = 1sec.) at the bottom of the hole<br><strong>F</strong> - Feed speed in mm/min<br><strong>M </strong>– <strong>M03 </strong>Right-hand thread, otherwise <strong>M04 </strong>Left-hand thread</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th class="has-text-align-left" data-align="left">Example</th></tr></thead><tbody><tr><td class="has-text-align-left" data-align="left"><strong>G00 Z0</strong><br><strong>G98 G84 X10 Y10 Z-10 F300 P100 M03</strong></td></tr></tbody></table><figcaption class="wp-element-caption">Tapping cycle <strong>G84</strong> as right-hand thread</figcaption></figure>



<p>In the above example, a right-hand thread (parameter <strong>M03 </strong>for clockwise rotation) with a depth of 10 millimetres and a feed speed of 300 mm/min. At the bottom of the hole, a waiting time of 100 milliseconds (parameter <strong>P</strong>) is executed.</p>



<div style="height:20px" 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"/>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<p>We hope that this article will help you to quickly find your way around the world of drilling cycles.<br><br>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="noreferrer noopener">To the online shop</a></div>
</div>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
</div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Learning G-Code Part 2/2: Advanced CNC programming</title>
		<link>https://cncgraf.com/en/2024/01/15/cnc-programming-g-code-learning-part2/</link>
		
		<dc:creator><![CDATA[Michael Boenigk]]></dc:creator>
		<pubdate>Mon, 15 Jan 2024 08:00:55 +0000</pubdate>
				<category><![CDATA[G-Code]]></category>
		<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[CNC Programmierung]]></category>
		<category><![CDATA[G-Code-Simulator]]></category>
		<guid ispermalink="false">https://cncgraf.com/?p=4387</guid>

					<description><![CDATA[In the first part of the series „CNC programming: learning G-code - quick and easy“, we learnt the basics of G-code. In this article, you will learn more commands such as subroutines, loops, IF statements and R parameters.]]></description>
										<content:encoded><![CDATA[<div class="wp-block-group alignfull 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 alignfull has-text-align-center has-base-background-color has-background has-large-font-size" id="g-code-lernen-teil-2-2-fortgeschrittene-cnc-programmierung">Learn G-Code Part 2/2: <br>Advanced CNC programming</h1>



<p>In the first part of the series „<a href="https://cncgraf.com/en/2023/12/20/cnc-programming-g-code-learn-commands/" data-type="post" data-id="3742">CNC programming: Learn G-code - Quick and easy</a>“ we learnt the basics of G-code. In this article, you will learn more commands such as subroutines, loops, IF statements and R parameters.</p>



<p><strong>Motivation</strong>In CNC manufacturing, it is often necessary to produce similar parts with slight variations. Creating a new G-code file for every small change using CAD/CAM software can be time-consuming. A good solution is to use a customisable G-code file. With parameters, changes in the G-code file can be implemented quickly and easily, which saves time and increases flexibility. In this article, you will learn how parameterised G-code programming makes your CNC processes more efficient.</p>



<p>For CNC programming (G-code), we use our CNC control software as a free G-code simulator. Click here <a href="https://cncgraf.com/en/download-cncgraf-cnc-control-software/" data-type="page" data-id="24">here</a>, to download cncGraF for free.</p>



<p>To find out more about the free G-Code Simulator, click on the blog article <br>„<a href="https://cncgraf.com/en/2023/12/20/free-g-code-simulator-cnc-emulator/" data-type="post" data-id="3822">cncGraF: Free G-code simulator and CNC machine emulator</a>„.</p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h4>Overview: Advanced CNC programming</h4><nav><ul><li class=""><a href="#g-code-unterprogramme">G-Code: Subroutines</a><ul><li class=""><a href="#unterprogramm-verwaltung">Sub-programme management</a></li></ul></li><li class=""><a href="#g-code-schleifen">G-Code: Loops</a></li><li class=""><a href="#was-ist-ein-r-parameter">What is an R parameter?</a></li><li class=""><a href="#was-ist-eine-if-anweisung">What is an IF statement?</a></li><li class=""><a href="#komplettes-g-code-beispiel">Complete G-code example</a></li><li class=""><a href="#zusammenfassung">Summary</a></li></ul></nav></div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
</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-unterprogramme">G-Code: Subroutines</h2>



<p>First, we add a subroutine. We will use the G-code example from the first part of this series „<a href="https://cncgraf.com/en/2023/12/20/cnc-programming-g-code-learn-commands/" data-type="post" data-id="3742">CNC programming: Learn G-code - Quick and easy</a>„. The extended G-code lines are colour-coded in <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">Light red </mark></strong>highlighted. The G-code then looks like this:</p>
</div>



<div class="wp-block-group alignfull has-tertiary-background-color has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<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"/>



<p><em>; G-code file: Production of a rectangle on 22/12/2023</em><br><em>; Update on 23.01.2024</em><br><em><br>; Tool number 1 is selected</em><br><strong>T1<br></strong><em>; Lift the tool at rapid speed to the height Z = 10 mm above the zero point</em><strong><br>G00 Z10<br></strong><em>; Move to position X = 10 and Y = 10 at rapid speed</em><strong><br>G00 X10 Y10</strong><br><em>; Switch on the work spindle with M3 at a speed of 2000 rpm</em><br><strong>M3 S20000<br></strong><em>; Wait 5 seconds until the spindle speed is reached</em><strong><br>G04 H5</strong><br><br><em>; Relative dimensioning <em>(chain dimension)</em>, Command G91 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">G91</mark><br><br><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">P1 </mark></strong><em>; Subprogramme 1 is called up</em><br><strong><br></strong><em>; End of programme</em><strong><br>M5 M30<br><br><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><em>; Start of sub-programme 1 </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"><br>M99 P1<br></mark></strong><em>; Move to the centre of the rectangle</em><strong><br>G00 X50 Y30<br></strong><em>; plunge 2 mm into the workpiece at a feed rate of 600 mm per minute</em><strong><br>G01 Z-12 F600<br></strong><em>; Circle (d=20mm, centre 60×60) clockwise<br>; travelling at a feed rate of 600 mm per minute</em><strong><br>G02 I0 J20<br></strong><em>; Lift tool at rapid speed : Z = 10mm above the zero point</em><strong><br>G00 Z12<br></strong><em>; Move to position X = 10 and Y = 10 at rapid speed</em><strong><br>G00 X-50 Y-30<br></strong><em>; plunge 2 mm into the workpiece at a feed rate of 600 mm per minute</em><strong><br>G01 Z-12<br></strong><em>; Traverse rectangle 100×100 mm at a feed rate of 600 mm per minute</em><strong><br>G01 X100<br>G01 Y100<br>G01 X-100<br>G01 Y-100<br></strong><em>; Lift tool at rapid speed : Z = 10mm above the zero point</em><strong><br>G00 Z12<br><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">M99</mark> </strong><em>; End of sub-programme 1</em></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="270" height="279" src="https://cncgraf.com/wp-content/uploads/2024/01/g-code-teil2-datei-unterprogramm.jpg" alt="G-code file: Rectangle and circle" class="wp-image-4993" srcset="https://cncgraf.com/wp-content/uploads/2024/01/g-code-teil2-datei-unterprogramm.jpg 270w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-teil2-datei-unterprogramm-12x12.jpg 12w" sizes="auto, (max-width: 270px) 100vw, 270px" /></figure>



<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"/>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<p>The G-code (see above) describes the processing of a rectangle and a circle, whereby the two shapes are described in the sub-programme <strong>1 </strong>are defined. The sub-programme is started with the command <strong>P1 </strong>in the main programme. </p>



<p>The definition of the sub-programme begins with the command <strong>M99 P1</strong> and ends with <strong>M99</strong>. All subroutines are located at the end of the main programme, i.e. after the command <strong>M30</strong>, which marks the end of the main programme. The number of the sub-programme is indicated by the number after ‚<strong>P</strong>‚ labelled - in this case <strong>1</strong>.</p>



<p>G-code subroutines have the following structure:<br><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">G91</mark> </strong><em>; Relative dimensioning (incremental dimension) is activated</em><br><em>; Main programme</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">P1 </mark></strong><em>; Subprogramme 1 is called up</em><br><em>; Main programme</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">M30</mark><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"> </mark></em></strong><em>; End of the main programme</em></p>



<p><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">M99 P1</mark></strong><br><em>; Contents of the sub-programme</em> 1<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">M99</mark></strong></p>



<p><img loading="lazy" decoding="async" width="24" height="24" class="wp-image-1775" style="width: 24px;" src="https://cncgraf.com/wp-content/uploads/2023/08/info.png" alt=""> <strong>Note:</strong> Please note that at the beginning of the main programme the command <strong>G91 </strong>must be set to activate relative dimensioning (incremental dimension). All subsequent coordinate specifications are therefore relative values. This is necessary so that the sub-programmes can be placed at any position.</p>



<h3 class="wp-block-heading has-large-font-size" id="unterprogramm-verwaltung">Sub-programme management</h3>



<p>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> has an integrated sub-programme management function. All subroutines can be saved there. In such a case, the subroutine does not have to be contained in the G-code file; instead, the subroutine is only called in the main programme with the G-code command ‚<strong>P</strong>‚ and the sub-programme number (here <strong>P1</strong>).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="967" height="769" src="https://cncgraf.com/wp-content/uploads/2024/01/g-code-unterprogramm-verwaltung.jpg" alt="CNC programming: G-code sub-programme management integrated in CNC control system" class="wp-image-4704" srcset="https://cncgraf.com/wp-content/uploads/2024/01/g-code-unterprogramm-verwaltung.jpg 967w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-unterprogramm-verwaltung-600x477.jpg 600w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-unterprogramm-verwaltung-300x239.jpg 300w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-unterprogramm-verwaltung-768x611.jpg 768w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-unterprogramm-verwaltung-15x12.jpg 15w" sizes="auto, (max-width: 967px) 100vw, 967px" /></figure>



<p><img loading="lazy" decoding="async" width="24" height="24" class="wp-image-1775" style="width: 24px;" src="https://cncgraf.com/wp-content/uploads/2023/08/info.png" alt=""> <strong>Note:</strong> If a sub-programme with the same sub-programme number (the number after ‚<strong>P</strong>‚) is present both in the G-code file and in the subroutine management, the subroutine from the G-code file is used. The software first searches for the subroutine in the file and only then in the G-code management. This makes it possible to ‚overwrite‘ the subroutine in the administration.</p>
</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-schleifen">G-Code: Loops</h2>



<p>To duplicate the shapes defined in the subroutine, the subroutine must be called several times. This is done with the G-code commands<strong> G25 Q</strong> and <strong>G26 </strong>realised for loops. <br>The G-code section in the main programme then looks as follows: </p>



<p><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">G25 Q4</mark></strong><br><strong>P1</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"><strong> </strong></mark>; Subprogramme 1 is called up</em><br><strong>G00 X110</strong><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">G26</mark></strong></p>



<p>With <strong>G25 Q</strong> and <strong>G26 </strong>a loop is programmed. <strong>G25 </strong>defines the start of the loop, and with <strong>G26 </strong>the loop is ended. The parameter <strong>Q</strong> defines the number of runs. In our example <strong>4</strong> runs are defined. After each sub-programme call, there is a relative position shift in X for the next sub-programme with the line: <strong>G00 X110</strong>.</p>
</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-ist-ein-r-parameter">What is an R parameter?</h2>



<p><strong>An R parameter is a placeholder (variable) in the range from R1 to R999 in which a value is saved. </strong>Example: <strong>R10 </strong>= 99.567. This line defines the parameter <strong>R10</strong>, which represents the value <strong>99.567</strong> contains. <br>By calling the R parameter (here <strong>R10</strong>), its value can be accessed in the G code. Please note the following when using the R parameters:</p>



<ul class="wp-block-list">
<li><strong>Basic arithmetic operations Addition, subtraction, multiplication and division</strong> can be executed within a parameter. When calculating the values, the rule „<strong><mark style="background-color:#ff7d7d" class="has-inline-color has-custom-hintergrund-1-b-5-e-3-ff-color">Dot before dash</mark></strong>“ is applied. The brackets are not supported. <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">R56</mark> </strong><em>= 10/2 - 2</em>*2<br>The result is <strong>1</strong></li>



<li>R parameters can be used within the calculation. <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">R55</mark></strong> = 10 <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>R56</strong> = <strong>R55</strong></mark>/2 - 2*2<br>The result is <strong>1</strong></li>



<li>R parameters can be assigned in the following places in the G code:<br>Command G00, example G00 X<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R10</mark></strong><br>Command G01, example G01 X<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R10</mark></strong> Y<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R11 + 6 / 2</mark></strong><br>Command G02/G03 X/Y (arc commands), example: G02 I20 J20 X<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R10</mark></strong> Y<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R10</mark></strong><br>Command G25 Q (loop), example: G25 Q<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=<strong>R4</strong></mark><br>Command G53-G60 X/Y/Z, example G54 X<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=<strong>R20</strong></mark><br>IF statement command, example: $IF <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">R100</mark></strong>==1</li>



<li>R parameters are global parameters, i.e. if they are defined at the beginning of the G-code file, they are available for the entire file.</li>



<li>R parameters can also be used in sub-programmes.</li>



<li>The values of the R parameters are displayed at the bottom of the status bar of the text editor (see screenshot below)</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="923" height="352" src="https://cncgraf.com/wp-content/uploads/2024/01/g-code-parameter.jpg" alt="" class="wp-image-4734" srcset="https://cncgraf.com/wp-content/uploads/2024/01/g-code-parameter.jpg 923w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-parameter-600x229.jpg 600w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-parameter-300x114.jpg 300w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-parameter-768x293.jpg 768w, https://cncgraf.com/wp-content/uploads/2024/01/g-code-parameter-18x7.jpg 18w" sizes="auto, (max-width: 923px) 100vw, 923px" /></figure>



<p>In the following, we add parameters to our loop. The G-code snippet then looks like this in the main programme:<br><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">R4=4</mark></strong><em> ; <em>R4</em></em> <em>Parameter (placeholder) with the value 4 as the number of passes</em> <em>create</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">R5=110</mark></strong> <em>; R5 parameter (placeholder) with the value 110 for new X position of the sub-programme</em><br><br><em>; Assignment of the value via parameter R4</em><br><strong>G25 Q<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R4</mark></strong><br><strong>P1</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"><strong> </strong></mark>; Subprogramme 1 is called up</em><br><strong>G00 X<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R5</mark></strong> <em>; Relative displacement, defined in the R5 parameter</em><br><strong>G26</strong></p>
</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-ist-eine-if-anweisung">What is an IF statement?</h2>



<p>The <strong>IF statement </strong>is used to check a condition. If this condition is fulfilled, the commands within the condition are executed. The following operations are available:<br>equal <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> <br>unequal<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> <br>greater than or equal to <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">&gt;=</mark></strong> <br>less than or equal to <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">&lt;=</mark></strong></p>



<p>The IF statement consists of the following commands <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">$IF $ENDIF $ELSE $ELSEIF</mark></strong>. The IF statement must stand alone in the line. IF statement can be contained in the main programme and in the sub-programme.</p>



<p><strong>Example 1: $IF $ENDIF</strong></p>



<p><strong>R57=10</strong> <em>; Create parameter R57 (placeholder) with the value 10</em><br><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">$IF R57== 10</mark></strong><br><em>; This G-code content is executed because parameter R57 has the value 10 (equals is fulfilled)</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">$ENDIF</mark></strong></p>



<p><strong>Example 2: $IF $ELSEIF $ENDIF</strong></p>



<p><strong>R57=9</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"><strong>$IF</strong> <strong>R57</strong>&lt;=9</mark><br><em>; This content is executed because parameter R57=9 (less than or equal to is fulfilled)</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">$ELSEIF R57&gt;=10</mark></strong><br><em>; This content is NOT executed because parameter R57 has the value 9.</em><br><em>; Changing the value to 10 or higher in parameter R57 means that </em><br>; <em>this content is executed</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">$ENDIF</mark></strong></p>



<p><img loading="lazy" decoding="async" width="24" height="24" class="wp-image-1775" style="width: 24px;" src="https://cncgraf.com/wp-content/uploads/2023/08/info.png" alt=""> <strong>Please note!</strong> An IF statement within another IF statement is not supported (see table below).</p>



<figure class="wp-block-table is-style-stripes"><table><thead><tr><th>WRONG</th><th>CORRECT</th></tr></thead><tbody><tr><td><strong><mark style="background-color:#ffd57c" class="has-inline-color">$IF R200==0</mark></strong><br><em>; G-Code: Contents</em><br><mark style="background-color:#ffd57c" class="has-inline-color"><strong>$IF R1==1</strong> <br><em>; G-Code: Contents</em><br><strong>$ENDIF</strong></mark><br><em>; G-Code: Contents</em><br><strong><mark style="background-color:#ffd57c" class="has-inline-color">$ENDIF</mark></strong></td><td><strong>$IF R200==0</strong><br><em>; G-Code: Contents</em><br><strong>$ENDIF</strong><br><strong>$IF R1==1</strong><br><em>; G-Code: Contents</em><br><strong>$ENDIF</strong></td></tr><tr><td></td><td></td></tr></tbody></table><figcaption class="wp-element-caption">An IF statement within another IF statement is not permitted!</figcaption></figure>
</div>



<div class="wp-block-group alignfull has-tertiary-background-color has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<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"/>



<h2 class="wp-block-heading has-tertiary-background-color has-background has-large-font-size" id="komplettes-g-code-beispiel">Complete G-code example</h2>



<p>Now that we have learnt about programming subroutines, loops, R parameters and IF statements, we will expand our example to include these commands. <br>Our G-code then looks like this:</p>



<p><em>; G-code file: Production of a rectangle on 15/01/2024</em><br><em>; Update on 23.01.2024</em><br><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">R3=3</mark> </strong><em><strong>;</strong> Set the number of passes in Y</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">R4=4</mark> </strong><em>; Set number of runs in X</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">R5=110</mark></strong> <em>; X Shift for new sub-programme</em> set<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">R6=110</mark></strong>; <em>Y Shift for new sub-programme</em> set<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">R7=1</mark></strong> <em>; Specify whether a circle is to be created, 1 - yes, 0 - no</em></p>



<p><em>; Tool number 1 is selected</em><br><strong>T1</strong><br><em>; Lift the tool at rapid speed to the height Z = 10 mm above the zero point</em><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><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><br><em>; Relative dimensioning (incremental dimension) is activated</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">G91</mark></strong><br><br><em>; Assignment of the value via parameter R3</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">G25 Q=R3</mark></strong><br><em>; Assignment of the value via parameter R4</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">G25 Q=R4</mark></strong><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">P1</mark><em> </em></strong><em>; Subprogramme 1 is called up</em><br><strong>G00 X<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R5</mark></strong> <em>; Relative displacement, defined in the R5 parameter</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">G26</mark></strong><br><strong>G00 Y<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=R6</mark></strong> <em>; Relative displacement in X, defined in the R6 parameter</em><br><strong>G00 X<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">=-R5*R4</mark></strong> <em>; Relative displacement in X to starting position</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">G26</mark></strong></p>



<p><em>; End of programme</em><br><strong>M5 M30</strong></p>



<p><em>; Start of sub-programme 1</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">M99 P1</mark></strong><br><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">$IF R7==1</mark></strong><br><em>; Move to the centre of the rectangle</em><br><strong>G00 X50 Y30</strong><br><em>; plunge 2 mm into the workpiece at a feed rate of 600 mm per minute</em><br><strong>G01 Z-12 F600</strong><br><em>; Circle (d=20mm, centre 60×60) clockwise<br>; travelling at a feed rate of 600 mm per minute</em><br><strong>G02 I0 J20</strong><br><em>; Lift tool at rapid speed : Z = 10mm above the zero point</em><br><strong>G00 Z12</strong><br><em>; Move to position X = 10 and Y = 10 at rapid speed</em><br><strong>G00 X-50 Y-30</strong><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">$ENDIF</mark></strong><br><br><em>; plunge 2 mm into the workpiece at a feed rate of 600 mm per minute</em><br><strong>G01 Z-12</strong><br><em>; Traverse rectangle 100×100 mm at a feed rate of 600 mm per minute</em><br><strong>G01 X100<br>G01 Y100<br>G01 X-100<br>G01 Y-100</strong><br><em>; Lift tool at rapid speed : Z = 10mm above the zero point</em><br><strong>G00 Z12</strong><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">M99</mark> </strong><em>; End of sub-programme 1</em></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="836" src="https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-1024x836.jpg" alt="G-Code Simulator cncGraF: Use of subroutines in G-Code" class="wp-image-4998" srcset="https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-1024x836.jpg 1024w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-600x490.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-300x245.jpg 300w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-768x627.jpg 768w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei-15x12.jpg 15w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-teil2-datei-komplette-g-code-datei.jpg 1045w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<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"/>
</div>



<div class="wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<p>Several R parameters, loops and IF statements are used in the G code (see above). The G-code file can be changed very easily using the R parameters. The R 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">R3 </mark></strong>and <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">R4 </mark></strong>define the number of parts in X and Y. The R 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">R5 </mark></strong>and <strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">R6 </mark></strong>determine the distance between the parts in X and Y, and the last parameter, <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>R7</strong></mark>, defines whether a circle is to be output or not (see IF statement in the subroutine).</p>
</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>In this blog article, we have looked at the various facets of CNC programming. Starting with the basics, which are explained in the article <br>‚<a href="https://cncgraf.com/en/2023/12/20/cnc-programming-g-code-learn-commands/" data-type="post" data-id="3742">CNC programming: Learn G-code - Quick and easy</a>‚ to advanced topics such as R parameters, loops and IF statements. We have thus covered the breadth and depth of CNC programming.<br><br>We hope that this blog article will help you to achieve the desired success.<br>Yours sincerely, Your BOENIGK-electronics Team<br></p>
</div>



<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>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>cncGraF: Free G-code simulator and CNC machine emulator</title>
		<link>https://cncgraf.com/en/2023/12/20/free-g-code-simulator-cnc-emulator/</link>
		
		<dc:creator><![CDATA[Michael Boenigk]]></dc:creator>
		<pubdate>Wed, 20 Dec 2023 11:34:27 +0000</pubdate>
				<category><![CDATA[G-Code]]></category>
		<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[CNC-Maschinen-Emulator]]></category>
		<category><![CDATA[G-Code-Simulator]]></category>
		<guid ispermalink="false">https://cncgraf.com/?p=3822</guid>

					<description><![CDATA[cncGraF offers an integrated G-code simulator and CNC machine emulator. Without a CNC controller, cncGraF can be used free of charge as freeware and is therefore ideal for simulating CNC processes.

This article shows how you can use cncGraF as a free G-code simulator.]]></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-gra-f-kostenloser-g-code-simulator-und-cnc-maschinen-emulator">cncGraF: Free G-code simulator <br>and CNC machine emulator</h1>



<p>cncGraF offers an integrated G-code simulator and CNC machine emulator. Without a CNC controller <strong>cncGraF can be used free of charge as freeware</strong> and therefore ideal for the simulation of CNC processes.</p>



<p>This article shows how you can use cncGraF as a free G-code simulator.</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="1039" height="1020" src="https://cncgraf.com/wp-content/uploads/2023/11/cncgraf-cnc-emulator.jpg" alt="cncGraF: Free G-code simulator and CNC machine emulator" class="wp-image-4335" style="width:842px;height:auto" srcset="https://cncgraf.com/wp-content/uploads/2023/11/cncgraf-cnc-emulator.jpg 1039w, https://cncgraf.com/wp-content/uploads/2023/11/cncgraf-cnc-emulator-600x589.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/11/cncgraf-cnc-emulator-300x295.jpg 300w, https://cncgraf.com/wp-content/uploads/2023/11/cncgraf-cnc-emulator-1024x1005.jpg 1024w, https://cncgraf.com/wp-content/uploads/2023/11/cncgraf-cnc-emulator-768x754.jpg 768w, https://cncgraf.com/wp-content/uploads/2023/11/cncgraf-cnc-emulator-12x12.jpg 12w" sizes="auto, (max-width: 1039px) 100vw, 1039px" /></figure>



<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"/>
</div>



<div class="wp-block-rank-math-toc-block aligncenter" id="rank-math-toc"><h4>cncGraF: Free G-code simulator</h4><nav><ul><li class=""><a href="#installation">Installation</a></li><li class=""><a href="#erstes-starten">First start</a></li><li class=""><a href="#cnc-maschinen-emulator-aktivieren">Activate CNC machine emulator</a></li><li class=""><a href="#cnc-gra-f-8-interface-im-uberblick">cncGraF 8: Interface at a glance</a></li><li class=""><a href="#g-code-datei-laden-und-ausfuhren">Load and execute G-code file</a></li><li class=""><a href="#g-code-programmieren">Programming G-code</a></li><li class=""><a href="#zusammenfassung">Summary</a></li></ul></nav></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="installation">Installation</h2>



<ul class="wp-block-list">
<li><strong>download</strong>cncGraF is available in the download area of our website. The direct link to the download area can be found below. Registration is not required for the download and installation.</li>



<li><strong>Installation process</strong>Installation is carried out using a simple installer. Follow the instructions of the installer to install the software.</li>
</ul>



<p><a href="https://cncgraf.com/en/download-cncgraf-cnc-control-software/" data-type="page" data-id="24">Click here to download cncGraF free of charge.</a></p>



<h2 class="wp-block-heading has-large-font-size" id="erstes-starten">First start</h2>



<ul class="wp-block-list">
<li><strong>Start:</strong> cncGraF is started by clicking on the desktop icon. The first time it is started, a welcome window appears, indicating that no machine parameters have been loaded.</li>
</ul>



<ul class="wp-block-list">
<li><strong>Use as a G-code simulator:</strong> When using cncGraF as a free G-code simulator, this message can simply be ignored. In this case, the text „I understand the message and would like to continue“ is ticked. The window can then be closed with ‚OK‘.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="750" height="336" src="https://cncgraf.com/wp-content/uploads/2023/12/g-code-simulator-willkommen.jpg" alt="cncGraF 8: Welcome window indicating that no machine parameters are loaded." class="wp-image-4174" srcset="https://cncgraf.com/wp-content/uploads/2023/12/g-code-simulator-willkommen.jpg 750w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-simulator-willkommen-600x269.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-simulator-willkommen-300x134.jpg 300w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-simulator-willkommen-18x8.jpg 18w" sizes="auto, (max-width: 750px) 100vw, 750px" /></figure>



<ul class="wp-block-list">
<li><strong>Importing machine settings:</strong> If you want to use cncGraF with the settings of an existing CNC machine, you can import the settings. </li>
</ul>
</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="cnc-maschinen-emulator-aktivieren">Activate CNC machine emulator</h2>



<p>The CNC machine emulator is activated by pressing the „Start emulator“ button in the top right-hand corner of the cncGraF main menu (see screenshot below). This starts a server on your PC that simulates the CNC controller.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="945" height="108" src="https://cncgraf.com/wp-content/uploads/2023/12/cnc-maschinen-emulator-aktivieren.jpg" alt="cncGraF 8 as a free CNC machine emulator: The &quot;Start emulator&quot; button activates the virtual CNC machine." class="wp-image-4213" srcset="https://cncgraf.com/wp-content/uploads/2023/12/cnc-maschinen-emulator-aktivieren.jpg 945w, https://cncgraf.com/wp-content/uploads/2023/12/cnc-maschinen-emulator-aktivieren-600x69.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/12/cnc-maschinen-emulator-aktivieren-300x34.jpg 300w, https://cncgraf.com/wp-content/uploads/2023/12/cnc-maschinen-emulator-aktivieren-768x88.jpg 768w, https://cncgraf.com/wp-content/uploads/2023/12/cnc-maschinen-emulator-aktivieren-18x2.jpg 18w" sizes="auto, (max-width: 945px) 100vw, 945px" /></figure>
</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="cnc-gra-f-8-interface-im-uberblick">cncGraF 8: Interface at a glance</h2>



<p>The following screenshot shows the main window of cncGraF 8. The operating elements that are essential for using the G-code simulator and the CNC machine emulator are marked with numbers. These are the following controls:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="945" height="658" src="https://cncgraf.com/wp-content/uploads/2023/12/cncgraf-g-code-simulator-interface.jpg" alt="cncGraF: Free G-code simulator and CNC machine emulator" class="wp-image-4221" srcset="https://cncgraf.com/wp-content/uploads/2023/12/cncgraf-g-code-simulator-interface.jpg 945w, https://cncgraf.com/wp-content/uploads/2023/12/cncgraf-g-code-simulator-interface-600x418.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/12/cncgraf-g-code-simulator-interface-300x209.jpg 300w, https://cncgraf.com/wp-content/uploads/2023/12/cncgraf-g-code-simulator-interface-768x535.jpg 768w, https://cncgraf.com/wp-content/uploads/2023/12/cncgraf-g-code-simulator-interface-18x12.jpg 18w" sizes="auto, (max-width: 945px) 100vw, 945px" /></figure>



<ul class="wp-block-list">
<li>With the „Start emulator“ button (<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>Point 1</strong></mark>) to activate the CNC machine emulator. The emulation is also ended with the same button. The emulator is already running in the screenshot.</li>



<li>The white area (<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">Point 2</mark></strong>), which is located in the 2D view window, shows the machine area in X and Y as a Cartesian coordinate system. The origin of the X, Y and Z axes is located at the bottom 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">Point 9</mark></strong>). The machine area, the milling file (drawing) and the position of the CNC machine are displayed in the 2D view window.</li>



<li>The integrated text editor (<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">Point 3</mark></strong>) is mainly used for G-code programming. A loaded G-code file can be checked here or a new G-code file can be created.</li>



<li>The simulation (<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">Point 4</mark></strong>) offers a simple way to check the processing sequence of the commands. It visualises the processing of the G-code and is also available for 2D files such as DXF.</li>



<li>By pressing the green symbol (<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">Point 5</mark></strong>), the milling process is started as an emulation. If the emulation was switched off and a real connection with a CNC machine was established, this action would start a real milling process.</li>



<li>In the ‚Move manually‘ window (<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">Point 6</mark></strong>), the CNC machine is moved manually. The outputs, such as the spindle and pump, can also be switched. In the ‚SMC Status‘ window (<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color"><strong>Point 7</strong></mark>), the status of the inputs and outputs can be checked.</li>



<li>Use the slider in the status bar (<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">Point 8</mark></strong>), the operating speed of the CNC machine and the emulator can be changed.</li>



<li>In the 2D view, not only the current position (<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-hintergrund-3-ff-7-d-7-d-color">Point 9</mark></strong>) of the CNC machine, but also other elements such as zero point, parking point or measuring point.</li>
</ul>
</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-datei-laden-und-ausfuhren">Load and execute G-code file</h2>



<p>The G-code file can be loaded via the menu item ‚Open file‘. Pressing the green symbol starts the milling process (in this case as emulation).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="650" height="123" src="https://cncgraf.com/wp-content/uploads/2023/11/g-code-oeffnen.jpg" alt="cncGraF main menu: free G-code simulator" class="wp-image-4431" srcset="https://cncgraf.com/wp-content/uploads/2023/11/g-code-oeffnen.jpg 650w, https://cncgraf.com/wp-content/uploads/2023/11/g-code-oeffnen-600x114.jpg 600w, https://cncgraf.com/wp-content/uploads/2023/11/g-code-oeffnen-300x57.jpg 300w, https://cncgraf.com/wp-content/uploads/2023/11/g-code-oeffnen-18x3.jpg 18w" sizes="auto, (max-width: 650px) 100vw, 650px" /></figure>



<p><img loading="lazy" 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>&nbsp;If the display of the G-code file is not correct, 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. In this case, the „G02/03 relative“ option must be changed in the cncGraF G-code simulator in the main menu „Settings → Options → File → G-code“.“</p>
</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-programmieren">Programming G-code</h2>



<p>G-code programming is carried out in the cncGraF text editor. When changes are saved in the text editor, the G-code display is automatically updated in the 2D view window so that the G-code can be checked visually.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="459" height="722" src="https://cncgraf.com/wp-content/uploads/2023/12/g-code-texteditor.jpg" alt="cncGraF: Integrated text editor for G-code programming" class="wp-image-4438" srcset="https://cncgraf.com/wp-content/uploads/2023/12/g-code-texteditor.jpg 459w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-texteditor-191x300.jpg 191w, https://cncgraf.com/wp-content/uploads/2023/12/g-code-texteditor-8x12.jpg 8w" sizes="auto, (max-width: 459px) 100vw, 459px" /></figure>



<p><img loading="lazy" decoding="async" width="24" height="24" class="wp-image-1775" style="width: 24px;" src="https://cncgraf.com/wp-content/uploads/2023/08/info.png" alt=""> <strong>Tip</strong>cncGraF also has a 3D view window in which the G-code file can be viewed.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="514" height="402" src="https://cncgraf.com/wp-content/uploads/2023/11/3d-view.jpg" alt="" class="wp-image-4442" srcset="https://cncgraf.com/wp-content/uploads/2023/11/3d-view.jpg 514w, https://cncgraf.com/wp-content/uploads/2023/11/3d-view-300x235.jpg 300w, https://cncgraf.com/wp-content/uploads/2023/11/3d-view-15x12.jpg 15w" sizes="auto, (max-width: 514px) 100vw, 514px" /></figure>



<p>cncGraF supports standard G-code. To learn how to use G-code, we recommend our blog article „<a href="https://cncgraf.com/en/2023/12/20/cnc-programming-g-code-learn-commands/">CNC programming: Learn G-code - Quick and easy</a>„. Knowledge of G-code is an advantage for CNC programming. Our blog article offers practical support to learn this knowledge quickly.</p>
</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="zusammenfassung">Summary</h2>



<p>This article shows that familiarising yourself with cncGraF as a free G-code simulator is quick and uncomplicated. cncGraF offers all the tools you need to get started with G-code programming. cncGraF is a useful tool for those who want to familiarise themselves with CNC programming.<br><br>Yours sincerely, Your BOENIGK-electronics Team</p>
</div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The postprocessor and the importance of G-code in CNC machining</title>
		<link>https://cncgraf.com/en/2023/10/18/the-postprocessor-and-g-codes/</link>
		
		<dc:creator><![CDATA[Michael Boenigk]]></dc:creator>
		<pubdate>Wed, 18 Oct 2023 09:54:03 +0000</pubdate>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[G-Code]]></category>
		<category><![CDATA[Postprozessor]]></category>
		<guid ispermalink="false">https://cncgraf.com/?p=2161</guid>

					<description><![CDATA[In the world of CNC machining, the generation and use of G-code is a central part of the process.
In this blog article, we dive into the world of G-code, shed light on its history and explain the role of post-processors (PP for short) in CNC machining. You will also learn how our CNC control software, cncGraF, fits into this picture.]]></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 has-text-align-left has-tertiary-background-color has-background has-large-font-size" id="der-postprozessor-und-die-bedeutung-des-g-codes-in-der-cnc-bearbeitung">The postprocessor and the importance of G-code in CNC machining</h1>



<p class="translation-block">In the world of CNC machining, the generation and use of G-code is a central part of the process.<br>In this blog article, we delve into the world of G-code, shed light on its history and explain the role of post-processors (PP for short) in CNC machining. You will also learn how our CNC control software, <a href="https://cncgraf.com/en/cncgraf-8-cnc-steuerungssoftware/" data-type="page" data-id="8" target="_self">cncGraF</a>, fits into this picture. Join us on this journey of discovery!</p>



<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"/>
</div>



<p>CNC (Computerised Numerical Control) machines revolutionised the manufacturing industry by enabling automated tool movements. They were originally developed by the Massachusetts Institute of Technology (MIT) in the 1950s. The G-code, also known as DIN66025, established itself as the universal standard for controlling the motion sequences of these machines. The introduction of this standard was a decisive step towards making CNC machining processes efficient and repeatable.</p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h4>Overview</h4><nav><ul><li class=""><a href="#wie-wurden-fruher-die-g-code-dateien-erzeugt">How were the G-code files generated in the past?</a></li><li class=""><a href="#heute-wird-g-code-per-cad-cam-software-generiert">Today, G-code is generated using CAD/CAM software</a></li><li class=""><a href="#was-sind-postprozessoren-und-warum-werden-sie-benotigt">What are postprocessors and why are they needed?</a></li><li class=""><a href="#vorgefertigte-und-benutzerdefinierte-postprozessoren-fur-cnc-gra-f">Prefabricated and customised postprocessors for cncGraF</a></li></ul></nav></div>



<div class="wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="wie-wurden-fruher-die-g-code-dateien-erzeugt">How were the G-code files generated in the past?</h2>



<p>Before computer-aided technologies such as CAD (Computer-Aided Design) and CAM (Computer-Aided Manufacturing) existed, G-code was written manually by machine operators. G-code is an ASCII file containing simple commands such as „move to a position G01 X10 Y10“ or „switch on the spindle with M03“. Programming was carried out directly on the CNC system or in a text editor.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="577" height="949" src="https://cncgraf.com/wp-content/uploads/2023/08/texteditor-g-code.jpg" alt="" class="wp-image-2176"/></figure>



<p>The machine operators required in-depth knowledge of the G-code standard, the machine specifications and the materials to be processed. Creating such codes was time-consuming and required careful checking to avoid errors.</p>
</div>



<div class="wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="heute-wird-g-code-per-cad-cam-software-generiert">Today, G-code is generated using CAD/CAM software</h2>



<p class="translation-block">Modern CAD/CAM software has revolutionised the process of G-code creation. These programmes make it possible to design parts and simultaneously generate the necessary G-code to implement these designs on CNC machines.<br>The advantages of this development are:</p>



<ul class="wp-block-list">
<li class="translation-block"><strong>Time efficiency</strong>: Automated G-code generation saves time.</li>



<li class="translation-block"><strong>Error reduction</strong>: Automatic generation minimises human error.</li>



<li class="translation-block"><strong>Flexibility</strong>: Design adjustments can be quickly implemented in the G-code.</li>



<li class="translation-block"><strong>Optimisation</strong>: Modern software makes it possible to optimise the processing path in order to save material and time.</li>



<li class="translation-block"><strong>Complexity</strong>: CAD/CAM software can be used to generate highly complex projects and geometries that would be almost impossible to realise manually. This has opened up new and advanced design possibilities that were previously unattainable.</li>
</ul>
</div>



<div class="wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="was-sind-postprozessoren-und-warum-werden-sie-benotigt">What are postprocessors and why are they needed?</h2>



<p>Even though G-code is a universal standard, different CNC machine manufacturers often have specific requirements and peculiarities. A post-processor (PP for short) acts as a translator between the CAD/CAM software and the specific CNC machine. The postprocessor receives the generic G-code and adapts it to the specific requirements and capabilities of the machine. This ensures that the G-code is executed correctly, regardless of the machine used.</p>



<p class="translation-block"><img width="24" height="24" class="wp-image-1775" style="width: 24px" src="https://cncgraf.com/wp-content/uploads/2023/08/info.png" alt=""> <strong>Hinweis:</strong> Die CNC-Steuerungssoftware cncGraF unterstützt Standard-G-Code. Deshalb sollte es keine Probleme geben, einen passenden G-Code zu generieren.</p>
</div>



<div class="wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading has-large-font-size" id="vorgefertigte-und-benutzerdefinierte-postprozessoren-fur-cnc-gra-f">Prefabricated and customised postprocessors for cncGraF</h2>



<p>Every modern CAD/CAM software usually already offers a selection of ready-made postprocessors. These enable broad compatibility with various CNC control systems. It is very likely that one of these ready-made postprocessors is suitable for cncGraF - it is worth trying this out.</p>



<p>It is also possible to create your own postprocessor. This is usually an ascii file that describes how the G-code file should be generated. This requires knowledge of the respective CAD/CAM software, as the postprocessors are described differently in each CAD/CAM. For more detailed information, please refer to the documentation of the respective CAD/CAM software.</p>



<p class="translation-block"><img width="24" height="24" class="wp-image-1775" style="width: 24px" src="https://cncgraf.com/wp-content/uploads/2023/08/info.png" alt=""> <strong>Hinweis:</strong> Sollte die geladene G-Code-Datei fehlerhaft dargestellt werden (Kreisbögen werden falsch dargestellt), liegt dies meistens an der Einstellung „G02/03 relativ“. In solchen Fällen sollte die Option „G02/03 relativ“ im Menü „Einstellungen → Optionen → Datei → G-Code“ geändert werden. Dieses Problem tritt auf, weil die Bogenbefehle G02/G03 entweder relativ oder absolut interpretiert werden können. Es gibt keine Möglichkeit automatisch zwischen diesen beiden Modi zu unterscheiden.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="847" height="226" src="https://cncgraf.com/wp-content/uploads/2023/08/g0203relativ.jpg" alt="" class="wp-image-2175" srcset="https://cncgraf.com/wp-content/uploads/2023/08/g0203relativ.jpg 847w, https://cncgraf.com/wp-content/uploads/2023/08/g0203relativ-600x160.jpg 600w" sizes="auto, (max-width: 847px) 100vw, 847px" /></figure>



<p class="translation-block"><strong>For all those who are looking for postprocessors (PP for short) for cncGraF:</strong> Below we offer some for download. Please note that these PP's were created by our dedicated user community and kindly provided to us. We cannot guarantee that there are no errors in these PP's. Furthermore, it is not possible for us to provide a PP for all CAD/CAM programmes on the market. There are simply too many CAD/CAM programmes to offer specific support for each one.</p>



<p>As a rule, the right approach is to contact the manufacturer of the CAD/CAM software and ask if they can help you to customise a postprocessor, especially if you are not able to do it yourself.</p>



<p><strong>Download Postprocessor (PP for short) for cncGraF 7.1/8 (ZIP file):</strong></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://web.boenigk-electronics.com/download/pp/fusion360-cncgraf-pp.zip" target="_blank" rel="noopener">Fusion 360 PP</a></div>



<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://web.boenigk-electronics.com/download/pp/vcarve-pro-cncgraf-postprozessor.zip" target="_blank" rel="noopener">Vcarve Pro PP</a></div>



<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://web.boenigk-electronics.com/download/pp/solidcam-cncgraf-pp.zip" target="_blank" rel="noopener">Solidcam PP</a></div>



<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://web.boenigk-electronics.com/download/pp/autodesk-Inventor-hsm-cncgraf-pp.zip" target="_blank" rel="noopener">Autodesk Inventor HSM PP</a></div>



<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://web.boenigk-electronics.com/download/pp/mastercam-cncgraf-pp.zip" target="_blank" rel="noopener">Mastercam PP</a></div>
</div>
</div>



<p>We hope that this blog article has given you an insight into the world of G-code and the importance of post-processors.</p>



<p>Yours sincerely, Your BOENIGK-electronics Team.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>