Welcome! Log In Create A New Profile

Advanced

Commands being executed out of order

Posted by Fabricate 
Commands being executed out of order
June 18, 2014 05:40AM
Hi,

for my 4 axis printer I hacked Marlin and added a new M command (just like setting the fan-speed, i am setting the angle of the new axis). This works very nice, but the problem is that in a G-Code file the command gets executed about 2 layers ahead. I guess that this might be because of the lookahead for circles, but I don't know how to deal with that. Can someone point me into a direction where I can find more information how I can add the feature properly?

In future I will implement it more clean (really as a new axis), but for a first test this was working well enough.

Thank you for your help!
Re: Commands being executed out of order
June 18, 2014 01:02PM
Could you somehow make use of the M400 command to wait for buffer to clear? Or maybe the G4 command would serve. The G Code reference at this wiki suggests that "G4 P0" is equivalent to M400, so it might be an alternative if your firmware does not support M400.
Re: Commands being executed out of order
June 18, 2014 03:04PM
Quote
jbernardis
Could you somehow make use of the M400 command to wait for buffer to clear? Or maybe the G4 command would serve. The G Code reference at this wiki suggests that "G4 P0" is equivalent to M400, so it might be an alternative if your firmware does not support M400.

Thanks, this is a great solution thumbs up ! I will try that.
Sorry, only registered users may post in this forum.

Click here to login