M code settings VS. config.g
likevvii last edited by
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?
fcwilt last edited by
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.
droftarts 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
Phaedrux last edited by
Here are the limited parameters that M500 stores.
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