As always reference the LinuxCNC manuals and the LinuxCNC Wiki for more information.
Coordinate Systems
Coordinate systems can be a bit confusing to use at first. Lets see if we can shed some light on this. LinuxCNC has 10 coordinate systems, G53 is the machine coordinate system and G54-59.3 are the user coordinate systems.
Machine Coordinate System
G53 is established when you home your axes. On a simple machine with no homing switches you jog each axis to a match mark and press the Home button. This point becomes the G53 zero point for that axis. The soft limits for each axis are based on the G53 machine coordinate system. To move an axis using the G53 machine coordinate system you have to prefex each move with G53. Notice in the example below that you also need the type of move on the line. Moving in G53 machine coordinate system can be useful to make sure your moving to a specific machine location without any offsets applied.
G53 G0 X0 Y0 Z0
User Coordinate Systems
Normally you will work in the G54 coordinate system as outlined in the Mill Material & Tool Setup chapter.
For our example we will set up 4 fixtures to engrave dog tags. Our dog tag G code file uses the left rear corner of the fixture as X0 Y0. First thing is to store the offsets of the fixtures. The simple way is to change to each coordinate system and using an edge finder to locate each fixture. It will also help to label each fixture with the user coordinate system it uses.
Fixture | Coordinate System |
---|---|
1 |
G54 |
2 |
G55 |
3 |
G56 |
4 |
G57 |
-
In the MDI tab issue G54 just to make sure your in User Coordinate system 1
-
Jog to the left side of the fixture and touch off the X axis
-
Jog to the rear of the fixture and touch off the Y axis
Repeat for the other three fixtures changing the user coordinate system each time.
Using the subroutines example file we can now do the following in G code.
(preamble should be in the called file) G54 o<circle> call G55 o<circle> call G56 o<circle> call G57 o<circle> call G54 M2