Welcome! Log In Create A New Profile

Advanced

M41, is anyone using it?

Posted by crispy1 
M41, is anyone using it?
June 13, 2014 10:26AM
Is anyone currently using the M41 command? This is supposed to make the printer repeat the same gcode file over and over when running from SD. But I can't get it to work, the machine just stops at the end of the file like normal. I connected a computer to it to see if it would throw any errors in the terminal and it doesn't. What gives?

[reprap.org]
Re: M41, is anyone using it?
June 13, 2014 10:46AM
which firmware are you running?




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



Re: M41, is anyone using it?
June 13, 2014 10:47AM
Marlin, but it's about a year old at this point.
Re: M41, is anyone using it?
June 13, 2014 10:53AM
the function doesn't actually appear to exist in the marlin code what you could do though is a M23 and M24 combination at the end of the gcode file so it executes it'self




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



Re: M41, is anyone using it?
June 13, 2014 12:09PM
I can't get M24 to work inside a .gcode file on the SD card. M23 correctly selects the file, but the M24 command is never executed. If I send M24 over USB from my computer it starts fine. If I send M27 it says it's sitting at the beginning of the file (byte 0/7823).

I also discovered that a gcode file can't open itself, so I created a second gcode file whose sole purpose is to re-open the first gcode file.
Re: M41, is anyone using it?
June 13, 2014 12:13PM
i'm not too surprised , it seemed almost too good . does it worknow with the second file?




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



Re: M41, is anyone using it?
June 13, 2014 01:02PM
No, it does not work with the second file in play.

What's weird is it works when sent from the terminal. Let's say file A is the one that runs the test I want to run, and file B is the one that opens file A. So at the end of file A I have M23 fileB.gcode / M24, and the whole contents of file B are:
M23 filea.gcode
M24

So if I run file B directly, when it gets to the end it says something like "opening file A successful" and then it sits there. BUT, if at that point I send an M24 from my PC, it will execute file A fine. Same thing at the end of file A.

Is there such a thing as a terminal-only gcode command? That would seem really weird to me.
Re: M41, is anyone using it?
June 13, 2014 06:51PM
i think the original file might have to be closed off or something before opening the next one




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



Re: M41, is anyone using it?
June 13, 2014 07:00PM
there's another m code which combines to two M32 that one might be worth a try , otherwise some modifications might be in order




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



Re: M41, is anyone using it?
June 13, 2014 09:00PM
Quote
thejollygrimreaper
there's another m code which combines to two M32 that one might be worth a try , otherwise some modifications might be in order

I can't find that one documented on the gcode page ( [reprap.org] ), do you have a link to documentation?
Re: M41, is anyone using it?
June 13, 2014 09:32PM
Quote
crispy1
Quote
thejollygrimreaper
there's another m code which combines to two M32 that one might be worth a try , otherwise some modifications might be in order

I can't find that one documented on the gcode page ( [reprap.org] ), do you have a link to documentation?


i found it in the marlin code

specifically line 1731 in the Marlin_main.cpp


i think there are probably a few functions in the marlin firmware that aren't listed in the wiki , it would probably be best to use [github.com] as a moreup to date reference for available gcodes




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



Re: M41, is anyone using it?
June 13, 2014 09:37PM
i've added the M32 code to the reprap gcode page




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



A2
Re: M41, is anyone using it?
June 13, 2014 11:07PM
Caution noob questions ahead tongue sticking out smiley

Interesting option, curious if the title could be a little more explanatory for the noob?

M32: Select file and start SD print
M32: Automatically executes a gcode file from a SD card

[reprap.org]

Q: Say you had a conveyor belt on your build plate, and you had 60 unique parts that you wanted printed. Could you add 60 unique M32 gcode commands (file paths)? Could M32 be nested in a loop with a counter or some thing to find the next file path, or does the counter get lost at the end of a print?
Re: M41, is anyone using it?
June 13, 2014 11:25PM
Quote
A2
Caution noob questions ahead tongue sticking out smiley

Interesting option, curious if the title could be a little more explanatory for the noob?

M32: Select file and start SD print
M32: Automatically executes a gcode file from a SD card

[reprap.org]

Q: Say you had a conveyor belt on your build plate, and you had 60 unique parts that you wanted printed. Could you add 60 unique M32 gcode commands (file paths)? Could M32 be nested in a loop with a counter or some thing to find the next file path, or does the counter get lost at the end of a print?

until it's tested i'm not sure the description should be changed just yet , strictly speaking i don't know if it works i just copied it off the marlin git-hub readme

if you had a conveyor belt eg the automated build table like the makerbot one, i think they use to just make one long gcode file , thats what i would do anyway




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



Re: M41, is anyone using it?
June 14, 2014 02:23PM
Quote
thejollygrimreaper

i found it in the marlin code

specifically line 1731 in the Marlin_main.cpp


i think there are probably a few functions in the marlin firmware that aren't listed in the wiki , it would probably be best to use [github.com] as a moreup to date reference for available gcodes

Updated the firmware, and the M32 command works! Thanks so much for your help!
Sorry, only registered users may post in this forum.

Click here to login