Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    M code settings VS. config.g

    General Discussion
    4
    4
    167
    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.
    • likevvii
      likevvii last edited by

      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
      • fcwilt
        fcwilt last edited by

        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 FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

        1 Reply Last reply Reply Quote 1
        • droftarts
          droftarts administrators last edited by

          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

          Cartesian bed-slinger with Duet 3 Mini 5+ WiFi : RRP Fisher Delta v1 with Duet 2 Maestro : TronXY X5S with Duet 2 Wifi (in progress)

          1 Reply Last reply Reply Quote 0
          • Phaedrux
            Phaedrux Moderator last edited by

            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
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA