slow moves between cuts?

188 views
Skip to first unread message

Andrew Fisher

unread,
Jul 3, 2015, 8:32:00 AM7/3/15
to opensour...@googlegroups.com
This may be a bit marlin specific but thought I'd ask here first.

I'm generating my gcode and in between cuts it appears to be waiting a *considerable* amount of time before moving to the next cut location.

Here's an example of a piece I'm cutting which is a 5mm square.

//MOVE TO NEXT LOCATION
G0 Z3.0
G0 Y171.931
G0 Z1.0
G1 F300.0 Z-0.4
// LASER ON
M3 S100
// DO CUT
G1 F900.0 X64.817 Y166.9657
G1 X69.783
G1 X69.7827 Y171.931
G1 X64.8173
// LASER OFF
M5

For reference the cut does travel nice and fast - I'm not worried about that.

It's the move to next location piece that seems to take a long time.

By long I mean this:
- After turning the laser off wait up to about 3 seconds
- Start move at a feedrate of less than 100mm/s
- Arrive at next location
- Wait a couple of seconds

Then it goes at the appropriate speed.

Is this familiar to anyone and any ideas for what I can do about it?

Cheers
Andrew

ajf

unread,
Jul 3, 2015, 4:35:53 PM7/3/15
to opensour...@googlegroups.com
So it looks like your default feedrate for non-cut moves is low.  And, it looks like the delays are caused my the Z moves.  How are you generating your gcode?

regards,
aj

Andrew Fisher

unread,
Jul 3, 2015, 6:53:10 PM7/3/15
to opensour...@googlegroups.com
This came from cambam. Have used the same gcode on a different cutter and it's nice and speedy.

Do you know how to set the feed rate for non cut moves in marlin? Did some config hunting and couldn't see anything obvious.

Presumably those z moves are the tool head supposed to be moving up and then away (for a mill type movement). Any ideas how to get them ignored/removed altogether?

Cheers
Andrew

ajf

unread,
Jul 4, 2015, 4:09:55 AM7/4/15
to opensour...@googlegroups.com
Sorry, it's been nearly a year since I've done much of anything with Marlin and even then it was delta printers.  Took a quick look at configuration.h and I didn't see anything either.

Have no experience with Cambam, again, sorry. Is there no way to disable Z moves and set a feedrate for non-cut moves?I know the latest Inkscape exporters allow for this and my own custom post processor for Autodesk Fusion360 does too.

The only suggestion I have is to manually edit the gcode to add a feedrate for G0 and delete the Z moves.  At least, you would know if that's the issue or if there is something else going on...

regards,
aj 

Andrew Fisher

unread,
Jul 15, 2015, 8:33:55 AM7/15/15
to opensour...@googlegroups.com
Okay confirmed it's two things - the feedrate for the G0 and also the feedrate for the Z move. 

Basically if I manually set those lines to be like F3000 or so then it makes them much more rapid. 

Now to just work out how to remove them....

Chad Davis

unread,
Jul 16, 2015, 12:38:54 AM7/16/15
to opensour...@googlegroups.com
I'm just getting set up with Turnkey's Marlin and I, if I remember correctly, noticed the rapid moves seemed slow. Slower than an G1 move  without a feedrate defined.

This line comes from Configuration.h might explain the pause you're having on the Z moves if it's only moving at 10mm/sec. 

#define DEFAULT_MAX_FEEDRATE          {7600, 7600, 10, 25}    // (mm/sec)

But that 7600mm/sec can't be limiting anything... or is the comment wrong and that supposed to be mm/min? I don't see anything else related to feedrate except the homing rates... which are 7600 as well, but the comment says mm/min.

I have 'laser time' planned for tomorrow and feed rate settings were on my list to play with.

Andrew Fisher

unread,
Jul 16, 2015, 12:47:44 AM7/16/15
to opensour...@googlegroups.com
Yes. Getting back into this and poking around in Marlin - it sort of feels like it's something to do with this. I'm going to try this out tonight and see if I can jack up the Z axis feedrate and acceleration such that the "movement" is more or less instantaneous.

I think you're right though that that comment is wrong 7600 mm/s is a very very fast move and certainly more looks like mm/min feed rates we see elsewhere. If that's the case then 10mm/min is about 0.16mm/s and looking at the output gcode it needs to travel 2mm (Z1.0 to Z3.0) so this would be about 12s. I'm away from my version so perhaps I had used a different value based on someone else's config (I'm actually using MrMaxP's fork of LMN Marlin as it's more up to date). 

Regardless though, that default MAX Z feedrate is going to result in a slow move up and down which lines up with what I'm seeing between cuts.

I'll edit and report back tonight on progress :crosses fingers:


Arthur Wolf

unread,
Jul 16, 2015, 7:15:40 AM7/16/15
to opensour...@googlegroups.com
In Smoothie ( and so I am guessing it would work in Marlin too ), you can set the Z steps per mm to 0 and all Z moves get ignored.
Another solution in cambam would be to set the pass depth to 0.0001mm or something like that, I've seen people do that succesfully.

Andrew Fisher

unread,
Jul 16, 2015, 7:52:12 AM7/16/15
to opensour...@googlegroups.com
That's a neat idea - will give that a go and see what happens.

I tried just setting the Z values high and that worked fine. The final challenge I have is that the G0 moves are now the bottleneck - it creeps along on the moves between them. 

So not sure what that is because I've set the x y default feedrates quite high (5000) and even higher and it doesn't seem to go that quick...

Arthur Wolf

unread,
Jul 16, 2015, 7:55:42 AM7/16/15
to opensour...@googlegroups.com
G0 and G1 have independent feedrates.
This means if you do
G0 X10 F300
G1 X20 F2000
All following G0 and G1 moves will have those respective feedrates.
So maybe set the feedrate for G0 and G1 manually at the beginning of the file after Cambam has set them.

ajf

unread,
Jul 16, 2015, 8:00:14 AM7/16/15
to opensour...@googlegroups.com
You might also consider Fusion360 (F360) for doing your CAM (and perhaps even CAD.) I have an alpha version of a post processor for exporting gcode directly to a Smoothie laser cutter.  Should be pretty simple to make that compatible with Marlin, I think it's only a change in how the S-word is represented (0.0-1.0 vs 0-100.)  If interested, let me know and I'll work on a Marlin compatible version.

F360 is $300/yr for commercial use, but Autodesk provides free licenses for educational/maker/startups.  I've been using it for about 6-7 months for modeling and, now, CAM for my laser.  It's pretty freaking awesome and quite easy to get up to speed.  I came to it from OpenSCAD, as a coder with only some very limited experience (from a long time ago) in direct modeling in Strata3D and Rhino, etc...

I hear the they will be adding some more laser specific features shortly..., perhaps due to my prodding (yay me!)

regards,
aj

Andrew Fisher

unread,
Jul 16, 2015, 8:12:31 AM7/16/15
to opensour...@googlegroups.com
Okay so I tried adding the G0 feedrate at the top of my file. eg:


M5

G21 G90 G64 G40

G0 F7000

G0 Z3.0

T0 M6

G17

G0 X37.4054 Y35.2236


G0 Z1.0

G1 F300.0 Z-0.4


M3 S20

G2 F400.0 X34.98 Y37.7195 I0.0701 J2.4945

G2 X37.4759 Y40.2138 I2.4959 J-0.0016

G2 X39.9718 Y37.7195 I0.0 J-2.4959

G2 X39.2162 Y35.9291 I-2.4955 J-0.0014

G2 X37.4054 Y35.2236 I-1.7398 J1.789

M5

G0 Z3.0

G0 X36.5322 Y5.2551


G0 Z1.0

G1 F300.0 Z-0.4


M3 S50




Which worked great for the first move but then the next X-Y G0 movew goes back to being slow again.

GRR. Feels like there's something just out of reach.

Z setting to zero caused a problem so not sure what happened there.

Andrew Fisher

unread,
Jul 16, 2015, 8:36:24 AM7/16/15
to opensour...@googlegroups.com
Okay - partially solved. Added a value into cambam in the post processor that manually adds a feedrate to each G0 command. Not ideal but certainly not horrific. Basically it's nice and fast to move between cuts now.

Chad Davis

unread,
Jul 16, 2015, 3:03:19 PM7/16/15
to opensour...@googlegroups.com
DEFAULT_MAX_FEEDRATE is indeed mm/sec, the comment is correct. So that should probably be set to something more reasonable than a number in the thousands... unless you just don't want a cap. I can not find were the default feedrate comes from. So I just put G0 X0 F6000 in auot0.g on my SD card which executes on boot. I then ran another file on the card without a feedrate on the G0 commands and the feedrate stayed at the much higher rate.

Chad Davis

unread,
Jul 16, 2015, 3:43:43 PM7/16/15
to opensour...@googlegroups.com
After a little experimenting I guessed the default feedrate was 1500mm/min.

grep '1500' *

Marlin_main.cpp:static float feedrate = 1500.0, next_feedrate, saved_feedrate;

There it is. Didn't think to search for 'feedrate' rather than 'FEEDRATE'. 

quillford

unread,
Oct 21, 2015, 3:21:11 PM10/21/15
to Opensource Laser
Just an FYI, VisiCut has a travel federate setting for Marlin. It may have it for smoothie, but if not it is just a few extra lines to add.

Paul Dumke

unread,
Oct 24, 2015, 4:14:36 PM10/24/15
to Opensource Laser
Hi AJF,

I'm interested in using Fusion360 on my Marlin/Ramps converted K40, have you looked into this again since your post a few months ago?  I will be grateful for any assistance or information.

Paul

ajf

unread,
Oct 24, 2015, 8:22:51 PM10/24/15
to Opensource Laser
Hi Paul,

I just added a Marlin version (marlin.cps), think it should work.  Just drop it in your F360 posts folder or add it through the dialog on Windows. On Mac it's either inside the app package for the MacAppStore version (/Applications/Fusion360.app/Contents/Libraries/Applications/CAM360/Data/Posts) or for the web download version in (~/Autodesk/Fusion\ 360\ CAM/Posts).

This was a super simple change to the Smoothie post, actually just one digit to get it to output for Marlin and changing the cut/etch defaults.  

Let me know how it goes...

regards,
aj
Reply all
Reply to author
Forward
0 new messages