rrf-mpcnc/config.g

134 lines
3.3 KiB
Text

; # MPCNC
M550 P"MPCNC"
; absolute coordiantes
G90
; relative tool moves
M83
; ## Kinematics/physical configuration
; MPCNC primo has dual-drive X and Y axis
; X Axis: drivers `0.0` and `0.1`
; Y Axis: drivers `0.2` and `0.3`
; Z Axis: driver `0.4`
; Force three cartesian axis
M584 X0.0:0.1 Y0.2:0.3 Z0.4 P3
; physical drive 0.0 goes backwards
; physical drive 0.1 goes backwards
; physical drive 0.2 goes backwards
; physical drive 0.3 goes backwards
; physical drive 0.4 goes backwards
M569 P0.0 S0
M569 P0.1 S0
M569 P0.2 S0
M569 P0.3 S0
M569 P0.4 S0
; configure microstepping with interpolation
M350 X16 Y16 Z16 I1
; set steps per mm
M92 X100.00 Y100.00 Z100.00
; set maximum instantaneous speed changes (mm/min)
M566 X180.00 Y180.00 Z80.00
; set maximum speeds (mm/min)
M203 X1800.00 Y1800.00 Z250.00
; set accelerations (mm/s^2)
M201 X850.00 Y180.00 Z80.00
; set motor currents (mA) and motor idle factor in per cent
; X and Y motors are RB 42SHDC4043Z-22B
; - Current/phase: 1.5A
; - Holding torque: 0.4M.m or 57oz-in.
; Z motor is Leadshine 42CM08
; - Current/phase: 2.5A
; - Holding torque: 0.8N.m or 113oz-in.
M906 X1500 Y1500 Z2500 I30
; Set idle timeout
M84 S30
; ### Axis Limits
; Build is 600x400mm but to shave 10mm off as a safety margin.
M208 X0 Y0 Z0 S1
M208 X590 Y490 Z80 S2
; ### Endstops
; There is an end-stop on each drive axis (ie 4, 2 x X and 2 x Y).
; They are configured as active-low with a pull-up resistor (ie they should
; always be high, which prevents possible failures where the end-stop isn't
; connected anymore).
; Pin mapping:
; - X0 `io0.in`
; - X1 `io1.in`
; - Y0 `in2.in`
; - Y1 `in3.in`
M574 X1 S1 P"^io0.in+^io1.in"
M574 Y1 S1 P"^io2.in+^io3.in"
; ### Z-Probe
; Unlike the end-stops the Z probe is a touch-off plate, so should be
; active-high.
M558 P8 C"!^io4.in" H10 F120 T3000
G31 Z1.5
; ## Fans
; Fan 0 is connected to out4 as a 12V 2-pin PWM fan
; Sensor 0 is the temperature sensor on the Duet3 MCU
; Sensor 1 is the stepper driver temperature sensors
; Turn on the fans when the MCU reaches 40º and on max at 70º
; Also if the stepper drivers report over temp
M950 F0 C"out4"
M308 S0 Y"mcu-temp" A"MCU"
M308 S1 Y"drivers" A"Stepper Drivers"
M106 P0 B2.5 L0 X255 H0:1 T40:70
; ## Tools
; My system uses a simple relay to send mains power to a Makita trim router.
; That relay is connected to `out1`.
; M950 R0 C"nil+out1+nil"
; define tool 0
; M563 P0 R0 S"Router"
; set tool 0 axis offsets
; G10 P0 X0 Y0 Z0
; set initial tool 0 active and standby temperatures to 0C
; G10 P0 R0 S0
; Enable CNC mode
M453
; ## Pin mapping
; define relay for vacuum as pin 0 on out2
M950 P0 C"out2"
; define relay for for power on
M80 C"pson"
M81 C"pson"
; E-stop button active-low io6 with pull-up
M950 J0 C"!^io6.in"
; Trigger E-stop on inactive-to-active at any time
M581 P0 T0 S1 R0
M582 T0
; Cycle start button
; active-high io7 with pull-up
; M950 J1 C"!^io7.in"
; Trigger macro 2 on inactive-to-active at any time
; M581 P1 T2 S1 R0
; status LED pin 1 on out7
; M950 P1 C"out7"
; Feed hold button
; active-high on io8 with pull-up
; M950 J2 C"!^io8.in"
; Trigger macro 3 on inactive-to-active at any time
; M581 P2 T3 S1 R0
; status LED on pin 2 out8
; M950 P2 C"out8"
; CNC setup
;Use Workspace coordinate system
G54
;Allow movement without homing (without axis maxima)
M564 S0 H0