Work Offsets are an incredibly useful feature in G-Code. They let you run the same g-code at different places on your machine. So for example, you have g-code for a part but you want to lay 6 parts out on a 3 x 2 grid. Assign a work offset to the part zero of each of the 6 positions and it becomes very easy to use the same g-code for each part.
G-Wizard Editor has always been good with Work Offsets, but the latest edition (version 1.8 can be downloaded here) has even more conveniences.
Work Offset Hints
The Hints feature in G-Wizard Editor tells you what a line (what’s officially called a “block”) of g-code does in plain English. It’s really handy when learning g-code, but it tells you all sorts of things that just aren’t in the g-code even if you know how to read it already. For example, on an arc, it calls out the arc center as well as a bunch of other information. In this latest release, when a new work offset is put in place, it tells you the XYZ coordinates of the Work Offset. Something like this:
This gcode sets several work coordinates as part of a loop and each of them is recorded in the hint…
That hint is particularly nifty because the workoffsets are being set as #variables. The line G#100 executes a gcode based on the value of variable #100. In this case, the value goes from 54 to 59, so we set all the work offsets from G54 to G59. You get to see the Work Offset XYZ coordinates for each value of the variable below. That can be really helpful in a sophisticated gcode like this one in helping understand what’s going on.
Work Offset Editing + New Haas G110..G129 Offset Editing
By defaults, the work offsets are all zeroes. This isn’t very interesting, so you’ll want to set real work offsets just like you do on your CNC machine. Doing so is easy. Go to Setup Post Variables and click the sub-tab for the type of Work Offset Variables you want. Here’s the one that corresponds to G54.1 P1..P48 on Fanuc (and similar) controls:
The Work Offset Editor…
In the Work Offset Editor, you can enter XYZ values for each offset, see which #variables correspond, and also see which ones go with the Haas G110..G129 g-codes. Pretty handy stuff.
#Variables in Spreadsheets
Here’s on more goodie if you work with #variables a lot. GWE v1.8 (this latest version) now stores those variables in spreadsheet CSV files. This means you can open up the file to see all the variables laid out at once. You could even substitute a file to set up for different jobs. To find these files, go to the Setup Files tab. All the setup files are called Preferences files and that tab tells you the directory where they are kept.
Work Offsets and #variables are power tools for g-code. We wanted to give you some power programming tools in GW Editor to make working with them easier than ever. If you’ve never tried G-Wizard Editor, you try our free trial to check it out.
Go on, what are you waiting for?
PS If you think gcode is so hard you could never learn it, it’s not. Take our free G-Code Tutorial and you’ll be fluent in g-code in no time. It’s filled with examples that you try with GW Editor too. You should be able to complete the G-Code pretty easily during the free GW Editor trial too.
Like what you read on CNCCookbook?
Join 100,000+ CNC'ers! Get our latest blog posts delivered straight to your email inbox once a week for free. Plus, we’ll give you access to some great CNC reference materials including:
- Our Big List of over 200 CNC Tips and Techniques
- Our Free GCode Programming Basics Course
- And more!
Just enter your name and email address below:
100% Privacy: We will never Spam you!