Author Topic: Approach & Depart in PP  (Read 635 times)

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 606
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Approach & Depart in PP
« on: April 01, 2020, 11:47:09 am »
Guys,

Although i've been working with CamBam for over 12 years now, there's still one thing that bothers me a bit.

When starting a program, the machine rapids down to Clearance plane.
And when a job is done, it retracts to Clearance plane.

What i would like, and what i do when writing a program by hand, is a 3 Axis movement to "Setup Height", then a "plunge down" to clearance.

When working with strapclamps to hold a workpiece, or when working on a surface that is not the top surface of the part, the standard approach could cause all sorts of trouble.

Also, when i'm finished, i move to the G28 Position, which is with the mill retracted to (almost) Z-Max, and the table moved forward, for easy parts exchange. (that also means the A-Axis is returned to zero

So.. what i want to achieve is:
in the start of the program a movement like this (Lets say X10 Y-10 is my first startpoint)
G00 X10 Y-10 Z20
Then.. the standard PP can take over, and start the spindle and plunge down to clearance.

At the end of the program i'd like to insert a G28 prior to M2/M30
How can i make this happen?.. is there a certain syntaxis definition, and can i add M Commands in the PP definitions?.. This would be helpful because in EdingCNC i can make my own M Codes.

Thanks in advance

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4333
    • View Profile
Re: Approach & Depart in PP
« Reply #1 on: April 01, 2020, 12:07:18 pm »
Have you already tried adding that code to Custom MOP Header and Custom MOP Footer ?
Made in England

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 606
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Approach & Depart in PP
« Reply #2 on: April 01, 2020, 13:25:06 pm »
That might work.. but how do i do that?.. is there a certain Syntaxis i have to follow?

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2298
    • View Profile
Re: Approach & Depart in PP
« Reply #3 on: April 01, 2020, 14:51:46 pm »
Have you already tried adding that code to Custom MOP Header and Custom MOP Footer ?

With Z height it does not work as expected - the footer code is inserted and executed just before the end but then the last code is a move to 'retract height' given in the MOP. So a manual edit is still required. Or a way the footer be inserted at the very end, not the MOP end. In my experience the spindle goes high only to return then back to 'retract height'

Maybe a modified post without the usual -
'go to retract height',
M5
M30

--------
I've seen 'Approach' and 'Depart' MOP parameters in higher (read expensive) end CAM program. But they seemed to me similar to lead-in /lead-out speed parameters.
« Last Edit: April 01, 2020, 14:56:27 pm by Dragonfly »

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 3913
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Approach & Depart in PP
« Reply #4 on: April 01, 2020, 15:55:08 pm »
I have edited my post processor add G53 Z0 to tool changes and end of program.  Yo may need to set a G0 or G01 F5000 prior to the G53 depending on how your control software processes G53.  Most controls do a G53 at last commanded speed. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 606
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Approach & Depart in PP
« Reply #5 on: April 01, 2020, 16:55:40 pm »
Have you already tried adding that code to Custom MOP Header and Custom MOP Footer ?

What i have done sofar.. I've edited the cbpp File:

<EndRewind> G28 M2</EndRewind> i've added G28 here.
This comes after {$clearance} and {#spindle(off)}
This works, because G28 moves Z-First..

Normally i Program a Z20 M5 at the end, and then G28 M2) But the PP just moves straight up. no problem..

A 3 axis move to 20 mm above clearance is the last item on my wishlist.. or, an added "Safety height" in CB, to first move to Safety height (above clamps), then to startpoint, Plunge to {$clearance}  and Off it goes.. that would also be great.. because if you have touched off somewhere on the part, and clamps are in the way, it first goes up, and then to start..

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2298
    • View Profile
Re: Approach & Depart in PP
« Reply #6 on: April 01, 2020, 18:27:32 pm »
Quote
A 3 axis move to 20 mm above clearance is the last item on my wishlist.. or, an added "Safety height" in CB, to first move to Safety height (above clamps), then to startpoint, Plunge to {$clearance}  and Off it goes.. that would also be great.. because if you have touched off somewhere on the part, and clamps are in the way, it first goes up, and then to start..
That's more or less what my Mach3 macro does when changing tool and touching a fixed touch plate on the table. With the machine initially homed using G53. (But I had to modify the screen set and add a button and some extra fields.)
But I thing a global 'safety clearance' in CB will be a bonus. If left = 0 use 'clearance', if different use it for intial start up and at the end, as well as at tool change.
« Last Edit: April 01, 2020, 18:29:36 pm by Dragonfly »

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 606
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Approach & Depart in PP
« Reply #7 on: April 01, 2020, 22:36:37 pm »
Indeed.. that should be in the "Part" as an approach to the part after toolchanges for instance..

i don't have an ATC (yet), but when i do a toolchange, my CNC Control (EdingCNC) Calls a Macro to do Toolmeasurement.

That process is handled by the Macro that i wrote. As soon as the Controller hits an M6 Txx, it goes to Z Max, display's a dialog that asks for approximate tool length (just use a tape measure),  and after the length is entered, the machine moves to above the toolsetter, rapids down to safety height (approximately 20 mm above the setter), Probes down, stores toollength in the table, Re-Calls the tool (without changing it), so the new length is loaded, and then continues.
That is where i normally write my 3 axis movement to 20 mm above clearance plane.

I think that a 3axis approach to "Setup Height" i.e. Above the clamps should be an option in all the MOps..

Specify "Setup height" in the Part, and select 3 axis rapid approach in the MOp..

Within the MOp, the tool can stay low (clearance plane) because it is highly unlikely that a clamp is in the way when performing a MOp..

I did actually notice that some Heidenhain controls do retract to setup height within their built-in Cycles (MOps)... i consider that a bug.. there is no need for that..

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1359
    • View Profile
Re: Approach & Depart in PP
« Reply #8 on: April 02, 2020, 00:37:16 am »
I have always thought of the clearance plane as exactly that, clear of everything like clamps. So I’d really prefer not to see that change. Note that if your tool is below the clearance plane that first move is upward as it should be. So I think a retract plane in MOPs would make sense. If a retract plane is specified a rapid move within the MOP happens at retract height and when the MOP ends the clearance plane is used.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4333
    • View Profile
Re: Approach & Depart in PP
« Reply #9 on: April 02, 2020, 06:07:19 am »
Made in England

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8233
    • View Profile
Re: Approach & Depart in PP
« Reply #10 on: April 02, 2020, 10:58:02 am »
I'm generally on the same side of the fence as Gary.  'Clearance Plane' has always meant that and only that to me.  "Individual fixture clearance" is, to me, a different issue, and should be dealt with in the MOp.

My new router plunges so rapidly that within 3 cm or so, how far Z has retracted makes very little difference in total machining time.

Before you protest, think about that:  If close to the surface, the axis cannot accelerate/decelerate; it must go at a fairly slow rate.  If further from the surface, it can reach pretty high speed before having to decelerate.

The difference in time to slew .5 cm or 3 cm is almost nothing.  Unless the job has many hundreds or thousands of such plunges, the total job time increases by a completely-acceptable amount.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 606
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Approach & Depart in PP
« Reply #11 on: April 02, 2020, 16:51:48 pm »
Would this plugin do the job ? http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Relocator.html

ehh.. No...

What i just would like to see is a "plane" as a safe Z-Height, that the machine goes to between MOps..
like so:  Start program, machine plunges to Z20 (Above all clamps), Moves to start point of first MOps, performs MOp, Retracts to Z20, moves to next MOp, Plunges down.. and so on.. when finished.. retract to Z20, stop Spindle, and do whatever is in the footer..
Like what i did.. added G28 in there to move the machine to "Parts Change Position" i.e Table forward, Spindle at Z Max..well out of the way of anithing on the table..

For me this is important.. as i work often with sub mm tools, when you hit them.. they break.. (íve had a 0.7 mm drillbit in my hand for 3 weeks... and these drills cost €14,- a piece)
quite frustrating if after machining Titanium, a tool breaks because you accidently hit it..

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1359
    • View Profile
Re: Approach & Depart in PP
« Reply #12 on: April 02, 2020, 18:31:19 pm »
Arie,
How do you feel about my suggestion, a retract plane per MOP?
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4333
    • View Profile
Re: Approach & Depart in PP
« Reply #13 on: April 02, 2020, 19:28:32 pm »
Would this plugin do the job ? http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Relocator.html

ehh.. No...


Well you say no, but the attached file seems to do all the moves you described.
Made in England

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 606
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Approach & Depart in PP
« Reply #14 on: April 03, 2020, 17:12:18 pm »
It might do that.. but i don't want to draw lines for these movements.. also because i do not know the work coordinates where i start from, or return to after machining.. Yes.. in G53 i do know.. but i don't program in G53..

I think we're getting somewhere here though..

one could indeed set a clearance of 20 mm in all the MOps'' that would work as well.. but when machining, that means the machine will retract to 20 mm after each cutting path.. and that seems a bit unneccessary to say the least..
Just above workpiece will do, or rather is my preference..

Indicating a second "retract plane" would be a nice feature.. maybe i should post that in the Feature requests part of the Forum, since that doesn't seem to be possible right now..

The end moves, going G28 M2 at the end of the program, works now with my PP, after editing it.
What i also would like to know.. Is there a way to add other MCodes and GCodes to the PP?.. since i can make My own MCodes in EdingCNC.