diff --git a/MPCNC.cps b/MPCNC.cps index 4322740..9350777 100644 --- a/MPCNC.cps +++ b/MPCNC.cps @@ -111,7 +111,7 @@ propertyDefinitions = { job0_SelectedFirmware: { title: "Job: CNC Firmware", description: "Dialect of GCode to create", group: 1, - type: "integer", default_mm: 0, default_in: 0, + type: "integer", default_mm: eFirmware.MARLIN, default_in: eFirmware.MARLIN, values: [ { title: eFirmware.prop[eFirmware.MARLIN].name, id: eFirmware.MARLIN }, { title: eFirmware.prop[eFirmware.GRBL].name, id: eFirmware.GRBL }, @@ -129,7 +129,7 @@ propertyDefinitions = { }, job3_CommentLevel: { title: "Job: Comment Level", description: "Controls the comments include", group: 1, - type: "integer", default_mm: 3, default_in: 3, + type: "integer", default_mm: eComment.Info, default_in: eComment.Info, values: [ { title: eComment.prop[eComment.Off].name, id: eComment.Off }, { title: eComment.prop[eComment.Important].name, id: eComment.Important }, @@ -158,7 +158,7 @@ propertyDefinitions = { type: "boolean", default_mm: true, default_in: true }, job9_GoOriginOnFinish: { - title: "Job: At end go to 0,0", description: "Go to X0 Y0 at gcode end, Z unchanged", group: 1, + title: "Job: At end go to 0,0", description: "Go to X0 Y0 at gcode end, Z remains unchanged", group: 1, type: "boolean", default_mm: true, default_in: true }, @@ -187,7 +187,7 @@ propertyDefinitions = { type: "spatial", default_mm: 180, default_in: 7.08 }, frD_MaxCutSpeedXYZ: { - title: "Feed: Max Toolpath Speed", description: "Maximum scaled feedrate (mm/min; in/min)", group: 2, + title: "Feed: Max Toolpath Speed", description: "Maximum scaled feedrate for toolpath (mm/min; in/min)", group: 2, type: "spatial", default_mm: 1000, default_in: 39.37 }, @@ -205,7 +205,7 @@ propertyDefinitions = { }, mapG_AllowRapidZ: { title: "Map: Allow Rapid Z", description: "Enable to include vertical retracts and safe descents", group: 3, - type: "boolean", default_mm: true, default_in: true + type: "boolean", default_mm: false, default_in: false }, toolChange0_Enabled: { @@ -234,7 +234,7 @@ propertyDefinitions = { type: "boolean", default_mm: false, default_in: false }, probe2_OnToolChange: { - title: "Probe: Afterward Tool Change", description: "After tool change, probe Z at the current location", group: 5, + title: "Probe: After Tool Change", description: "After tool change, probe Z at the current location", group: 5, type: "boolean", default_mm: false, default_in: false }, probe3_Thickness: { @@ -246,11 +246,11 @@ propertyDefinitions = { type: "boolean", default_mm: true, default_in: true }, probe5_G38Target: { - title: "Probe: G38 target", description: "Probing's furthest Z position", group: 5, + title: "Probe: G38 target", description: "G38 Probing's furthest Z position", group: 5, type: "spatial", default_mm: -10, default_in: -0.5 }, probe6_G38Speed: { - title: "Probe: G38 speed", description: "Probing's speed (mm/min; in/min)", group: 5, + title: "Probe: G38 speed", description: "G38 Probing's speed (mm/min; in/min)", group: 5, type: "spatial", default_mm: 30, default_in: 1.2 }, @@ -267,7 +267,7 @@ propertyDefinitions = { type: "number", default_mm: 40, default_in: 40 }, cutterMarlinMode: { - title: "Laser: Marlin/Reprap mode", description: "Marlin/Reprap mode of the laser/plasma cutter", group: 6, + title: "Laser: Marlin/Reprap Mode", description: "Marlin/Reprap mode of the laser/plasma cutter", group: 6, type: "integer", default_mm: 106, default_in: 106, values: [ { title: "Fan - M106 S{PWM}/M107", id: 106 }, @@ -276,11 +276,11 @@ propertyDefinitions = { ] }, cutterMarlinPin: { - title: "Laser: Marlin M42 pin", description: "Marlin custom pin number for the laser/plasma cutter", group: 6, + title: "Laser: Marlin M42 Pin", description: "Marlin custom pin number for the laser/plasma cutter", group: 6, type: "integer", default_mm: 4, default_in: 4 }, cutterGrblMode: { - title: "Laser: GRBL mode", description: "GRBL mode of the laser/plasma cutter", group: 6, + title: "Laser: GRBL Mode", description: "GRBL mode of the laser/plasma cutter", group: 6, type: "integer", default_mm: 4, default_in: 4, values: [ { title: "M4 S{PWM}/M5 dynamic power", id: 4 }, diff --git a/README.md b/README.md index 764028e..4a85d42 100644 --- a/README.md +++ b/README.md @@ -13,26 +13,22 @@ Supported firmwares: - RepRap firmware (Duet3d) Installation: -- The post processor has three .cps files. -- Each .csp file is considered by F360 to be a seperate Post Processor. -- Currently each .cps file depends on DIYCNC_common.js. -- Can not use F360 Manage->Post Library menu to install the post processor -as the DIYCNC_common.js will not be installed. -- Instead copy the .cps file and DIYCNC_common.js -to the F360 install director or use the ... to select to the post processor's directory when -running the post processor. +- The post processor consists of a single file, mpcnc.cps. +- It can be simply installed by selecting Manage->Post Library from the Fusion 360 menubar; alternatively the mpcnc.cps can be copied into a directory and selecting each time prior to a post operation. If there is an existing mpcnc.cps installed select it prior to installing and use the trash can icon to delete it +- The desired post processor can be selected during a post using the Setup button and selecting Use Personal Post Library +- Use the Job: CNC Firmware property to select between Marlin 2.x, Grbl 1.1 and RepRap firmware Some design points: - Setup operation types: Milling, Water/Laser/Plasma - Support mm and Inches units (**but all properties MUST be set in MM**) -- Rapids movements use seperate G0 moves, first to move in Z and then to move in XY. Moves use independent travel speeds for XY and Z. +- Rapids movements use two G0 moves. The first moves Z and the second moves XY. Moves are seperate to allow retraction from the work surface prior to horizontal travel. Moves use independent travel speeds for Z and XY. - 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](https://github.com/gnea/grbl/wiki/Grbl-v1.1-Laser-Mode)**) +- Support GRBL laser mode (**note: you probably have to enabled laser mode [$32=1](https://github.com/gnea/grbl/wiki/Grbl-v1.1-Laser-Mode)**) ![screenshot](/screenshot.jpg "screenshot") @@ -43,19 +39,16 @@ Use these properties to control overall aspects of the job. |Title|Description|Default| |---|---|---| -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"**| -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: 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: Separate words|Specifies that the words should be separated with a white space.|**true**| -Job: Line increment|Increment for sequence numbers.|**1**| -Job: Line start|First sequence number.|**10**| -Job: Line numbers|Show sequence numbers.|**false**| -Job: Reset on start (G92)|Set origin when gcode start (G92 X0 Y0 Z0). Only apply if not using -GcodeStartFile.|**true**| +Job: CNC Firmware|Dialect of GCode to create|**Marlin 2.x**| +Job: Job: Zero Starting Location (G92)|On start set the current location as 0,0,0 (G92).|**true**| +Job: Manual Spindle On/Off|Enable to manually turn spindle motor on/off. Post processor will issue additional pauses for TURN ON/TURN OFF the motor.|**true**| +Job: Comment Level|Controls a increasing level of comments to be included: Off, Important, Info, Debug|**Info**| Job: Use Arcs|Use G2/G3 g-codes for circular movements.|**true**| -Job: Firmware|Target firmware (marlin 2.0 or Repetir 1.0.3 / GRBL 1.1) / RepRap Firmware.|**Marlin**| +Job: Enable Line #s|Show sequence numbers.|**false**| +Job: First Line #|First sequence number.|**1**| +Job: Line # Increment|Sequence number increment.|**10**| +Job: Include Whitespace|Includes whitespace seperation between text.|**true**| +Job: At end go to 0,0|Go to X0 Y0 at gcode end, Z remains unchanged.|**true**| ## Group 2: Travel Speed and Feedrate Scaling Properties Use these properties to set the speed used for G0 Rapids and to scale the feedrate used @@ -63,77 +56,76 @@ for G1 cuts. [Feed: Travel Speed X/Y] and [Feed: Travel Speed Z] are always used for G0 Rapids. -Scaling of the G1 cut feedrates will only occur if [Feed:Scaled feedrate] is true. +Scaling of the G1 cut feedrates will only occur if [Feed:Scaled Feedrate] is true. Scaling ensures that no G1 cut exceeds the speed capablities of the X, Y, or Z axes. The cut's toolpath feedrate is projected onto the X, Y and Z axes. In turn each axis is tested to see if its cut speed is within the limits of that axis. If not, then all axes feedrates are scaled proportionatly to bring it within limits. This is repeated for all axes. The three axis feedrates are then merged to create a new toolpath feedrate which is then limited to ensure it -doesn't exceed [Feed: Max toolpath speed]. +doesn't exceed [Feed: Max Toolpath Speed]. Note: Because scaling considered 3 dimensional movement a resulting toolpath's feedrate may be greater then one or all of the X, Y or Z limits. For example, a small movement in Z compared to a much larger movement in XY may result in a feedrate that appears to exceed the capability of -Z but in reality since Z is move a much smaller distance for the same time period its actual feedrate is within the established limits. +Z but in reality since Z is moving a much smaller distance for the same time period its actual +feedrate is within the established limits. |Title|Description|Default| |---|---|---| Feed: Travel Speed X/Y|High speed for travel movements X & Y (mm/min).|**2500 mm/min**| Feed: Travel Speed Z|High speed for travel movements Z (mm/min).|**300 mm/min**| -Feed: Scaled feedrate|Scale cut feedrates to respect XY and Z max cut speeds.|**false**| -Feed: Max cut speed X or Y|Maximum cut speed along the X or Y axes (mm/min).|**900 mm/min**| -Feed: Max cut speed Z|Maximum cut speed along the Z axis (mm/min).|**180 mm/min**| -Feed: Max toolpath speed|Maximum cut speed along the toolpath (mm/min).|**1000 mm/min**| - - - +Feed: Enforce Feedrate|Forces the Fxxx to be include even if hasn't changed, useful for Marlin.|**true**| +Feed: Scaled Feedrate|Scale feedrate based on X, Y, Z axis maximums.|**false**| +Feed: Max Cut Speed X or Y|Maximum X or Y axis cut speed (mm/min).|**900 mm/min**| +Feed: Max Cut Speed Z|Maximum Z axis cut speed (mm/min).|**180 mm/min**| +Feed: Max Toolpath Speed|Maximum scaled feedrate for toolpath (mm/min).|**1000 mm/min**| ## Group 3: Map G1->G0 Properties -Performs three actions by allowing G1 cuts to be mapped to G0 Rapid movements. +Allows G1 cuts to be converted to G0 Rapid movements in specific cases: -1. If [Map: First G1 -> G0 Rapids] is true the post processor resolves the loss of the +If [Map: First G1 -> G0 Rapid] is true the post processor resolves the lost initial positioning movement at the beginning of a cut toolpath. This problem is often identified in forums as the tool being initially dragged across the work surface. -2. If [Map: G1 -> G0] is true then allows G1 XY cut movements (i.e. no change in Z) that occur -at a height greater or equal to [Map: Safe Z for Rapids] to be converted to G0 Rapids. +If [Map: G1s -> G0s] is true then allows G1 XY cut movements (i.e. no change in Z) that occur +at a height greater or equal to [Map: Safe Z to Rapid] to be converted to G0 Rapids. Note: this assumes that the top of material is 0 in F360 and that any Z above -[Map: Safe Z for Rapids] is a movement in the air. If top of material is not 0, then adjust -[Map: Safe Z for Rapids] appropriately. +[Map: Safe Z to Rapid] is a movement in the air and clear of obstacles. If top of material is not 0 +or there are holddown clamp then adjust [Map: Safe Z to Rapid] appropriately. -3. If [Map: Allow Rapid Z] is true then includes G1 Z cut movements that either move straight up -and end above [Map: Safe Z for Rapids], or straight down with the start and end positions both -above [Map: Safe Z for Rapids]. Only occurs if [Map: G1 -> G0] is also true. +If [Map: Allow Rapid Z] is true then G1 Z cut movements that either move straight up +and end above [Map: Safe Z to Rapid], or straight down with the start and end positions both +above [Map: Safe Z to Rapid] are included. Only occurs if [Map: G1s -> G0s] is also true. |Title|Description|Default| |---|---|---| -Map: First G1 -> G0 Rapids|Convert first G1 of a cut to G0 Rapid|**false**| -Map: G1 -> G0|Allow G1 cuts to be converted to Rapid G0 moves when safe and appropriate.|**false**| +Map: First G1 -> G0 Rapid|Converts the first G1 of a cut to G0 Rapid|**false**| +Map: G1s -> G0s|Allow G1 cuts to be converted to Rapid G0 moves when safe and appropriate.|**false**| Map: Safe Z for Rapids|A G1 cut's Z must be >= to this to be mapped to a Rapid G0.|**10**| -Map: Allow Rapid Z|Include vertical cut if they are safe.|**true**| +Map: Allow Rapid Z|Include vertical cut if they are safe.|**false**| ## Group 4: Tool change Properties |Title|Description|Default| |---|---|---| -Change: Disable Z stepper|Disable Z stepper when change a tool|**false**| -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**| +Tool Change: Enable|Include tool change code when tool changes (bultin tool change requires LCD display|**false**| +Tool Change: X|X position for builtin tool change|**0**| +Tool Change: Y|Y position for builtin tool change|**0**| +Tool Change: Z|Z position for builtin tool change|**40**| +Tool Change: Disable Z stepper|Disable Z stepper after reaching tool change location|**false**| ## Group 5: Z Probe Properties |Title|Description|Default| |---|---|---| -Probe: On job start|Execute probe gcode on job start|**true**| +Probe: On job start|Execute probe gcode on job start|**false**| +Probe: After Tool Change|Z probe after tool change|**false**| 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**| +Probe: Use Home Z (G28)|Probe with G28 (Yes) or G38 (No)|**true**| +Probe: G38 target|G38 Probing's furthest Z position|**-10**| +Probe: G38 speed|G38 Probing's speed|**30**| ## Group 6: Laser/Plasma Properties @@ -142,24 +134,11 @@ Probe: G38 speed|Probing with speed|**30**| 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;| - -## Group 7: Coolant Control Pin Properties - -|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| +Laser: Marlin/Reprap Mode|Marlin/Reprap mode of the laser/plasma cutter|**Fan - M106 S{PWM}/M107**|"Fan - M106 S{PWM}/M107", "Spindle - M3 O{PWM}/M5", "Pin - M42 P{pin} S{PWM}"| +Laser: Marlin M42 Pin|Marlin custom pin number for the laser/plasma cutter|**4**|| +Laser: GRBL Mode|GRBL mode of the laser/plasma cutter|**M4 S{PWM}/M5 dynamic power**|"M4 S{PWM}/M5 dynamic power", "M3 S{PWM}/M5 static power"| -## Group 8: Override Behaviour by External File Properties +## Group 7: Override Behaviour by External File Properties |Title|Description|Default| |---|---|---| @@ -168,547 +147,37 @@ 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)|| -## Group 9: Write Comments Properties - -|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| +## Group 7: Coolant Control Pin Properties +Coolant has two channels, A and B. Each channel can be configured to be off or set to 1 of the 8 coolant modes that Fusion 360 allows on operation. If a tool's collant requirements match a channel's setting then that channel is enabled, Channel A has priority. Setting both channels' mode to off disables coolant but will produce a warning if a tool askes +for coolant. -# Sample of issued code blocks +If a channel becomes Enabled by matching the coolant requested by the tool then the channel is physically enabled by the post processor by including the text associated with the corresponding property [Coolant \ Enable]. Note, Marlin and Grbl values are included as options, you must select based on your actual configuration. The firmware selected in property [Job: CNC Firmware] will not override your selection. -## Gcode of milling with manually control spindel +If a channel needs to be Disabled because it no longer matchs the coolant requested then the channel is physically disabled by the post processor by including the text associated with the corresponding property [Coolant \ Disable]. Note, Marlin and Grbl values are included as options, you must select based on your actual configuration. The firmware selected in the propery [Job: CNC Firmware] will not override your selection. -```G-code -;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 *** -G90 -G21 -M84 S0 -G92 X0 Y0 Z0 -; COMMAND_TOOL_MEASURE -; --- PROBE TOOL begin --- -M0 Attach ZProbe -G28 Z -G92 Z0.8 -G0 Z50 F300 -M0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -M0 Turn ON spindle -; COMMAND_COOLANT_ON -M117 2D Contour1 -G0 Z15 -G0 X49.412 Y26 F2500 -G0 Z5 F300 -; MOVEMENT_PLUNGE -G1 Z1 F100 -G1 Z-1 -; 14 -G1 Y49.412 F300 -G1 X2.588 -G1 Y2.588 -G1 X49.412 -G1 Y26 -; MOVEMENT_RAPID -G0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -; COMMAND_COOLANT_ON -M117 2D Contour2 -G0 Z15 F300 -G0 X42.412 Y26 F2500 -G0 Z5 F300 -; MOVEMENT_PLUNGE -G1 Z1 F100 -G1 Z-1 -; 14 -G1 Y42.412 F300 -G1 X9.587 -G1 Y9.587 -G1 X42.412 -G1 Y26 -; MOVEMENT_RAPID -G0 Z15 -; *** SECTION end *** - -; *** SECTION begin *** -; --- CHANGE TOOL begin --- -; COMMAND_COOLANT_OFF -M400 -M300 S400 P2000 -G0 Z50 F300 -G0 X0 Y0 F2500 -; COMMAND_STOP_SPINDLE -M0 Turn OFF spindle -M0 Put tool 2 - 1.5mm -; COMMAND_TOOL_MEASURE -; --- PROBE TOOL begin --- -M0 Attach ZProbe -G28 Z -G92 Z0.8 -G0 Z50 F300 -M0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -M0 Turn ON spindle -; COMMAND_COOLANT_ON -M117 Trace1 -G0 Z15 -G0 X36 Y36 F2500 -G0 Z4 F300 -; MOVEMENT_LEAD_IN -G1 Z-1 F300 -; MOVEMENT_CUTTING -G1 Y16 -G1 X16 -G1 Y36 -G1 X36 -; MOVEMENT_LEAD_OUT -G1 Z4 -; MOVEMENT_RAPID -G0 Z15 -; *** SECTION end *** - -; *** STOP begin *** -M400 -; COMMAND_COOLANT_OFF -; COMMAND_STOP_SPINDLE -M0 Turn OFF spindle -G0 X0 Y0 F2500 -M117 Job end -; *** STOP end *** -``` - -## Gcode of milling with spindel controlled by M3/M4/M5 +|Title|Description|Default|Values| +|---|---|---|---| +Coolant: A Mode|Enable channel A when tool is set this coolant|**off**|off, flood, mist, throughTool, air, airThroughTool, suction, floodMist, floodThroughTool| +Coolant: B Mode|Enable channel B when tool is set this coolant|**off**|off, flood, mist, throughTool, air, airThroughTool, suction, floodMist, floodThroughTool| +Coolant: A Enable|GCode to turn On coolant channel A|**Mrln: M42 P6 S255**|"Mrln: M42 P6 S255", , Mrln: M42 P11 S255", "Grbl: M7 (mist)", "Grbl: M8 (flood)"| +Coolant: A Disable Off command|GCode to turn Off coolant channel A|**Mrln: M42 P6 S0**|"Mrln: M42 P6 S0", "Mrln: M42 P11 S0", "Grbl: M9 (off)"| +Coolant: B Enable|GCode to turn On coolant channel B|**Mrln: M42 P11 S255**|"Mrln: M42 P11 S255", "Mrln: M42 P6 S255", "Grbl: M7 (mist)", "Grbl: M8 (flood)"| +Coolant: B Disable Off command|GCode to turn Off coolant channel B|**Mrln: M42 P11 S0**|"Mrln: M42 P11 S0", "Mrln: M42 P6 S0", "Grbl: M9 (off)"| -```G-code -;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 *** -G90 -G21 -M84 S0 -G92 X0 Y0 Z0 -; COMMAND_TOOL_MEASURE -; --- PROBE TOOL begin --- -M0 Attach ZProbe -G28 Z -G92 Z0.8 -G0 Z50 F300 -M0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -; >>> Spindle Speed 21000 -M3 S21000 -; COMMAND_COOLANT_ON -M117 2D Contour1 -G0 Z15 -G0 X49.412 Y26 F2500 -G0 Z5 F300 -; MOVEMENT_PLUNGE -G1 Z1 F100 -G1 Z-1 -; 14 -G1 Y49.412 F300 -G1 X2.588 -G1 Y2.588 -G1 X49.412 -G1 Y26 -; MOVEMENT_RAPID -G0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -; >>> Spindle Speed 20000 -M3 S20000 -; COMMAND_COOLANT_ON -M117 2D Contour2 -G0 Z15 F300 -G0 X42.412 Y26 F2500 -G0 Z5 F300 -; MOVEMENT_PLUNGE -G1 Z1 F100 -G1 Z-1 -; 14 -G1 Y42.412 F300 -G1 X9.587 -G1 Y9.587 -G1 X42.412 -G1 Y26 -; MOVEMENT_RAPID -G0 Z15 -; *** SECTION end *** - -; *** SECTION begin *** -; --- CHANGE TOOL begin --- -; COMMAND_COOLANT_OFF -M400 -M300 S400 P2000 -G0 Z50 F300 -G0 X0 Y0 F2500 -; COMMAND_STOP_SPINDLE -M5 -M0 Put tool 2 - 1.5mm -; COMMAND_TOOL_MEASURE -; --- PROBE TOOL begin --- -M0 Attach ZProbe -G28 Z -G92 Z0.8 -G0 Z50 F300 -M0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -; >>> Spindle Speed 21000 -M3 S21000 -; COMMAND_COOLANT_ON -M117 Trace1 -G0 Z15 -G0 X36 Y36 F2500 -G0 Z4 F300 -; MOVEMENT_LEAD_IN -G1 Z-1 F300 -; MOVEMENT_CUTTING -G1 Y16 -G1 X16 -G1 Y36 -G1 X36 -; MOVEMENT_LEAD_OUT -G1 Z4 -; MOVEMENT_RAPID -G0 Z15 -; *** SECTION end *** - -; *** STOP begin *** -M400 -; COMMAND_COOLANT_OFF -; COMMAND_STOP_SPINDLE -M5 -G0 X0 Y0 F2500 -M117 Job end -; *** STOP end *** -``` +## Group 9: Duet Properties -## Gcode of milling with spindel controlled by M3/M4/M5 with using Coolants (both A and B channels) +|Title|Description|Default| +|---|---|---| +Duet: Milling mode|GCode command to setup Duet3d milling mode|**M453 P2 I0 R30000 F200**| +Duet: Laser mode|GCode command to setup Duet3d laser mode|**M452 P2 I0 R255 F200**| -```G-code -;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 *** -G90 -G21 -M84 S0 -G92 X0 Y0 Z0 -; COMMAND_TOOL_MEASURE -; --- PROBE TOOL begin --- -M0 Attach ZProbe -G28 Z -G92 Z0.8 -G0 Z50 F300 -M0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -; >>> Spindle Speed 21000 -M3 S21000 -; COMMAND_COOLANT_ON -; >>> Coolant A ON -M42 P11 S255 -M117 2D Contour1 -G0 Z15 -G0 X49.412 Y26 F2500 -G0 Z5 F300 -; MOVEMENT_PLUNGE -G1 Z1 F100 -G1 Z-1 -; 14 -G1 Y49.412 F300 -G1 X2.588 -G1 Y2.588 -G1 X49.412 -G1 Y26 -; MOVEMENT_RAPID -G0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -; >>> Spindle Speed 20000 -M3 S20000 -; COMMAND_COOLANT_ON -; >>> Coolant A OFF -M42 P11 S0 -; >>> Coolant B ON -M42 P6 S255 -M117 2D Contour2 -G0 Z15 F300 -G0 X42.412 Y26 F2500 -G0 Z5 F300 -; MOVEMENT_PLUNGE -G1 Z1 F100 -G1 Z-1 -; 14 -G1 Y42.412 F300 -G1 X9.587 -G1 Y9.587 -G1 X42.412 -G1 Y26 -; MOVEMENT_RAPID -G0 Z15 -; *** SECTION end *** - -; *** SECTION begin *** -; --- CHANGE TOOL begin --- -M400 -G0 Z50 F300 -G0 X0 Y0 F2500 -; COMMAND_COOLANT_OFF -; >>> Coolant B OFF -M42 P6 S0 -; COMMAND_STOP_SPINDLE -M5 -M300 S400 P2000 -M0 Put tool 2 - 1.5mm -; COMMAND_TOOL_MEASURE -; --- PROBE TOOL begin --- -M0 Attach ZProbe -G28 Z -G92 Z0.8 -G0 Z50 F300 -M0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_CLOCKWISE -; >>> Spindle Speed 21000 -M3 S21000 -; COMMAND_COOLANT_ON -M117 Trace1 -G0 Z15 -G0 X36 Y36 F2500 -G0 Z4 F300 -; MOVEMENT_LEAD_IN -G1 Z-1 F300 -; MOVEMENT_CUTTING -G1 Y16 -G1 X16 -G1 Y36 -G1 X36 -; MOVEMENT_LEAD_OUT -G1 Z4 -; MOVEMENT_RAPID -G0 Z15 -; *** SECTION end *** - -; *** STOP begin *** -M400 -; COMMAND_COOLANT_OFF -; COMMAND_STOP_SPINDLE -M5 -G0 X0 Y0 F2500 -M117 Job end -; *** STOP end *** -``` +# Sample of issued code blocks -## Gcode of laser cutting +## Gcode of milling with manually control spindel ```G-code -;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 *** -G90 -G21 -M84 S0 -G92 X0 Y0 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: 15 -M400 -; COMMAND_START_SPINDLE -; COMMAND_SPINDLE_COUNTERCLOCKWISE -; COMMAND_COOLANT_ON -M117 2D Profile1 -G0 Z15 F300 -G0 X-9.94 Y-10.5 F2500 -G0 Z0 F300 -; >>> LASER Power ON -M106 S200 -; COMMAND_POWER_ON -; MOVEMENT_LEAD_IN -G1 Y-10 F1000 -G1 X-9.95 -; MOVEMENT_CUTTING -G1 X-10 -G1 Y10 -G1 X10 -G1 Y-10 -G1 X-9.95 -; MOVEMENT_LEAD_OUT -G1 X-9.96 -G1 Y-10.5 -; >>> LASER Power OFF -M107 -; COMMAND_POWER_OFF -; MOVEMENT_RAPID -G0 Z5 F300 -G0 X-9.99 Y-25.5 F2500 -G0 Z0 F300 -; >>> LASER Power ON -M106 S200 -; COMMAND_POWER_ON -; MOVEMENT_LEAD_IN -G1 Y-25 F1000 -G1 X-10 -; MOVEMENT_CUTTING -G1 X-25 -G1 Y25 -G1 X25 -G1 Y-25 -G1 X-10 -; MOVEMENT_LEAD_OUT -G1 X-10.01 -G1 Y-25.5 -; >>> LASER Power OFF -M107 -; COMMAND_POWER_OFF -; MOVEMENT_RAPID -G0 Z15 F300 -; *** SECTION end *** - -; *** STOP begin *** -M400 -; COMMAND_COOLANT_OFF -; COMMAND_STOP_SPINDLE -G0 X0 Y0 F2500 -M117 Job end -; *** STOP end *** +To be updated ``` # Resorces