Double check code for large format please



  • Hi all.

    Please can someone run through my code. I have a duet ethernet and a duex 5. Printer is cartesian style with
    1 X motor
    2 Y motors
    2 Z motors
    BL Touch and a Titan areo extruder.

    I was thinking of using motor stall as end stops but decided against it for now. I would like to have limit switches for both x and y axis at both ends. I have added an 'E-Stop' section for the max limit switches as software should stop the printer going past the designated area.

    Here's my code and thanks in advance

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Tue Apr 02 2019 16:50:15 GMT+0100 (British Summer Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Network
    M550 P"Large Format" ; Set machine name
    M552 P0.0.0.0 S1 ; Enable network and acquire dynamic address via DHCP
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M584 X4 Y3:0 Z1:2 E5 ;Set multiple drives per axis
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 2 goes forwards
    M569 P5 S1 ; Drive 3 goes forwards
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    M92 X80.00 Y400.00 Z400.00 E436.54 ; Set steps per mm
    M566 X900.00 Y900.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; Set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00 ; Set accelerations (mm/s^2)
    M906 X800.00 Y800.00 Z800.00 E800.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X800 Y900 Z200 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 Z2 S1 ; Set endstops controlled by limit switches

    ;E-Stop Conditions
    M581 E4 S1 T0 ;Trigger E-stop if X Max Limit switch reached
    M581 E5 S1 T0 ;Trigger E-stop if Y Max Limit switch reached
    M581 E6 S1 T0 ;Trigger E-stop if Z Max Limit switch reached

    ; Z-Probe
    M307 H3 A-1 C-1 D-1 ; Disable heater on PWM channel for BLTouch
    M558 P9 H5 F120 T6000 ; Set Z probe type to bltouch and the dive height + speeds
    G31 P500 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
    M557 X15:785 Y15:885 S50 ; Define mesh grid

    ; Heaters
    M307 H0 B0 S1.00 ; Disable bang-bang mode for the bed heater and set PWM limit
    M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C

    ; Fans
    M106 P3 S0.3 I0 F500 H1 T45 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned on
    M106 P4 S1 I0 F500 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P5 S1 I0 F500 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off

    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

    ; Automatic saving after power loss is not enabled

    ; Custom settings are not configured



  • @supercadad said in Double check code for large format please:

    B4138

    that is most likely not correct for your thermistors as it is the default from the configuration tool.

    Also you might want to add this at the end
    ; Miscellaneous
    T0 ; Select first tool



  • @veti Good spot, thanks
    I have altered my thermistor to suit what I am using.

    What does the T0; Select first tool do?



  • @supercadad said in Double check code for large format please:

    What does the T0; Select first tool do?

    It selects a tool so that you have a valid target for setting temperatures etc. You can't print without a tool. Adding T0 to config.g means that a tool will be selected at startup. You can also add T0 to your start.g file. or to the slicer start code. Most slicers will also ensure a tool is selected before they set a temp, but users always seem to find a way to work around that and end up with an error from trying to extrude with no tool selected.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.