This is modified fork of https://github.com/martindb/mpcnc_posts_processor
CAM posts processor for use with Fusion 360 and MPCNC with RAMPS or any 3-axis DIY CNC. Supported firmwares:
- Marlin 2.0
- Repetier firmware 1.0.3 (not tested. gcode is same as for Marlin)
- GRBL 1.1
- RepRap firmware (Duet3d)
Some design points:
- Setup operation types: Milling, Water/Laser/Plasma
- Support MM and Inches units (but all properties MUST be set in MM)
- XY and Z independent travel speeds. Rapids are done with G0.
- Arcs support on XY plane (Marlin/Repetier/RepRap) or all panes (Grbl)
- Tested with LCD display and SD card (built in tool change require printing from SD and LCD to restart)
- Support for 3 different laser power using "cutting modes" (through, etch, vaporize)
- Support 2 coolant channels. You may attach relays to control external devices - as example air jet valve.
- Customizable level of verbosity of comments
- Support line numbers
- Support GRBL laser mode (be noted that you probably to have enabled laser mode $32=1)
| Title | Description | Default |
|---|---|---|
| Job: Firmware | Target firmware (marlin 2.0 or Repetir 1.0.3 / GRBL 1.1) / RepRap Firmware. | Marlin |
| Job: Travel Speed XY | High speed for travel movements X & Y (mm/min). | 2500 mm/min |
| Job: Travel Speed Z | High speed for travel movements Z (mm/min). | 300 mm/min |
| Job: Marlin: Manual Spindle On/Off | Set it to true when the motor of your spindle is controlled by manual switch. So the preprocessor will issue additional pauses for TURN ON/TURN OFF the motor. | true |
| Job: Marlin: Enforce feedrate | Add feedrate to each movement g-code. | false |
| Job: Use Arcs | Use G2/G3 g-codes fo circular movements. | true |
| Job: Reset on start (G92) | Set origin when gcode start (G92 X0 Y0 Z0). Only apply if not using gcodeStartFile. | true |
| Job: Goto 0 at end | Go X0 Y0 at gcode end. Useful to find if your machine loss steeps or have any other mechanic issue (like loose pulleys). Also useful for repetitive jobs. Only apply if not using gcodeStopFile. | true |
| Job: Use Arcs | Use G2/G3 g-codes fo circular movements. | true |
| Job: Line numbers | Show sequence numbers. | false |
| Job: Line start | First sequence number. | 10 |
| Job: Line increment | Increment for sequence numbers. | 1 |
| Job: Separate words | Specifies that the words should be separated with a white space. | true |
| Job: Duet: Milling Mode | GCode command to setup Duet3d milling mode. | "M453 P2 I0 R30000 F200" |
| Job: Duet: Laser Mode | GCode command to setup Duet3d laser mode. | "M452 P2 I0 R255 F200" |
| Title | Description | Default |
|---|---|---|
| Change: Enabled | Enable tool change code (bultin tool change requires LCD display) | true |
| Change: X | X position for builtin tool change | 0 |
| Change: Y | Y position for builtin tool change | 0 |
| Change: Z | Z position for builtin tool change | 40 |
| Change: Make Z Probe | Z probe after tool change | true |
| Change: Disable Z stepper | Disable Z stepper when change a tool | false |
| Title | Description | Default |
|---|---|---|
| Probe: On job start | Execute probe gcode on job start | true |
| Probe: Plate thickness | Plate thickness | 0.8 |
| Probe: Use Home Z | Use G28 or G38 for probing | true |
| Probe: G38 target | Probing up to Z position | -10 |
| Probe: G38 speed | Probing with speed | 30 |
| Title | Description | Default | Values |
|---|---|---|---|
| Laser: On - Vaporize | Persent of power to turn on the laser/plasma cutter in vaporize mode | 100 | |
| Laser: On - Through | Persent of power to turn on the laser/plasma cutter in through mode | 80 | |
| Laser: On - Etch | Persent of power to turn on the laser/plasma cutter in etch mode | 40 | |
| Laser: Marlin mode | Marlin mode of the laser/plasma cutter () | M106 | M106 S{PWM}/M107 = 0; M3 O{PWM}/M5 = 1; M42 P{pin} S{PWM} = 2; |
| Laser: Marlin pin | Marlin custom pin number for the laser/plasma cutter | 4 | |
| Laser: GRBL mode | GRBL mode of the laser/plasma cutter | M4 | M4 S{PWM}/M5 dynamic power = 4; M3 S{PWM}/M5 static power = 3; |
| Title | Description | Default |
|---|---|---|
| Extern: Start File | File with custom Gcode for header/start (in nc folder) | |
| Extern: Stop File | File with custom Gcode for footer/end (in nc folder) | |
| Extern: Tool File | File with custom Gcode for tool change (in nc folder) | |
| Extern: Probe File | File with custom Gcode for tool probe (in nc folder) |
| Title | Description | Default | Values |
|---|---|---|---|
| Coolant: A Mode | Enable issuing g-codes for control Coolant channel A | 0 | off=0; flood=1; mist=2; throughTool=3; air=4; airThroughTool=5; suction=6; floodMist=7; floodThroughTool=8 |
| Coolant: A Marlin On command | GCode command to turn on Coolant channel A | M42 P11 S255 | |
| Coolant: A Marlin Off command | Gcode command to turn off Coolant A | M42 P11 S0 | |
| Coolant: A GRBL | GRBL g-codes for control Coolant channel A | M7 | M7 flood = 7; M8 mist = 8 |
| Coolant: B Mode | Enable issuing g-codes for control Coolant channel B | 0 | off=0; flood=1; mist=2; throughTool=3; air=4; airThroughTool=5; suction=6; floodMist=7; floodThroughTool=8 |
| Coolant: B Marlin On command | GCode command to turn on Coolant channel B | M42 P6 S255 | |
| Coolant: B Marlin Off command | Gcode command to turn off Coolant channel B | M42 P6 S0 | |
| Coolant: B GRBL | GRBL g-codes for control Coolant channel B | M8 | M7 flood = 7; M8 mist = 8 |
| Title | Description | Default |
|---|---|---|
| Comment: Write Tools | Write table of used tools in job header | true |
| Comment: Sections | Write header of every section | true |
| Comment: Activities | Write comments which somehow helps to understand current piece of g-code | true |
| Comment: Trace Commands | Write stringified commands called by CAM | true |
| Comment: Trace Movements | Write stringified movements called by CAM | true |
;Fusion 360 CAM 2.0.4860; Posts processor: MPCNC_Mill_Laser.cps; Gcode generated: Sunday, December 2, 2018 1:57:21 PM GMT; Document: cam_testpp v5; Setup: Setup1; ; Ranges table:; X: Min=2.588 Max=36 Size=33.412; Y: Min=2.588 Max=36 Size=33.412; Z: Min=-1 Max=15 Size=16; ; Tools table:; T1 D=3.175 CR=0 - ZMIN=-1 - flat end mill; T2 D=1.5 CR=0 - ZMIN=-1 - flat end mill; *** START begin ***G90G21M84S0G92X0Y0 Z0
; COMMAND_TOOL_MEASURE; --- PROBE TOOL begin ---M0 Attach ZProbe
G28 Z
G92 Z0.8
G0 Z50 F300M0 Detach ZProbe
; --- PROBE TOOL end ---; *** START end ***; *** SECTION begin ***;2D Contour1 - Milling - Tool: 1 - 1/8inch flat end mill; X Min: 2.588 - X Max: 49.412; Y Min: 2.588 - Y Max: 49.412; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISEM0 Turn ON spindle; COMMAND_COOLANT_ONM117 2D Contour1G0 Z15
G0X49.412Y26F2500G0 Z5 F300; MOVEMENT_PLUNGEG1 Z1 F100G1 Z-1
; 14G1Y49.412F300G1X2.588G1Y2.588G1X49.412G1Y26; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** SECTION begin ***;2D Contour2 - Milling - Tool: 1 - 1/8inch flat end mill; X Min: 9.587 - X Max: 42.412; Y Min: 9.587 - Y Max: 42.412; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISE; COMMAND_COOLANT_ONM117 2D Contour2G0 Z15 F300G0X42.412Y26F2500G0 Z5 F300; MOVEMENT_PLUNGEG1 Z1 F100G1 Z-1
; 14G1Y42.412F300G1X9.587G1Y9.587G1X42.412G1Y26; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** SECTION begin ***; --- CHANGE TOOL begin ---; COMMAND_COOLANT_OFFM400M300S400P2000G0 Z50 F300G0X0Y0F2500; COMMAND_STOP_SPINDLEM0 Turn OFF spindleM0 Put tool 2 - 1.5mm
; COMMAND_TOOL_MEASURE; --- PROBE TOOL begin ---M0 Attach ZProbe
G28 Z
G92 Z0.8
G0 Z50 F300M0 Detach ZProbe
; --- PROBE TOOL end ---; --- CHANGE TOOL end ---;Trace1 - Milling - Tool: 2 - 1.5mm flat end mill; X Min: 16 - X Max: 36; Y Min: 16 - Y Max: 36; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISEM0 Turn ON spindle; COMMAND_COOLANT_ONM117 Trace1G0 Z15
G0X36Y36F2500G0 Z4 F300; MOVEMENT_LEAD_ING1 Z-1 F300; MOVEMENT_CUTTINGG1Y16G1X16G1Y36G1X36; MOVEMENT_LEAD_OUTG1 Z4
; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** STOP begin ***M400; COMMAND_COOLANT_OFF; COMMAND_STOP_SPINDLEM0 Turn OFF spindleG0X0Y0F2500M117 Job end; *** STOP end ***;Fusion 360 CAM 2.0.4860; Posts processor: MPCNC_Mill_Laser.cps; Gcode generated: Sunday, December 2, 2018 1:56:26 PM GMT; Document: cam_testpp v5; Setup: Setup1; ; Ranges table:; X: Min=2.588 Max=36 Size=33.412; Y: Min=2.588 Max=36 Size=33.412; Z: Min=-1 Max=15 Size=16; ; Tools table:; T1 D=3.175 CR=0 - ZMIN=-1 - flat end mill; T2 D=1.5 CR=0 - ZMIN=-1 - flat end mill; *** START begin ***G90G21M84S0G92X0Y0 Z0
; COMMAND_TOOL_MEASURE; --- PROBE TOOL begin ---M0 Attach ZProbe
G28 Z
G92 Z0.8
G0 Z50 F300M0 Detach ZProbe
; --- PROBE TOOL end ---; *** START end ***; *** SECTION begin ***;2D Contour1 - Milling - Tool: 1 - 1/8inch flat end mill; X Min: 2.588 - X Max: 49.412; Y Min: 2.588 - Y Max: 49.412; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISE; >>> Spindle Speed 21000M3S21000; COMMAND_COOLANT_ONM117 2D Contour1G0 Z15
G0X49.412Y26F2500G0 Z5 F300; MOVEMENT_PLUNGEG1 Z1 F100G1 Z-1
; 14G1Y49.412F300G1X2.588G1Y2.588G1X49.412G1Y26; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** SECTION begin ***;2D Contour2 - Milling - Tool: 1 - 1/8inch flat end mill; X Min: 9.587 - X Max: 42.412; Y Min: 9.587 - Y Max: 42.412; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISE; >>> Spindle Speed 20000M3S20000; COMMAND_COOLANT_ONM117 2D Contour2G0 Z15 F300G0X42.412Y26F2500G0 Z5 F300; MOVEMENT_PLUNGEG1 Z1 F100G1 Z-1
; 14G1Y42.412F300G1X9.587G1Y9.587G1X42.412G1Y26; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** SECTION begin ***; --- CHANGE TOOL begin ---; COMMAND_COOLANT_OFFM400M300S400P2000G0 Z50 F300G0X0Y0F2500; COMMAND_STOP_SPINDLEM5M0 Put tool 2 - 1.5mm
; COMMAND_TOOL_MEASURE; --- PROBE TOOL begin ---M0 Attach ZProbe
G28 Z
G92 Z0.8
G0 Z50 F300M0 Detach ZProbe
; --- PROBE TOOL end ---; --- CHANGE TOOL end ---;Trace1 - Milling - Tool: 2 - 1.5mm flat end mill; X Min: 16 - X Max: 36; Y Min: 16 - Y Max: 36; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISE; >>> Spindle Speed 21000M3S21000; COMMAND_COOLANT_ONM117 Trace1G0 Z15
G0X36Y36F2500G0 Z4 F300; MOVEMENT_LEAD_ING1 Z-1 F300; MOVEMENT_CUTTINGG1Y16G1X16G1Y36G1X36; MOVEMENT_LEAD_OUTG1 Z4
; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** STOP begin ***M400; COMMAND_COOLANT_OFF; COMMAND_STOP_SPINDLEM5G0X0Y0F2500M117 Job end; *** STOP end ***;Fusion 360 CAM 2.0.4860; Posts processor: MPCNC_Mill_Laser.cps; Gcode generated: Sunday, December 2, 2018 2:06:54 PM GMT; Document: cam_testpp v5; Setup: Setup1; ; Ranges table:; X: Min=2.588 Max=36 Size=33.412; Y: Min=2.588 Max=36 Size=33.412; Z: Min=-1 Max=15 Size=16; ; Tools table:; T1 D=3.175 CR=0 - ZMIN=-1 - flat end mill; T2 D=1.5 CR=0 - ZMIN=-1 - flat end mill; *** START begin ***G90G21M84S0G92X0Y0 Z0
; COMMAND_TOOL_MEASURE; --- PROBE TOOL begin ---M0 Attach ZProbe
G28 Z
G92 Z0.8
G0 Z50 F300M0 Detach ZProbe
; --- PROBE TOOL end ---; *** START end ***; *** SECTION begin ***;2D Contour1 - Milling - Tool: 1 - 1/8inch flat end mill; X Min: 2.588 - X Max: 49.412; Y Min: 2.588 - Y Max: 49.412; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISE; >>> Spindle Speed 21000M3S21000; COMMAND_COOLANT_ON; >>> Coolant A ONM42P11S255M117 2D Contour1G0 Z15
G0X49.412Y26F2500G0 Z5 F300; MOVEMENT_PLUNGEG1 Z1 F100G1 Z-1
; 14G1Y49.412F300G1X2.588G1Y2.588G1X49.412G1Y26; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** SECTION begin ***;2D Contour2 - Milling - Tool: 1 - 1/8inch flat end mill; X Min: 9.587 - X Max: 42.412; Y Min: 9.587 - Y Max: 42.412; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISE; >>> Spindle Speed 20000M3S20000; COMMAND_COOLANT_ON; >>> Coolant A OFFM42P11S0; >>> Coolant B ONM42P6S255M117 2D Contour2G0 Z15 F300G0X42.412Y26F2500G0 Z5 F300; MOVEMENT_PLUNGEG1 Z1 F100G1 Z-1
; 14G1Y42.412F300G1X9.587G1Y9.587G1X42.412G1Y26; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** SECTION begin ***; --- CHANGE TOOL begin ---M400G0 Z50 F300G0X0Y0F2500; COMMAND_COOLANT_OFF; >>> Coolant B OFFM42P6S0; COMMAND_STOP_SPINDLEM5M300S400P2000M0 Put tool 2 - 1.5mm
; COMMAND_TOOL_MEASURE; --- PROBE TOOL begin ---M0 Attach ZProbe
G28 Z
G92 Z0.8
G0 Z50 F300M0 Detach ZProbe
; --- PROBE TOOL end ---; --- CHANGE TOOL end ---;Trace1 - Milling - Tool: 2 - 1.5mm flat end mill; X Min: 16 - X Max: 36; Y Min: 16 - Y Max: 36; Z Min: -1 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_CLOCKWISE; >>> Spindle Speed 21000M3S21000; COMMAND_COOLANT_ONM117 Trace1G0 Z15
G0X36Y36F2500G0 Z4 F300; MOVEMENT_LEAD_ING1 Z-1 F300; MOVEMENT_CUTTINGG1Y16G1X16G1Y36G1X36; MOVEMENT_LEAD_OUTG1 Z4
; MOVEMENT_RAPIDG0 Z15
; *** SECTION end ***; *** STOP begin ***M400; COMMAND_COOLANT_OFF; COMMAND_STOP_SPINDLEM5G0X0Y0F2500M117 Job end; *** STOP end ***;Fusion 360 CAM 2.0.4860; Posts processor: MPCNC_Mill_Laser.cps; Gcode generated: Sunday, December 2, 2018 2:07:32 PM GMT; Document: cam_testpp v5; Setup: Setup2; ; Ranges table:; X: Min=-25 Max=25 Size=50; Y: Min=-25.5 Max=25 Size=50.5; Z: Min=0 Max=15 Size=15; ; Tools table:; T1 D=0 CR=0 - ZMIN=0 - laser cutter; *** START begin ***G90G21M84S0G92X0Y0 Z0
; COMMAND_TOOL_MEASURE; *** START end ***; *** SECTION begin ***;2D Profile1 - Laser/Plasma - Cutting mode: auto; X Min: -25 - X Max: 25; Y Min: -25.5 - Y Max: 25; Z Min: 0 - Z Max: 15M400; COMMAND_START_SPINDLE; COMMAND_SPINDLE_COUNTERCLOCKWISE; COMMAND_COOLANT_ONM117 2D Profile1
G0 Z15 F300G0X-9.94Y-10.5F2500G0 Z0 F300; >>> LASER Power ONM106S200; COMMAND_POWER_ON; MOVEMENT_LEAD_ING1Y-10F1000G1X-9.95; MOVEMENT_CUTTINGG1X-10G1Y10G1X10G1Y-10G1X-9.95; MOVEMENT_LEAD_OUTG1X-9.96G1Y-10.5; >>> LASER Power OFFM107; COMMAND_POWER_OFF; MOVEMENT_RAPIDG0 Z5 F300G0X-9.99Y-25.5F2500G0 Z0 F300; >>> LASER Power ONM106S200; COMMAND_POWER_ON; MOVEMENT_LEAD_ING1Y-25F1000G1X-10; MOVEMENT_CUTTINGG1X-25G1Y25G1X25G1Y-25G1X-10; MOVEMENT_LEAD_OUTG1X-10.01G1Y-25.5; >>> LASER Power OFFM107; COMMAND_POWER_OFF; MOVEMENT_RAPIDG0 Z15 F300; *** SECTION end ***; *** STOP begin ***M400; COMMAND_COOLANT_OFF; COMMAND_STOP_SPINDLEG0X0Y0F2500M117 Job end; *** STOP end ***Post Processor Training Guide (PDF document)
Enhancements to the post processor property definitions
Library of exist post processors
How to set up a 4/5 axis machine configuration
Beginners Guide to Editing Post Processors in Fusion 360! FF121 (Youtube video)
