Author Topic: Auto clearance  (Read 170 times)

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2342
    • View Profile
Auto clearance
« on: July 25, 2020, 09:10:54 am »
Here's my question:
Is there a way to make the PP place into G-code a calculated value for clearance height. Which will be the sum of general clearance value plus stock surface value. If stock surface is zero the result will be the clearance set for the MOP. If stock surface is >0 then the tool will lift safely enough above it.
The reason I ask is that often I change the stock surface value once referencing the stock top surface, next time - the table top surface. I also often copy/paste ready MOPs but if I forget or miss to change  the clearance value and it is less than stock thickness  the result is most often lethal for the tool. If the PP is able to sum clearance + stock thickness this can be avoided.
I understand it's not an universal solution and there can be many specific cases but in general for my work style it will be an useful feature.
« Last Edit: July 25, 2020, 09:12:34 am by Dragonfly »

Offline ThisAmplifierIsLoud

  • Storm Trooper
  • ***
  • Posts: 155
  • Jam it !
    • View Profile
Re: Auto clearance
« Reply #1 on: July 25, 2020, 10:36:14 am »
In former times I did so, too. In EstlCAM you easily can switch beteeen table and stock surface.
Since using CB I am always thinking from top to down starting at zero.
Before starting a Gcode I give the material thickness to the MACHINE, that's all.
best regards

Bernhard

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8315
    • View Profile
Re: Auto clearance
« Reply #2 on: July 25, 2020, 10:53:01 am »
Fly,
There's nothing in the g-code that defines where the surface of the stock is.  There CAN be a text comment describing it, but there's no guarantee that will be there.   'Same thing applies to the thickness of the stock.

Nothing in the g-code 'knows' how thick the stock actually is.  Again, a comment can be inserted describing it, but it's not required to run the code, and isn't in every file.

There's also no guarantee that a move to the clearance height was actually for the purpose of clearance, and not part of some toolpath.  It's logical to assume that such a move was for clearance, but no guarantees.

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

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2342
    • View Profile
Re: Auto clearance
« Reply #3 on: July 25, 2020, 16:13:42 pm »
Lloyd,
I have included a line in the PP which adds a comment showing stock surface before the active G-code. So when I open the .nc file in Mach3 I see immediately where the tool Z zero should be. On the next line I see and check the first G0 Z (clearance) command. Problem is that from time to time I forget to do that check.
What you comment above are the various cases that might occur which I also mention in my first post.
The G-code does not 'know' anything. No doubt about that. The machine also 'knows' nothing and simply executes what's in the code.
But
The person who makes the MOPs knows all. And CamBam holds all parameters and values set by the user.
I'm speaking about particular cases very common for my workflow.
Here's an example:
I have some uncalibrated stock with thickness around 15 mm.
I make a Profile MOP setting stock surface=0, clearance=10mm (above stock surface), and Profile target depth=13mm.
Then I conclude that I need exactly 2mm of material be left at the bottom of the profile. So I change MOP property so that stock surface=15 (positive, relative to stock bottom), target depth=2. But IF I forget to change clearance height (10) then to tool will not be lifted above the stock.
IF there is a way to sum up values for 'stock surface' and 'clearance plane' the result (25) will assure tool is always above stock on clearance move.

Anyway, this is somewhat outside the scope of the thread and my question.
Which was "Is it possible to modify the PP so that it uses the sum of 'clearance plane' and "stock surface' as the value for go to clearance moves?"
Both parameters exist and are used by the PP. If not possible then any further discussion is irrelevant.
« Last Edit: July 25, 2020, 16:15:53 pm by Dragonfly »

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8315
    • View Profile
Re: Auto clearance
« Reply #4 on: July 25, 2020, 16:24:00 pm »
Fly,
It's entirely possible.  A fairly simple post-build processor could do the manipulations you suggest.  My only points were that it's not within the 'scope' of normal g-code.  The CAM person will be required to provide that information extraneously as specifically-formatted comments, so the post-build processor knows what to look for.

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

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2342
    • View Profile
Re: Auto clearance
« Reply #5 on: July 25, 2020, 17:18:42 pm »
Thank you, Lloyd.
I know that with a PBP one can change many things but was hoping it could be done in the stock CB Post processor.

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8315
    • View Profile
Re: Auto clearance
« Reply #6 on: July 25, 2020, 17:21:14 pm »
Not to my knowledge, Dragonfly.

But I must ask why you'd object to its being done by a PBP?

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

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6073
    • View Profile
    • Cambam V1.0 French Doc
Re: Auto clearance
« Reply #7 on: July 25, 2020, 19:12:48 pm »
Hello

Quote
Is there a way to make the PP place into G-code a calculated value for clearance height. Which will be the sum of general clearance value plus stock surface value.

CamBam PP do not allow to do math, even a simple addition ...

++
David


Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2342
    • View Profile
Re: Auto clearance
« Reply #8 on: July 25, 2020, 19:22:44 pm »
But I must ask why you'd object to its being done by a PBP?

Lloyd
Because it's much faster and simpler to change a couple of values in the MOP itself. Provided I don't forget to do it. :)
The other solution is to set clearance plane always to a higher value than the stock thickness. But with many repetitive moves which lift to clearance it consumes precious machine time.
However, I can live with it, the tools sometimes do not. :)

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8315
    • View Profile
Re: Auto clearance
« Reply #9 on: July 25, 2020, 20:08:08 pm »
How do you figure it's 'faster and simpler' to do by hand?  A PBP does its task automatically at 'build time', and such a pass would only take seconds.

I don't get it.  The PBP could even report if you didn't have the correct header information in the g-code with which to proceed.

????

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