Skip to main content
/

Site Navigation

Your Account

Choose Language

Help

Revision to M98

Steve Miller

+[title|M98]
+
+
+==== M98: Call Macro/Subprogram ====
+
+***Parameters***
+
+* ***P"nnn"*** Macro filename^^1^^
+* ***S"<something>"*** Optional additional parameters to pass to the macro^^2^^
+
+***Example***
+
+* M98 P"mymacro.g"
+
+Runs the macro in the file mymacro.g. Macro calls can be nested (ie a macro can call another macro).
+
+The filename to include a path to a subdirectory. For relative paths, the default folder is /sys, but some implementations may check the /macros directory too. Absolute file paths are also supported starting with "0" for the internal SD card or "1" for the external SD card if fitted.
+
+***Notes***
+
+^^1^^ In RRF2.x and earlier, string can be enclosed in quotes if required, see [[GCode#Section_Quoted_strings|Quoted Strings]] for details. In RRF3, quotation marks around the filename are mandatory.
+
+^^2^^ In RRF 3.3 and later M98 supports additional parameters used to pass information to the macro being called. See the [[GCode Meta Commands#Section_Macro_parameters|Gcode Meta Commands]] documentation for the details.