Sunday, December 9, 2012

Installing and using a CamBam post processor

Post processors are used to automate the creation of specialized gcode. In the case of a laser cutter, if you are using standard cam programs, their output is traditionally for a spindle type cutting tool. This means we need to make a few changes to how rapids and other features are treated. In a typical mill, when the tool wants to move to an X,Y point without cutting (a rapid) it typically raises up the Z moves to X,Y and lowers to cut. During the entire move the spindle stays on. In the case of a laser we need to turn off the laser, move, and then turn it on again. Our post processor makes these changes so the gcode comes out correctly for our application.



Installing the post processor

Download and install Cambam. Go to the downloads page and download the laser post processor for CamBam.
Click "Download This File"

To install the post processor in the correct location you will need to setup your folders to see hidden folders. Copy laser.cbpp to C:\Documents and Settings\All Users\Application Data\CamBam plus 0.9.8\post.


Using the laser post processor

Open CamBam. Click File, Open to open a DXF or use CamBam to create your paths.

CamBam main screen
Select Machining in the folder structure under the drawing tab.

Select post processor

Scroll down until you see the post processor options. Click on the post processor drop down menu and find the laser post processor.

Now we need to tell CamBam how we want to cut our shape. Because we want to cut on the path we have created I usually choose engrave. Click Edit, Select all, then press the engrave button.

Select engrave


At this point you can define feedrates and tool diameter (cut width) based on the material you are cutting and its thickness.

We are now ready to get our gcode. Click the Machining drop down menu (at top) and click Produce gcode. You will be prompted to save the file. Save then open the gcode file in Mach3. You are ready to cut.

Note: If you are using the evaluation version of both CamBam and Mach3 you will be limited to 500 lines of gcode. If your cut is longer you can always split it up into multiple jobs. I got tired of doing this and just broke down and bought the full version.

I hope this helps and saves everyone a lot of time. I know it has made cutting so much more faster. If you don't use Cambam and want a post processor written for a different Cam program message me or leave a comment and I'll look at what it takes.

5 comments:

  1. How did you handle the laser on and off commands?

    I though that these simple rules helped me greatly as a newbie.

    Cambam provided the GCode Z0.5 and Z3.0 commands for the router to drop and lift in the engrave option. I found it useful to replacing the following codes using the Replace All in the editor.

    Laser off
    Change "G0 Z3.0" to "E1P0"

    Laser on
    Change "G0 Z0.5" to "E1P1"

    Remove the spindle speed command "S1000". For some reason, the laser would pause for a second over the target when this is left in the code. These are at the start of each engrave section.

    I removed the "Z-0.4"s from the code although I am not sure if this matters.

    I separated the inside cuts from the outer perimeter cuts by having multiple engraving sections in the correct sequence.

    The MOSHI product family failed me 2 days out of the box. This blog has made a big difference. Now to check out EMC2

    ReplyDelete
  2. I used the M11P1 (ON) and M10P1 (off) commands. These control output#1. When you use this command it isn't tied to all the spindle delay times. One other added benefit is that this command doesn't execute until the following line of code. This is perfect since you really don't want to turn your laser on and wait until your move command starts to execute. You can do a kind of hybrid where you turn on your laser with M11P1 and turn it off with a standard M5 (which unlike the M10P1 happens on that command not the next)

    ReplyDelete
  3. Chris this fixed my problem of turning the laser on during a rapid move but I still have the problem that the laser does not shut off after the burn.

    ReplyDelete
    Replies
    1. I think I found the problem Chris, Thank you for the info, you have a great site.

      Delete