Custom Gcode commands
-
Hi,
I know we can create a new GCode command by putting a file like "G500.g" in the system directory.
This works like a charm, but could be extended a little bit, in my opinion.It would be great, if we could use a second dot like "G500.1.g" because there is already the concept in the predefined Gcodes like "G59.3". That way we could define "G59.4" if there is a need to do so. Of course one needs to be careful if future updates collide with such changes, but this is always the case.
The second thing would be to pass parameters to this self defined commands.
let´s say I would write "G500.1 P1 S3 X100"
I could use the parameters inside the .g file like {P}, or {X} maybe with a "@" connotation like in batch files or so.I would love it!
best wishes
Moosi -
@moosi You can have parameters in a custom Gcode file - see https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Macro_parameters
Something to beware of is that a G macro may not use parameters G, M, or T and a M macro may not use parameter M.
For example, this is my G801, which does a move to a position specified in polar coordinates
G801.g
(You might want to take teh echos out - it's quite verbose. -
@achrn thanks so much!
I did´t realize that it works on .g files as well.But the "G500.1.g" idea is still there.
Any thoughts on this. Maybe it is just me finding this helpful... -
@moosi you can define G500.1 and similar in the current 3.4beta firmware.
-
@dc42
Ahh, that is great, thank you so much!