Coordinate Systems
Startup Positions
- At the start of program execution, the actual servo positions are read from each of machine axes in machine units (inches or mm), saved as the current position in Machine Coordinate System (MCS), transformed using currently active offsets and saved as a current position in Local Coordinate System (LCS).
Setting Base Position
- See #80274
Coordinate Systems
There are 4 Coordinate Systems used for transformations and offset application:
- Local Coordinate System (LCS). This coordinate system is the closest to the G-code file and the target positions from each G-code command are directly represented in the LCS after converting them to the absolute positions in the machine units.
- Work Coordinate System (WCS). This coordinate system is used for saving positions after transforming LCS positions using Scaling (G51), Rotation (G68), and Local Offset (G52).
- Fixture Coordinate System (FCS). This coordinate system is used for saving positions after transforming WCS positions by applying an active Work Coordinate Offset (G54-G59).
- Machine Coordinate System (MCS). This coordinate system is used for saving positions after transforming FCS positions by applying a Base Offset (G92) and a Tool Length Offset (G43). This coordinate system saves the actual commanded positions in machine units where the motion will be commanded to.
Definitions:
- Work offsets (G54-59)
- See #80287
- Scaling offset (G51)
- See #80284
- Rotations (G68)
- See #80289
- Local offsets (G52)
- See #80285
- Base offsets (G92)
- See #80274
- Machine Coordinate System
- Set in machine units (inches or mm).
- Closely matches the commanded servo positions.
Axes Definition
Only 4 axes can be commanded on a line at a time
| Axis | Axis Type | Comments |
|---|---|---|
| X | Path, Linear | |
| Y | Path, Linear | |
| Z | Path, Linear | |
| E | Aux, Linear | Extruder, Auxiliary axis |
| S | Spindle | Speed control only |
- Path Axes
- These are the primary axes for the system (X, Y, Z)
- Aux Axes
- E axis follows along with the Path axes
- Feed rate
- See Feed Rate for how feed rate is calculated
Conceptual Coordinate Transform Flow
| Point | G68 | G52 | MCS |
|---|---|---|---|
| N1 | (20.0, 10.0) | (10.0, 7.0) | (21.0, 21.0) |
| N2 | (50.0, 10.0) | (16.0, 10.0) | (27.0, 24.0) |
| N3 | (50.0, 20.0) | (14.2, 12.0) | (25.2, 26.0) |
| N4 | (20.0, 20.0) | (9.0, 10.0) | (20.0, 24.0) |
Coordinate System Saving and Reset Behaviors
- MCS
- Compass G-Codes use the iCube Controller side MC_CoordinateSystem#MCS as the fundamental reference frame for evaluating the MCS of the NC side coordinate systems
- G53 moves then go directly to the motion position commands on the iCube Controller
- G92 with offsets at 0 would do the same
- G01 will apply coordinate transforms as shown on this page accordingly
- The NC system expects that the base units configured for the axes are set to match #<NC.MachineParameters.MachineNativeUnits> setting of mm/inch, in order to know the scaling to apply when switching between mm/inch (G20/G21)
- Compass G-Codes use the iCube Controller side MC_CoordinateSystem#MCS as the fundamental reference frame for evaluating the MCS of the NC side coordinate systems
- G92
- Applies an NC managed and temporary offset to commanded positions for an NC program
- See G92 page for details
- G54/WCS is shifted by changes done from G92
- G52
- Applies an NC managed and temporary shift to commanded positions for an NC
- See G52 page for details
- On restart of the Compass Runtime program on the PC:
- G50/51 scaling state is unchanged (enabled or disabled).
- However, the scaling ratios are reset to defaults (apply 1:1 scaling)
- G92 offsets are reset to apply no offset
- G52 offsets are reset to apply no offset
- G54-59 work coordinate system is unchanged from the last active work coordinate
- G50/51 scaling state is unchanged (enabled or disabled).
- On restart (warm start or reboot) of the iCube Controller:
- G50/51 scaling is disabled (G50 active)
- G92 offsets are reset to apply no offset
- G52 offsets are reset to apply no offset
- G54 is initialized as the default work coordinate system
Coordinate System Pipeline Flow
The diagram below shows the flow of position data through the transforms to create each coordinate system, as each gets applied sequentially internally.