Macro file unable to call during print
-
@SANJR Does the macro run "stand alone" if you just send the M98 from the console? It might be an idea if you post the macro code here.
-
Yes the macro runs in standalone. The G-Code for the macro file is as follows,
Weld Torch ON.g file
; Weld Torch ON
M42 P3 S1Weld Torch OFF.g file
; Weld Torch OFF
M42 P3 S0 -
@SANJR Note that:
Case sensitivity
The original NIST GCode standard requires GCode interpreters to be case-insensitive, except for characters in comments. However, not all 3D printer firmwares conform to this and some recognise uppercase command letters and parameters only.
RepRapFirmware version 1.19 and later is case-insensitive, except for characters within quoted strings. RepRapFirmware version 1.18 and earlier accept only uppercase letters for command and parameter letters.
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#case-sensitivity
Is the macro "5_WELD TORCH ON.g" or "Weld Torch ON.g"?
Ian
-
The file name is WELD TORCH ON. To appear as a fifth file in the macro folder, i numbered it to be 5_WELD TORCH ON. I have tried it the following ways as of now
- M98 P¨WELD TORCH ON.g¨
- M98 P¨WELD TORCH ON¨
- M98 P¨macros/WELD TORCH ON.g¨
- M98 P¨macros/WELD TORCH ON¨
- M98 P¨0:/macros/WELD TORCH ON.g¨
-
@SANJR you need the 5_ in the M98 call as well then
-
@SANJR
And also tried one combinations
M98 P¨5_macros/WELD TORCH ON.g¨ -
@SANJR Please send
M20 S2 P"/macros"
and post the response.Edit: It won't be a case-sensitive issue, because FAT32 is not case sensitive! But it is case-preserving.
Ian
-
@SANJR said in Macro file unable to call during print:
@SANJR
And also tried one combinations
M98 P¨5_WELD TORCH ON.g¨ -
Here is the response from the console
M20 S2 P"/macros"
{
"dir": "/macros",
"first": 0,
"files": [
"6_WELD TORCH OFF",
"3_MOTOR 1 OFF",
"4_MOTOR 2 OFF",
"1_MOTOR 1 ON AND SPEED CONTROL",
"2_ MOTOR 2 ON AND SPEED CONTROL",
"5_WELD TORCH ON"
],
"next": 0,
"err": 0
} -
@SANJR so torch on is
M98 P"0:/macros/5_WELD TORCH ON"
-
@jay_s_uk Thanks
The macro files works. It seems the format of M98 command during the print needs to mention the location of the file i.e., in the directory where we placed it. And finally the extension of file .g is not required.
So the syntax to which my machine responds is M98 P"0:/macros/5_WELD TORCH ON" instead of M98 P"5_WELD TORCH ON"
It would be nice if notes are updated in the documentation which would be helpful to other users.
-
It seems I organize my system code and my "macros" code differently from most.
In my setup the items in the macros folder are only there to provide access, from the DWC interface, to items in the system folder.
If other words items in the macros folder invoke, via M98, items in the system folder but no items in the system folder invoke items in the macros folder.
There are some items in the macros folder that have a line or two of code but nothing that I ever would need to invoke from the system folder.
Just FYI.
Frederick