Author Topic: USB-CNC Post Processor  (Read 934 times)

Offline frank_

  • Ewok
  • *
  • Posts: 1
    • View Profile
USB-CNC Post Processor
« on: January 24, 2020, 14:14:23 pm »

Hi there,
we have a usb-cnc interface and use the default cam-bam postprocessor. This also works very well, but we to change something and do not know how we can implement it:

after a tool change, the milling machine first moves to the maximum height. then to the set safety height ($ clearance) then moves to the start x and y coordinates of the milling, and then the actual milling begins. but what we would like to have is the following: the milling machine should first move to the x and y coordinates, while maintaining the maximum z height and then lowering to the safety height, and milling will begin.

We tried to change the part in the postprocessor and after the tool change inserted a G0 X {$ mop.first.x} Y {$ mop.first.y} as the first line and then {$ clearance} as the second line. As a result, after a tool change, the milling machine moves to the first y-coordinate at which it should also start milling, but unfortunately to the second x-coordinate in the g-code. Did we make a mistake here?
Is there any other way to solve the problem?

best regards

Offline pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1778
    • View Profile
    • pixelmaker
Re: USB-CNC Post Processor
« Reply #1 on: January 24, 2020, 22:13:27 pm »
after a tool change,
Cambam only writes the code for the tool change into the NC file. But then a macro in USB-CNC takes over. The tool change is done completely by USB-CNC. CamBam then delivers the first coordinate of the further machining.
In the tool change macro of USB-CNC you can find out how this Z-movement at maximum height is achieved. Either it is located there at the end or another macro is triggered "after tool change".


Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1370
    • View Profile
Re: USB-CNC Post Processor
« Reply #2 on: January 25, 2020, 02:41:38 am »
Every CNC machine I have run does it the way you describe. During that move to the Safe Z is when tool length compensation gets applied so if you accidently put in a long tool or forget to set tool length you'll have no chance to catch it before you damage your part. In many instances like if you paused a program, rewind and restart the Save Z move is upwards as expected.  I think you are trying to use the tool change Z position to get around clamps and such and that really not what is intended so you should proceed with caution.
Gary H. Lucas

Have you read my blog?