SO3, Carbide Motion, & WCS

Talk about all things CNC
RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: SO3, Carbide Motion, & WCS

Post by RobCee » Tue Jul 28, 2015 5:42 pm

It is a tricky concept to get your head around, I'll give you that. It took me a while to get to grips with it. I will see if I can explain a bit better.
Shapeoko.jpg
ShapeOko Machine Bed
Shapeoko.jpg (52.66 KiB) Viewed 2038 times
There are a number of types of coordinate systems available to you in gcode:

Machine Coordinates G53. These cannot be changed from gcode, but you can make them current with a G53 command

Default Work Coordinates G54: Typically used for the work piece, but may be reset by a M30 command.

Write to the G54 coordinate origin using "G10 L2 P1 X0 Y0 Z0". This overwrites the G54 origin with the given coordinates.
Your gcode sending software will show you the G54 coordinates as the standard work coordinates by default, along side the machine coordinates.

Additional Work Coordinates: G55 ... G59.3 coordinates, typically used for sub-parts or other locations you wish the machine to 'remember'. These are not reset by the M30 command and remain in memory when the machine is powered down.

Switch to G55 coordinates using "G55". Switch back to G54 with "G54", etc.

Here are the more common definable Coordinate Systems and commands to set them (You may also use L20 instead of L2 for relative positioning)
G54 - G10 L2 P1
G55 - G10 L2 P2
G56 - G10 L2 P3
G57 - G10 L2 P4
G58 - G10 L2 P5
G59 - G10 L2 P6
G59.1 - G10 L2 P7
G59.2 - G10 L2 P8
G59.3 - G10 L2 P9

(There are more than this, but you get the picture)

There is a much more technical description on the LinuxCNC site about this subject. I am not sure how much it helps to make it easier though.
Let me know if you would like something more explained and I will have another go.
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

BellyUpFish
Posts: 174
Joined: Mon Jan 12, 2015 9:19 am

Re: SO3, Carbide Motion, & WCS

Post by BellyUpFish » Tue Jul 28, 2015 7:03 pm

Wow RobCee, that post is pure gold.

heathenx
Posts: 114
Joined: Thu Apr 02, 2015 10:59 am

Re: SO3, Carbide Motion, & WCS

Post by heathenx » Mon Aug 10, 2015 12:36 am

HOORAY! I finally figured out how to set the world coordinate system. The secret was using grbl-panel, which I just discovered an hour ago. Now I can easily set my machine 0 (g28.1) at some safe place and then set my offsets to the lower left hand corner of my work piece. g28 send me home and g54x0y0z0 goes to the corner. I can easily set a g30 too, for whatever reason.

I haven't actually run any code yet through grbl-panel so I hope it works alright. If anything I have a much better understanding of what RobCee was trying to explain to me. I wish I would have found grbl-panel sooner.

One question: Now that I can set g54, how do I tell my gcode to start there? Do I just add a "g54 x0 y0 z0" before the main code (in notepad)?

Ref.
https://github.com/gerritv/Grbl-Panel
https://github.com/gerritv/Grbl-Panel/r ... g/v1.0.3.0
Shapeoko 3, #405 / Dewalt 611 w/Super PIDv2, limit switches

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: SO3, Carbide Motion, & WCS

Post by cvoinescu » Mon Aug 10, 2015 11:29 am

You're mixing up two separate "commands". G54 switches to the first work coordinate system (the one set with G10 L2 P1 or G10 L20 P1). Following G54, all G0, G1, G2, G3 commands will use that coordinate system. What you really want is:
G54
G0 X0 Y0 Z0

It works like you did it because simply saying X0 Y0 Z0 uses the last movement command mentioned, which was likely either G0 or G1 -- so it happens to work. If your last command before the G28 was G2 or G3, it would not work.

Using G28 or G30 moves to the same G28.1 or G30.1 physical position (machine coordinate) regardless of the active work coordinate system. However, it does not switch you out of the current work coordinate system, so the following G0 and G1 commands will still obey your WCS offsets. You don't need the G54 again.

Moreover, G54 is the default work coordinate system. Your machine is in the G54 WCS at startup, and stays in it until you change it (G55 etc). It even remembers the offsets for all coordinate systems while the power is off, but it always goes back to G54 when reset or powered off.

In other words, if you only ever use the first work coordinate system (G54), you don't even need to put a G54 in the G-code at all.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

heathenx
Posts: 114
Joined: Thu Apr 02, 2015 10:59 am

Re: SO3, Carbide Motion, & WCS

Post by heathenx » Mon Aug 10, 2015 7:31 pm

Cripes! Just when I think I have my mind wrapped around it...I get more confused. :?
Shapeoko 3, #405 / Dewalt 611 w/Super PIDv2, limit switches

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: SO3, Carbide Motion, & WCS

Post by cvoinescu » Mon Aug 10, 2015 7:40 pm

Short version: instead of G54 X0 Y0 Z0, just say G0 X0 Y0 Z0. You can safely ignore everything else I said if you don't want to know why that works. :)

Oh, and if your machine acts weird, you can clear the G54 offsets like this: G10 L2 P1 X0 Y0 Z0.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

heathenx
Posts: 114
Joined: Thu Apr 02, 2015 10:59 am

Re: SO3, Carbide Motion, & WCS

Post by heathenx » Mon Aug 10, 2015 7:45 pm

I'm about ready to head home for the day so I'll run some test code tonight to get even more familiar with what's going on. Your explanations are always good. Thank-you.
Shapeoko 3, #405 / Dewalt 611 w/Super PIDv2, limit switches

heathenx
Posts: 114
Joined: Thu Apr 02, 2015 10:59 am

Re: SO3, Carbide Motion, & WCS

Post by heathenx » Mon Aug 10, 2015 10:40 pm

At the moment I'm running my first 3D job with a roughing pass with a 1/8" flat end mill and a finishing pass with a 1/8" ball end mill. This is my first 3D job with a tool change. Everything seems very straight-forward when using grbl-panel. When I click on dialog box buttons I can see the actual code being sent to the machine so I'm using that to learn what I'm doing.

You were right by the way. Once I set my offset, I don't have to add anything extra to my gcode. It starts right were I want it to start which is on the lower left hand corner of my stock. Obviously, I have a lot to learn.
Shapeoko 3, #405 / Dewalt 611 w/Super PIDv2, limit switches

Post Reply