Jacks Crafts

Wood Working

CNC Tips and Help

JacksCrafts CNC G Code Post Processor

I made my own processor to use in VCarve.  It is a nice simple code for Do It Yourself CNC users like me who built their own CNC router.  The generic g-code processors in VCarve / Vectric Aspire did not have the tool notes on the top. And since I do not have a tool changer ( ATC ) I did not see the since in using other post processors that had the extra stuff I did not need. 

I made one for Inches and one for MM with arcs. And I included 2 sets one with TAP extension and the other with NC extension.  Either one can be used in UGS (Universal GCode Sender).

I use an Arduino GRBL machine with NetBeans ( Universal G-Code Sender )  Click the thumbnails below to enlarge them.

I own the copyright to this program but you are welcome to use if for free for your own personal use. Use this at your own risk – so make sure you test it with a dry run before trying it out on an actual project. Note, I updated these post processors on 04/20/2020. I had an extra 0 on the G0’s .

Stl file Compass Rose

Compass Rose STL file

You can add this nice looking compass to your terrain maps to give them a little more dimention. This map is my home town Muncie Indiana. It was desinged and made by my niece Erin.

You can get the file at https://www.etsy.com/shop/JacksCrafts2. Click the Button below.

Here are some links:

Go to GRBL and click on the code tab, then you will see the download button.

How do you pronounce Grbl!?

This is probably the number one question, and the answer is: “It depends on who you ask.”

When Simen Svale Skogsrud first sat down and wrote Grbl in 2009, he named it after a bigger version of a computer mouse. It’s small, useful, and doesn’t do much other than what its designed to do. So, if you ask him, it’s pronounced like “gerbil“. If you ask Sonny Jeon, the developer since 2011, he’d say it’s pronounced ‘grr-ble‘, because he was teased too many times by his wife when working on the project. quote from GitHub.


Go to github to get UGS. I like the nightly build myself.  You can watch my how to video below.



https://github.com/pelrun/ugs-platform-plugin-camera Only get the NBM file.

This Elegoo Uno has the Atmega16U2
You can pick up a 4 of TB6600 Drivers to use with Nema 23

If you are getting a clone UNO? I suggest the UNO R3 Board ATmega328P with ATMEGA16U2. It will use the Arduino driver, so no need for the CH340 / CH341 driver.

Watch my -How to set up UGS Youtube Video with Camera Plugin

NotePad++ is a nice free editor for your gcode


If you want to add the different colors to the files, here is my G Code language files you can import it into Notepad++. I made one for NC and one for TAP files. 


How to:
When you open NotePad++ go to Language
then scroll down to User Define Language
then click on Define Your Language
on the pop up click on Import
find the unzipped file, click on it and your done.

Then if you want to change the colors to suit your needs.
Click on one of the tabs, Keywords or Comments
and click on the color button, bold, Italic… and so on.

Prusa has some calcualtors for setting your resolutions. https://www.prusaprinters.org/calculator/

Adding a Zero or Corner Touch Plate with CNC Shield

cnc shield diagram for probe A5

I decided to build a new CNC machine with all Ball Screws

Found out I needed bigger drivers so I am using the TB6600. This meant I can use Arduino UNO but without the cnc shield. For the touch plate / Z probe use the A5 with GND.

If you are using a CNC  shield on an Arduino UNO  you may wonder why everyone tells you to use the A5 pin on the arduino when it is covered up by the shield.

This diagram of the CNC shield shows where the A5 pin connects the 2 together. So you use the 1st and 3rd pin. Dupont connectors are used, where you see the red and green dot on this diagram. 

Here is the GRBL settings on my machine.

Copied from UGS 05-20-2019

**** Connected to COM3 @ 115200 baud ****

Grbl 1.1f [‘$’ for help]

>>> $$

$0 = 10    (Step pulse time, microseconds)

$1 = 255    (Step idle delay, milliseconds)

$2 = 0    (Step pulse invert, mask)

$3 = 0    (Step direction invert, mask)

$4 = 0    (Invert step enable pin, boolean)

$5 = 0    (Invert limit pins, boolean)

$6 = 0    (Invert probe pin, boolean)

$10 = 1    (Status report options, mask)

$11 = 0.010    (Junction deviation, millimeters)

$12 = 0.002    (Arc tolerance, millimeters)

$13 = 1    (Report in inches, boolean)

$20 = 0    (Soft limits enable, boolean)

$21 = 0    (Hard limits enable, boolean)

$22 = 0    (Homing cycle enable, boolean)

$23 = 0    (Homing direction invert, mask)

$24 = 25.000    (Homing locate feed rate, mm/min)

$25 = 500.000    (Homing search seek rate, mm/min)

$26 = 250    (Homing switch debounce delay, milliseconds)

$27 = 5.000    (Homing switch pull-off distance, millimeters)

$30 = 30000    (Maximum spindle speed, RPM)

$31 = 0    (Minimum spindle speed, RPM)

$32 = 0    (Laser-mode enable, boolean)

$100 = 80.000    (X-axis travel resolution, step/mm)

$101 = 80.000    (Y-axis travel resolution, step/mm)

$102 = 400.000    (Z-axis travel resolution, step/mm)

$110 = 1500.000    (X-axis maximum rate, mm/min)

$111 = 1500.000    (Y-axis maximum rate, mm/min)

$112 = 600.000    (Z-axis maximum rate, mm/min)

$120 = 93.750    (X-axis acceleration, mm/sec^2)

$121 = 93.750    (Y-axis acceleration, mm/sec^2)

$122 = 400.000    (Z-axis acceleration, mm/sec^2)

$130 = 760.000    (X-axis maximum travel, millimeters)

$131 = 600.000    (Y-axis maximum travel, millimeters)

$132 = 85.000    (Z-axis maximum travel, millimeters)


>>> $G

[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0.0 S0]


You can change the settings right in UGS.

Here are the Settings for my “All 1605 Ball Screws CNC Machine”.

**** Connected to COM8 @ 115200 baud ****

Grbl 1.1h [‘$’ for help]

>>> $$

$0 = 10    (Step pulse
time, microseconds)

$1 = 255    (Step idle
delay, milliseconds)

$2 = 0    (Step pulse
invert, mask)

$3 = 0    (Step
direction invert, mask)

$4 = 0    (Invert step
enable pin, boolean)

$5 = 0    (Invert
limit pins, boolean)

$6 = 0    (Invert
probe pin, boolean)

$10 = 1    (Status
report options, mask)

$11 = 0.010   
(Junction deviation, millimeters)

$12 = 0.002    (Arc
tolerance, millimeters)

$13 = 1    (Report in
inches, boolean)

$20 = 0    (Soft
limits enable, boolean)

$21 = 0    (Hard
limits enable, boolean)

$22 = 0    (Homing
cycle enable, boolean)

$23 = 0    (Homing
direction invert, mask)

$24 = 25.000   
(Homing locate feed rate, mm/min)

$25 = 500.000   
(Homing search seek rate, mm/min)

$26 = 250    (Homing
switch debounce delay, milliseconds)

$27 = 1.000    (Homing
switch pull-off distance, millimeters)

$30 = 30000   
(Maximum spindle speed, RPM)

$31 = 0    (Minimum
spindle speed, RPM)

$32 = 0    (Laser-mode
enable, boolean)

$100 = 640.000   
(X-axis travel resolution, step/mm)

$101 = 640.000   
(Y-axis travel resolution, step/mm)

$102 = 640.000   
(Z-axis travel resolution, step/mm)

$110 = 2000.000   
(X-axis maximum rate, mm/min)

$111 = 2000.000   
(Y-axis maximum rate, mm/min)

$112 = 1000.000   
(Z-axis maximum rate, mm/min)

$120 = 200.000   
(X-axis acceleration, mm/sec^2)

$121 = 200.000   
(Y-axis acceleration, mm/sec^2)

$122 = 200.000   
(Z-axis acceleration, mm/sec^2)

$130 = 750.000   
(X-axis maximum travel, millimeters)

$131 = 533.400   
(Y-axis maximum travel, millimeters)

$132 = 53.340   
(Z-axis maximum travel, millimeters)


How to set a macro for Z probe in Universal Gcode Sender

Here is my Macro setting in UGS:

Set Z

G91; G20 G38.2 Z-.75 F2; G92 Z.057; G91 G0 Z.343; G90

This will stop 0.4 inches from the surface. Note 0.057 PLUS 0.343 equals 0.400.

For an inside corner plate you could use:

Set XY

G20 G38.2 X-1.50 F2; G92 X0.125; G91 G0 X0.875; G38.2 Y-1.50 F2; G92 Y0.125; G91 G0 Y0.875

Note: the G20 indicates inches, if you use MM use G21.

Set touch plate or Z probe in Macro on Universal G-code sender UGS

Say Alexa open browser.

Alexa HD UGS cnc pendant

Shoot I did not know what I was missing. I knew there was a button that said pendant in universal g code sender but I kind of assumed you had to buy a special piece of equipment for it. But no… you can use your cell phone or browser on you PC or Woo Hooo! I can use my HD8 Amazon tablet with Alexa. 

You can do a lot with the pendant,..  jog, send files, reset to zero or use your macros.

I still have my PC connected directly to the CNC, I really would not suggest to run the machine wireless, but all the other stuff sure. My computer is on the other side of a wall so this makes it so much easier and faster to get a job done.



Reference to G Code Numbers

DRO stands for Digital Rea Out on UGS. Look  at the Controller State Tab (DRO), it will show the initial G Codes used. And when you run a file you will see the changes from you gcode. 


Rapid positioning


Linear interpolation


Clockwise circular/helical interpolation


Counterclockwise circular/helical interpolation




Coordinate system origin setting


XY Plane select


XZ Plane select


YZ Plane select


Inch/millimeter unit


Return home


Reference axes


Return home


Straight probe


Cancel cutter radius compensation


Start cutter radius compensation left/right


Apply tool length offset (plus)


Cancel tool length offset


Reset all scale factors to 1.0


Set axis data input scale factors


Move in absolute machine coordinate system


Use fixture offset 1


Use fixture offset 2


Use fixture offset 3, 4, 5


Use fixture offset 6/ use general fixture number


Exact stop/Constant Velocity mode


Canned cycle – peck drilling


Cancel motion mode (including canned cycles)


Canned cycle – drilling


Canned cycle – drilling with dwell


Canned cycle – peck drilling


Canned cycle – boring, no dwell, feed out


Canned cycle – boring, spindle stop, rapid out


Canned cycle – boring, spindle stop, manual out


Canned cycle – boring, dwell, feed out


Absolute distance mode


Relative – Incremental distance mode


Offset coordinates and set parameters


Cancel G92 etc.


Inverse time feed mode


Feed per minute mode


Feed per rev mode


Initial level return after canned cycles


R-point level return after canned cycles

UGS Universal G Code Sender Logo 2.0
UGS Universal G Code Sender Logo 2.0

DIY and save big bucks.

Thanks for visiting Jacks Crafts

Your go to place when you want your friends to feel  special. 

Website Designed by Jack

Please let your friends know about us.