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

M code settings VS. config.g

Scheduled Pinned Locked Moved
General Discussion
4
4
319
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
    likevvii
    last edited by 8 Oct 2019, 12:39

    Hello,

    I have been testing the movement components of my duet 2 wifi on DWC. I have come to a split road.

    I used the M mode: "M569 P5 T3" to set my timing signal to 3ns pulses in order to match my external stepper driver instructions. It works and I can now communicate with my external driver.

    After I have set this M code, how would I save it?
    I tried M500 but I don't think I fully understand what exactly M500 does. I also get the message that M501 is not in my config.g , if I need to put M501, what order should I place it in my config.g file?
    If I reboot, it will reset back to the default value before I sent: "M569 P5 T3"

    Is there a G/M code that updates this information on my config.g?
    Are there any other methods other than going directly to my config.g and typing it directly?

    1 Reply Last reply Reply Quote 0
    • undefined
      fcwilt
      last edited by 8 Oct 2019, 13:06

      Hi,

      The units of T3 are microseconds, not nanoseconds.

      You can put the M569 command in your config.g file or in a macro file that config.g executes.

      The config.g file is just another gcode file that is only unique in that it is executed whenever the board starts up or the firmware is rebooted.

      M500 creates the config-override.g file.

      M501 "reads" the config-override.g file.

      If you are using M500 then you will need to add a M501 command to the end of your config.g file.

      While you can put your own commands in the config-override.g file the next time that file is created your edits will be lost.

      Frederick

      Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

      1 Reply Last reply Reply Quote 1
      • undefined
        droftarts administrators
        last edited by 8 Oct 2019, 13:12

        M500 creates a file called sys/config-override.g on the SD card. You can view this file in the DWC and see what's stored in it. As far as I'm aware, M569 is NOT stored in this. So you should add it to your config.g. Probably best as the last entry in the ';Drives' section.

        If you want to use the parameters stored by M500, yes, you need to add M501 to the end of your config.g

        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

        1 Reply Last reply Reply Quote 0
        • undefined
          Phaedrux Moderator
          last edited by 8 Oct 2019, 20:03

          Here are the limited parameters that M500 stores.

          https://duet3d.dozuki.com/Wiki/Gcode#Section_M500_Store_parameters

          It's only intended to be used for things that are computed or measured by the firmware, not to save arbitrary gcode values.

          Just directly edit config.g

          Z-Bot CoreXY Build | Thingiverse Profile

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