• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Maestro config not being executed on startup

Scheduled Pinned Locked Moved Solved
General Discussion
7
19
837
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    JoshL
    last edited by 4 Sept 2019, 06:44

    Hi everyone,

    I recently have been converting my CR-10 to use a Duet 2 Maestro and have never used a Duet before. I have followed all the getting started/getting connected guides including going through RepRap firmware configuration tool to generate a config file. I have no issues connecting to the Duet through the web interface and from the web interface I can access and edit all SD Card files including the config file. However as far as I can tell the Duet isn't executing the config at all on startup. Firstly, the config includes the uncommented line:

    M552 P0.0.0.0 S1

    To my understanding this line tells the Duet to turn networking on upon startup and receive an IP address through DHCP. However every time I start the Duet networking is turned off by default and I have to send this command manually. Also none of the Machine Properties in the web interface actually reflect the config file which again leads me to believe that it's not being executed.

    The Duet is running firmware version 2.02RC5 and web interface version 1.22.6.

    Here is a screenshot of the Machine Properties:
    0_1567579396879_machine properties.JPG

    Here is the config file in full:

    ; Configuration file for Duet Maestro (firmware version 2.xx)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.0.0 on Wed Sep 04 2019 16:34:53 GMT+1000 (Australian Eastern Standard Time)

    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"Workhorse MkI" ; set printer name
    M911 S21 R23 P'M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000' ; set voltage thresholds and actions to run on power loss

    ; Drives
    M569 P0 S0 ; physical drive 0 goes backwards
    M569 P1 S0 ; physical drive 1 goes backwards
    M569 P2 S1 ; physical drive 2 goes forwards
    M569 P3 S1 ; physical drive 3 goes forwards
    M584 X0 Y1 Z2 E3 ; set drive mapping
    M350 Z16 I0 ; configure microstepping without interpolation
    M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 E816.00 ; set steps per mm
    M566 X600.00 Y600.00 Z24.00 E300.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X10200.00 Y10200.00 Z600.00 E1500.00 ; set maximum speeds (mm/min)
    M201 X2000.00 Y2000.00 Z20.00 E1000.00 ; set accelerations (mm/s^2)
    M906 X1000 Y1000 Z1000 E1000 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 X305 Y235 Z205 S0 ; set axis maxima

    ; Endstops
    M574 X1 Y1 Z1 S1 ; set active high endstops
    M574 Z1 S3 ; set endstops controlled by motor stall detection

    ; Z-Probe
    M574 Z1 S2 ; set endstops controlled by probe
    M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
    M557 X48:257 Y30:205 S175 ; define mesh grid

    ; Heaters
    M305 P0 T98801 B4185 R2200 ; set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4725 C7.060000e-8 R2200 ; set thermistor + ADC parameters for heater 1
    M143 H1 S285 ; set temperature limit for heater 1 to 285C

    ; Fans
    M106 P0 S0 I0 F500 H-1 ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45 ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

    ; Tools
    M563 P0 S"Hotend" D0 H1 F0 ; 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

    ; Network
    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

    ; Custom settings are not defined

    ; Miscellaneous
    M501 ; load saved parameters from non-volatile memory
    T0 ; select first tool

    ? 2 Replies Last reply 4 Sept 2019, 07:01 Reply Quote 0
    • ?
      A Former User @JoshL
      last edited by 4 Sept 2019, 07:01

      @joshl said in Maestro config not being executed on startup:

      I have no issues connecting to the Duet through the web interface and from the web interface I can access and edit all SD Card files including the config file.

      and the config.g file is in the /sys/ folder?

      1 Reply Last reply Reply Quote 0
      • undefined
        JoshL
        last edited by 4 Sept 2019, 07:04

        Yeah it is in the sys folder

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User
          last edited by 4 Sept 2019, 07:13

          try running M98 Pconfig.g and see if it complains about any errors?

          1 Reply Last reply Reply Quote 0
          • undefined
            JoshL
            last edited by 4 Sept 2019, 07:37

            I get these two errors:

            Error: M911: No power fail script provided
            Error: G0/G1: insufficient axes homed

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User
              last edited by 4 Sept 2019, 07:42

              not too familiar with how the firmware handles errors, but does it make a difference to move the network config block up to over the M911 command? or commenting out the offending lines with a ;

              1 Reply Last reply Reply Quote 0
              • undefined
                JoshL
                last edited by 4 Sept 2019, 07:56

                Ah yep so I got rid of the M911 line from the config and that's fixed it. The error must have been stopping the Duet from reading the rest of the config file. Thanks heaps for the help.

                1 Reply Last reply Reply Quote 0
                • ?
                  A Former User
                  last edited by 4 Sept 2019, 09:28

                  fyi https://forum.duet3d.com/topic/7773/forum-feature-mark-as-question-solved/

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    droftarts administrators
                    last edited by 4 Sept 2019, 09:30

                    @joshl said in Maestro config not being executed on startup:

                    M911 S21 R23 P'M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000' ; set voltage thresholds and actions to run on power loss

                    I can't see anything particularly wrong with this line, except you've used single quotes rather than double quotes. However, you probably need to set up the sys/resurrect-prologue.g file.
                    See here for more details: https://duet3d.dozuki.com/Wiki/Setting_up_to_resume_a_print_after_a_power_failure

                    Ian

                    Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                    undefined 1 Reply Last reply 4 Sept 2019, 09:37 Reply Quote 0
                    • undefined
                      themelle @droftarts
                      last edited by 4 Sept 2019, 09:37

                      @droftarts said in Maestro config not being executed on startup:

                      I can't see anything particularly wrong with this line, except you've used single quotes rather than double quotes.

                      According to https://duet3d.dozuki.com/Wiki/Gcode#Section_M911_Configure_auto_save_on_loss_of_power you need to use double quotes for the P parameter.
                      The message Error: G0/G1: insufficient axes homed leads me to think that the single-quoted P parameter command line from the M911command is being interpreted and executed at config.g runtime as there is a G1 command in there.

                      ? 1 Reply Last reply 4 Sept 2019, 11:26 Reply Quote 0
                      • ?
                        A Former User @themelle
                        last edited by 4 Sept 2019, 11:26

                        @themelle that seems to be the explanation, I was wondering where the G0/G1 line was.
                        0_1567596359027_d0ed7c86-72ad-4bc5-a62e-fe3d2947e023-image.png

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User @JoshL
                          last edited by A Former User 9 Apr 2019, 11:29 4 Sept 2019, 11:29

                          @joshl said in Maestro config not being executed on startup:

                          including going through RepRap firmware configuration tool to generate a config file.

                          Did the RRF configurator generate the M911 line with single quotes? If so that should probably be filed as a bug

                          ? 1 Reply Last reply 4 Sept 2019, 13:36 Reply Quote 0
                          • ?
                            A Former User @A Former User
                            last edited by 4 Sept 2019, 13:36

                            @bearer said in Maestro config not being executed on startup:

                            Did the RRF configurator generate the M911 line with single quotes? If so that should probably be filed as a bug

                            it is a bug @chrishamm 👆

                            1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User
                              last edited by 4 Sept 2019, 17:12

                              I would move the whole network section of g code to almost the top of the config.g file so that the network gets started first...

                              1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User
                                last edited by 4 Sept 2019, 17:18

                                @calvinx said in Maestro config not being executed on startup:

                                I would move the whole network section of g code to almost the top of the config.g file so that the network gets started first...

                                seems it was further up earlier, but changed recently, and the quotes bug was introduced at the same time. wonder if that is the reason for the sudden increase in threads with network issues.

                                anyways, hopefully the quotes will be fixed and the network moved back to the top shortly.

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  Phaedrux Moderator
                                  last edited by 4 Sept 2019, 18:44

                                  The position of the network command shouldn't matter, but the wrong quotes for the power loss recovery halting the execution of the config certainly is a problem.

                                  Oddly, if the network section hadn't been moved down it would have been much harder to spot the wrong quote problem.

                                  Z-Bot CoreXY Build | Thingiverse Profile

                                  ? 1 Reply Last reply 4 Sept 2019, 19:04 Reply Quote 0
                                  • ?
                                    A Former User @Phaedrux
                                    last edited by 4 Sept 2019, 19:04

                                    @phaedrux said in Maestro config not being executed on startup:

                                    The position of the network command shouldn't matter

                                    for users who find it difficult to use the serial terminal it does matter when errors are introduced, further complicated by the missmatch between default EOL in the firmware and the recommended terminal.

                                    if the network were given "priority" at the top, and the web interface and/or paneldue would indicate that config.g was terminated due to an error everyone wins.

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      Phaedrux Moderator
                                      last edited by 4 Sept 2019, 19:12

                                      @bearer No argument there.

                                      One helpful trick for issues like this is to send M98 Pconfig.g which will re-execute config.g as a macro, and any error messages will be echoed back, unlike at startup. I do wish that any startup errors would get punted to the console as well, but currently that's not the case.

                                      Z-Bot CoreXY Build | Thingiverse Profile

                                      1 Reply Last reply Reply Quote 1
                                      • undefined
                                        MrsDelish
                                        last edited by 4 Sept 2019, 20:48

                                        I find Arduino IDE serial monitor really quick and easy to use to talk to Duets and other boards, it has a drop down menu to set line endings and baud rate on the serial window.

                                        1 Reply Last reply Reply Quote 0
                                        5 out of 19
                                        • First post
                                          5/19
                                          Last post
                                        Unless otherwise noted, all forum content is licensed under CC-BY-SA