What's new
What's new

Siemens Plane Commands (G17.18,19)

rimcanyon

Diamond
Joined
Sep 28, 2002
Location
Salinas, CA USA
Trying to learn Siemens GCode.

What is the purpose of the plane commands, G17.18.19? Siemens docs explain the command, but do not explain why it is necessary. This is from an 828/840 manual:

A selection of [FONT=&quot]the plane [/FONT]is made with the associated programming instruction:

  • XY-Plane - programming command [FONT=&quot]G17[/FONT]
  • XZ-Plane - programming command [FONT=&quot]G18[/FONT]
  • YZ-Plane - programming command [FONT=&quot]G19[/FONT]
    [FONT=&quot]Note:[/FONT]
    [FONT=&quot]The standard plane being used for working with CNC[/FONT][FONT=&quot]- [/FONT][FONT=&quot]Turning machines is G18. With CNC[/FONT][FONT=&quot]-[/FONT][FONT=&quot]Milling machines the programming plane G17 is being used.[/FONT]
    The working plane should either be programmed at the beginning of the NC-program, or before programming an operation in the relevant working plane.
    The active programming plane is modal and remains active until changed by another programming instruction.


 
One benefit is you can use these in combination with the drilling cycles to do thing like peck drill in the x axis.
 
Trying to learn Siemens GCode.

What is the purpose of the plane commands, G17.18.19? Siemens docs explain the command, but do not explain why it is necessary. This is from an 828/840 manual:

A selection of the plane is made with the associated programming instruction:

  • XY-Plane - programming command G17
  • XZ-Plane - programming command G18
  • YZ-Plane - programming command G19
    Note:
    The standard plane being used for working with CNC- Turning machines is G18. With CNC-Milling machines the programming plane G17 is being used.
    The working plane should either be programmed at the beginning of the NC-program, or before programming an operation in the relevant working plane.
    The active programming plane is modal and remains active until changed by another programming instruction.



These are part of the basic gcode specification, not specific to Siemens. Your machine (ISTR you mentioning in your gcode thread that you were using a Dialog control) almost certainly has these too.

Their purpose is to define the working plane for non-linear moves. If you've only ever used a basic three axis mill or two axis lathe then you possibly will never have needed to use them before.

Canned cycles require a define working plane, the machine will start up with the default plane already set as a modal G code.

If you use G2/3 with an R value and endpoint then it has to know which plane it's working in. If you use it with IJK then you already specify the working plane, however the control should alarm out if you specify an IJK combination that conflicts with the active plane.

Imagine you want to use a right angle head and a peck drill cycle to drill a hole in the side of a part on your mill...
 
On a 3 axis mill you would need a 90 deg head to use a different plane for drilling, it is used for arcs in the zx and zy planes

Sent from my SM-G973F using Tapatalk
 
One thing about them, make sure your post is outputting the correct codes when changing! Had an oopsy one time where for some reason my post did not switch back from G18/G19 after doing some surfacing and tried to drill in the Y axis instead of Z.
 
One thing about them, make sure your post is outputting the correct codes when changing! Had an oopsy one time where for some reason my post did not switch back from G18/G19 after doing some surfacing and tried to drill in the Y axis instead of Z.

Yep, been there done that.

Got an even better one - on the old Hurcos they used a slightly different interpretation of the cartesian coordinate system, such that in G18 specifically, G2 and G3 are inverted (at least compared to every other control that I've used). That one was fun to discover...
 
These are part of the basic gcode specification, not specific to Siemens. Your machine (ISTR you mentioning in your gcode thread that you were using a Dialog control) almost certainly has these too.

Their purpose is to define the working plane for non-linear moves. If you've only ever used a basic three axis mill or two axis lathe then you possibly will never have needed to use them before.

Canned cycles require a define working plane, the machine will start up with the default plane already set as a modal G code.

If you use G2/3 with an R value and endpoint then it has to know which plane it's working in. If you use it with IJK then you already specify the working plane, however the control should alarm out if you specify an IJK combination that conflicts with the active plane.

Imagine you want to use a right angle head and a peck drill cycle to drill a hole in the side of a part on your mill...

No, Deckel D2 does not have G17-19. But it does have restrictions related to plane, so perhaps the effect is the same. For example D2 allows rotations of the coordinate axes using G55, and it learns the plane depending on the combination of i,j,k variables specified. Then if subsequent commands are issued that require circular interpolation in some other plane, (e.g. G55 in XY followed by G55 or G02 in XZ) it errors out with a wrong plane message, or words to that effect.

What I am really trying to figure out is whether I can mill a hemisphere on a 3-axis machine using simple g-code on a Phillips 828/840 controlled machine. E.g. is it possible to call G02 in an arbitrary vertical plane (after rotating the XY plane)? Does the plane command work for a rotated plane (i.e. can I use G55 in XY then issue G18 to work in a rotated XZ plane)? Does cutter compensation work after calling G55?
 
I got an answer from Chris Pollack:

Yes you can interpolate in an XZ or YZ orientation and then rotate the geometry about Z to create a sphere. If you want cutter comp for the ball endmill it would get a little trickier. We offer 3D cutter comp but to do it properly you would need to add a surface normal component to the G code line.

I don't know about the surface normal component, I am trying to find an example in the Siemens manual.
 
I got an answer from Chris Pollack:

Yes you can interpolate in an XZ or YZ orientation and then rotate the geometry about Z to create a sphere. If you want cutter comp for the ball endmill it would get a little trickier. We offer 3D cutter comp but to do it properly you would need to add a surface normal component to the G code line.

I don't know about the surface normal component, I am trying to find an example in the Siemens manual.

Again, not specific to Siemens. Just as 2d cutter comp requires the direction to be defined, so does 3d comp. 2d is left or right, the distance from the part edge to the cutter centreline.

3d is defined using a surface normal vector, so that the control can offset the surface to the tool centre point along the vector.

As to your previous question about milling a hemisphere using coordinate rotation around the z axis, yes that would be possible on any other control that supports coordinate rotation. I don't know the dialog control, nor how it's G55 code works, but if it works like any other control it can be used the way you describe, except that you would not use any plane selection commands in that case.

That said, wanting to do that using hand coded gcode is borderline luddism. A 3d spiral toolpath from cam will yield much better results.
 








 
Back
Top