Solved Error: Bad command: macros
-
@leckietech
So you want to turn on some power supply right at the beginning of a print?
Frederick
-
@fcwilt OP wanted to turn off his supply with
M102
, but you could also turn on a supply with G90 as a trigger for a script to run. you could also add aG4 S5
to allow the supply to have time to stabilize the inrush current. My setup doest use a switchable supply, we have a huge 9kw supply on a buss bar running each of our racks here -
@code7 said in Error: Bad command: macros:
@phaedrux @LeckieTech
The folder hasn't changed.
Thanks for letting me know about the mandatory quote change. I've been using Simplify3D post processing to to replace M102 in the gcode file with the macro I'd like to to run but it will only replace what is between the first two occurring quotes. Do you have any ideas for a S3D post processing work around?
{REPLACE "M102" "M98 "P/macros/Power_OFF""}
Writes only "M98" to gcode file.{REPLACE "M102" "M98 P/macros/Power_OFF"}
No longer works as mentioned above in RR 3.3I thought of an easier way for you to do this. Just make a file in your system directory called
M102.g
and put your PSU macro text in the file. M102 isn't used by RRF so you can use it natively right out of S3D, not need to run any post in S3D for it. -
@code7 said in Error: Bad command: macros:
Re: "Bad command" errors on PanelDue
I just updated to 3.3 and am now receiving errors when running a print that calls macros such as "M98 P/macros/Power_OFF".
Error: Bad command: macros/Power_OFF
However, If I run the macro from the terminal it runs just fine.
Does anyone have any ideas on how I can work around this?
When do you this macro to run?
Frederick
-
@leckietech although officially M98 requires quotes around the filename in RRF3, unofficially it still works without them in standalone mode. So I wonder whether S3D does something special with the forward-slash character. Have you checked what the generated GCode file contains?
-
@dc42 said in Error: Bad command: macros:
@leckietech although officially M98 requires quotes around the filename in RRF3, unofficially it still works without them in standalone mode. So I wonder whether S3D does something special with the forward-slash character. Have you checked what the generated GCode file contains?
when you and I were talking about this the other day, I never did get a proper output using additional quotes from S3D. I also saw on simplify's forums that many others were having the same trouble since 2018 with no solution. After you suggested making my own M codes, since then I have been using this and my own custom G110 and G111 firmware retraction codes with much success, it simply works flawlessly. I've made a dozen of my own custom codes and am in the works of adding these to all the printers in our farm! Opens the door to so much flexibility!
-
-
@code7 said in Error: Bad command: macros:
This line produced by S3D runs fine when pasted into the DWC console, but it doesn't run from inside of a gcode file.
"M98 P/macros/Power_OFF"Please make the GCode file available on a file sharing site - dont copy and paste the contents because I think there may be a non-printing character embedded in that line.
-
@code7 said in Error: Bad command: macros:
The script is run on retractions.
Your turning some power supply off on every retraction????
Frederick
-
@leckietech said in Error: Bad command: macros:
I thought of an easier way for you to do this. Just make a file in your system directory called M102.g and put your PSU macro text in the file. M102 isn't used by RRF so you can use it natively right out of S3D, not need to run any post in S3D for it.
I've tried this with the M102.g macro within the system directory. When I send M102 from the console the green popup displays indicating the command is good but nothing runs. Do you know why this might be?
@dc42
Here is the S3D gcode file@fcwilt I'm turning off a device at each retraction.
-
@code7 can you post what is in the M102.g file?
-
@code7 said in Error: Bad command: macros:
@fcwilt I'm turning off a device at each retraction.
And you cannot use the user code hook in S3D for retraction?
Frederick
-
@code7 M101, M102 and M103 are already implemented. Use a different code. I don't know why they are not listed on the GCodes wiki page.
-
@dc42
I changed M102.g to another number and it's working great now. Thanks