Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The machine can then be changed to the specified G5X work coordinate system to use those calculations. Below is an example of its use.

Prior to v4.108.0 machining operations had to be programmed relative to the center of rotation of the machine. Let’s say one of the machining operations is performed at A45 B0. The posted code would generally look something like:

Code Block
; Without rotated work offsets, G54 offsets should all be set to 0
G54
G0 A45 B0
; ... Machining operation about center of rotation

...

The P argument of the M254 code specifies which G5X work coordinate system to store the rotated offsets in. In the example above, we chose work coordinate system 9 to be used, or G59.3. The P argument can be any number between 1 and 9. G54-G59 are 1-6 and G59.1-G59.3 are 7-9 (see MachineKit’s LinuxCNC’s documentation of the G5X offsets). At the end of the machining operation, we switch back to G54, which is required if a subsequent machining operation is performed at a different A or B angle.

...