en:software:mdurosettacncsoftwaregcode:coordinate_systems:cartesian_and_polar_coordinates

With Cartesian Coordinates X, Y, and Z represent distances from part zero (absolute coordinates) or from the current position (relative coordinates).

With polar coordinates, we use an angle and a distance relative to the origin.

The following picture gives a graphical overview.

  • XY Plane: X is used to identify the radius and Y to identify the angle
  • YZ Plane: Y is used to identify the radius and Z to identify the angle
  • XZ Plane: X is used to identify the radius and Z to identify the angle

Plane independent syntax

It is also possible to use a plane independent syntax using two special symbols:

  • @ for the radius
  • ^ for the angle

The following example uses polar coordinates to generate a rotated square and a spiral.

( © 2018 by RosettaCNC Motion         )
( Polar coordinates example:          )
G17 G21 G40 G49 G54 G69 G90
G54 F1000
G0 X0 Y0 Z0
 
(Polar square)
G16 ( Enable polar coordinates )
G1 X50 Y90
G91	(Switch to relative)
Y90
Y90
Y90
Y90
G90 ( Switch to absolute )
G15 ( Disable polar coordinates )
G0 X0 Y0 Z0
 
(Polar spiral)
G16 ( Enable polar coordinates )
G1 X10 Y90
G91	(Switch to relative)
X10 Y90
X10 Y90
X10 Y90
X10 Y90
G90 ( Switch to absolute )
G15 ( Disable polar coordinates )
G0 X0 Y0 Z0
 
M2

( © 2018 by RosettaCNC Motion                               )
( Polar coordinates example:                                )
G17 G21 G40 G49 G54 G69 G90
G54 F1000
G0 X0 Y0 Z0
 
(Polar coordinates plane independent style)
G17
M98 P1000
G18
M98 P1000
G19
M98 P1000
 
x100 Y0 Z0
G52 X100
 
(Polar coordinates Fanuc style)
G17
M98 P1001
G18
M98 P1002
G19
M98 P1003
 
M2
 
O1000
    (Polar square)
    G1 @50 ^90
    G91	(Switch to relative)
    ^90
    ^90
    ^90
    ^90
    G90	(Switch to absolute)
    G0 X0 Y0 Z0
 
    (Polar spiral)
    G1 @10 ^90
    G91	(Switch to relative)
    @10 ^90
    @10 ^90
    @10 ^90
    @10 ^90
    G90	(Switch to absolute)
    G0 X0 Y0 Z0
M99
 
(Polar coordinates Fanuc style XY plane)
O1001
    (Polar square)
    G16 ( Enable polar coordinates )
    G1 X50 Y90
    G91	(Switch to relative)
    Y90
    Y90
    Y90
    Y90
    G90 ( Switch to absolute )
    G15 ( Disable polar coordinates )
    G0 X0 Y0 Z0
 
    (Polar spiral)
    G16 ( Enable polar coordinates )
    G1 X10 Y90
    G91	(Switch to relative)
    X10 Y90
    X10 Y90
    X10 Y90
    X10 Y90
    G90 ( Switch to absolute )
    G15 ( Disable polar coordinates )
    G0 X0 Y0 Z0
M99
 
(Polar coordinates Fanuc style XZ plane)
O1002
    (Polar square)
    G16 ( Enable polar coordinates )
    G1 X50 Z90
    G91	(Switch to relative)
    Z90
    Z90
    Z90
    Z90
    G90 ( Switch to absolute )
    G15 ( Disable polar coordinates )
    G0 X0 Y0 Z0
 
    (Polar spiral)
    G16 ( Enable polar coordinates )
    G1 X10 Z90
    G91	(Switch to relative)
    X10 Z90
    X10 Z90
    X10 Z90
    X10 Z90
    G90 ( Switch to absolute )
    G15 ( Disable polar coordinates )
    G0 X0 Y0 Z0
M99
 
(Polar coordinates Fanuc style YZ plane)
O1003
    (Polar square)
    G16 ( Enable polar coordinates )
    G1 Y50 Z90
    G91	(Switch to relative)
    Z90
    Z90
    Z90
    Z90
    G90 ( Switch to absolute )
    G15 ( Disable polar coordinates )
    G0 X0 Y0 Z0
 
    (Polar spiral)
    G16 ( Enable polar coordinates )
    G1 Y10 Z90
    G91	(Switch to relative)
    Y10 Z90
    Y10 Z90
    Y10 Z90
    Y10 Z90
    G90 ( Switch to absolute )
    G15 ( Disable polar coordinates )
    G0 X0 Y0 Z0
M99
  • Last modified: 2023/03/22 09:07
  • by 127.0.0.1