acceleration

Discussion about the arduino based g-code interpreter, grbl
chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: acceleration

Post by chamnit » Thu Oct 08, 2015 9:48 pm

cvoinescu wrote: @chamnit, this just occurred to me: traverse moves don't need to cut, so they could potentially have higher acceleration that feed moves. Can this be done easily? Do you think it'd be a good idea?
If you seperate accelerations between feed and rapids, you would would have a lower acceleration setting for rapids and higher for feeds. This is because stepper motor torque decreases with speed. That said, it's definitely something to think about but i would tend to think the benefits will be minor and application specific. Ill jot it down in my development notes though. Thanks for the idea.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: acceleration

Post by cvoinescu » Thu Oct 08, 2015 11:47 pm

Yes, I can see it's a bit more complicated than that.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

FargoPhil
Posts: 62
Joined: Wed May 20, 2015 2:40 pm

Re: acceleration

Post by FargoPhil » Sat Oct 10, 2015 8:21 pm

OK, I modified grbl to add a modifier 'T' to the $ commands, which updates settings but doesn't persist to flash. (T = temporary)
So the commands in #3 $T120=10000 set the acceleration to 10000 but don't write to eeprom.

The line isn't as crisp as I'd like, but I'm guessing that's got more to do with getting clean power to the laser than anything. The wiring could be shortened and improved. But notice on #3 that there isn't overburn due to acceleration at the ends of the line. Next step for me will be to mess with an image -> gcode program to take advantage of my changes.

One problem this approach doesn't overcome that the light/mm approach will handle nicely is that any sender pauses that drain the buffer will result in burns. On the other hand, this gives a slick way for the heavy-gantry machines (SO3 w/ mounted router) to double as a laser engraver.

Is this change something I should clean up and submit a pull request for?
_20151010_150407.JPG
burn test
_20151010_150407.JPG (472.23 KiB) Viewed 1520 times
Code for 1

Code: Select all

G21
F2000
M05
G01 X0.00 Y0.00
M03 S0
X10 Y0 

X40 Y0 s5000
M05
G01 X0.00 Y0.00
Code for 2

Code: Select all

G21
F2000
M05
G01 X0.00 Y0.00

M03 S0
X10 Y0 

X10 Y0 s5000
X10.1 Y0 s5000
X10.2 Y0 s5000
X10.3 Y0 s5000
X10.4 Y0 s5000
X10.5 Y0 s5000
X10.6 Y0 s5000
X10.7 Y0 s5000
X10.8 Y0 s5000
X10.9 Y0 s5000
X11 Y0 s5000
X11.1 Y0 s5000
X11.2 Y0 s5000
X11.3 Y0 s5000
X11.4 Y0 s5000
X11.5 Y0 s5000
X11.6 Y0 s5000
X11.7 Y0 s5000
X11.8 Y0 s5000
X11.9 Y0 s5000
X12 Y0 s5000
X12.1 Y0 s5000
X12.2 Y0 s5000
X12.3 Y0 s5000
X12.4 Y0 s5000
X12.5 Y0 s5000
X12.6 Y0 s5000
X12.7 Y0 s5000
X12.8 Y0 s5000
X12.9 Y0 s5000
X13 Y0 s5000
X13.1 Y0 s5000
X13.2 Y0 s5000
X13.3 Y0 s5000
X13.4 Y0 s5000
X13.5 Y0 s5000
X13.6 Y0 s5000
X13.7 Y0 s5000
X13.8 Y0 s5000
X13.9 Y0 s5000
X14 Y0 s5000
X14.1 Y0 s5000
X14.2 Y0 s5000
X14.3 Y0 s5000
X14.4 Y0 s5000
X14.5 Y0 s5000
X14.6 Y0 s5000
X14.7 Y0 s5000
X14.8 Y0 s5000
X14.9 Y0 s5000
X15 Y0 s5000
X15.1 Y0 s5000
X15.2 Y0 s5000
X15.3 Y0 s5000
X15.4 Y0 s5000
X15.5 Y0 s5000
X15.6 Y0 s5000
X15.7 Y0 s5000
X15.8 Y0 s5000
X15.9 Y0 s5000
X16 Y0 s5000
X16.1 Y0 s5000
X16.2 Y0 s5000
X16.3 Y0 s5000
X16.4 Y0 s5000
X16.5 Y0 s5000
X16.6 Y0 s5000
X16.7 Y0 s5000
X16.8 Y0 s5000
X16.9 Y0 s5000
X17 Y0 s5000
X17.1 Y0 s5000
X17.2 Y0 s5000
X17.3 Y0 s5000
X17.4 Y0 s5000
X17.5 Y0 s5000
X17.6 Y0 s5000
X17.7 Y0 s5000
X17.8 Y0 s5000
X17.9 Y0 s5000
X18 Y0 s5000
X18.1 Y0 s5000
X18.2 Y0 s5000
X18.3 Y0 s5000
X18.4 Y0 s5000
X18.5 Y0 s5000
X18.6 Y0 s5000
X18.7 Y0 s5000
X18.8 Y0 s5000
X18.9 Y0 s5000
X19 Y0 s5000
X19.1 Y0 s5000
X19.2 Y0 s5000
X19.3 Y0 s5000
X19.4 Y0 s5000
X19.5 Y0 s5000
X19.6 Y0 s5000
X19.7 Y0 s5000
X19.8 Y0 s5000
X19.9 Y0 s5000
X20 Y0 s5000
X20.1 Y0 s5000
X20.2 Y0 s5000
X20.3 Y0 s5000
X20.4 Y0 s5000
X20.5 Y0 s5000
X20.6 Y0 s5000
X20.7 Y0 s5000
X20.8 Y0 s5000
X20.9 Y0 s5000
X21 Y0 s5000
X21.1 Y0 s5000
X21.2 Y0 s5000
X21.3 Y0 s5000
X21.4 Y0 s5000
X21.5 Y0 s5000
X21.6 Y0 s5000
X21.7 Y0 s5000
X21.8 Y0 s5000
X21.9 Y0 s5000
X22 Y0 s5000
X22.1 Y0 s5000
X22.2 Y0 s5000
X22.3 Y0 s5000
X22.4 Y0 s5000
X22.5 Y0 s5000
X22.6 Y0 s5000
X22.7 Y0 s5000
X22.8 Y0 s5000
X22.9 Y0 s5000
X23 Y0 s5000
X23.1 Y0 s5000
X23.2 Y0 s5000
X23.3 Y0 s5000
X23.4 Y0 s5000
X23.5 Y0 s5000
X23.6 Y0 s5000
X23.7 Y0 s5000
X23.8 Y0 s5000
X23.9 Y0 s5000
X24 Y0 s5000
X24.1 Y0 s5000
X24.2 Y0 s5000
X24.3 Y0 s5000
X24.4 Y0 s5000
X24.5 Y0 s5000
X24.6 Y0 s5000
X24.7 Y0 s5000
X24.8 Y0 s5000
X24.9 Y0 s5000
X25 Y0 s5000
X25.1 Y0 s5000
X25.2 Y0 s5000
X25.3 Y0 s5000
X25.4 Y0 s5000
X25.5 Y0 s5000
X25.6 Y0 s5000
X25.7 Y0 s5000
X25.8 Y0 s5000
X25.9 Y0 s5000
X26 Y0 s5000
X26.1 Y0 s5000
X26.2 Y0 s5000
X26.3 Y0 s5000
X26.4 Y0 s5000
X26.5 Y0 s5000
X26.6 Y0 s5000
X26.7 Y0 s5000
X26.8 Y0 s5000
X26.9 Y0 s5000
X27 Y0 s5000
X27.1 Y0 s5000
X27.2 Y0 s5000
X27.3 Y0 s5000
X27.4 Y0 s5000
X27.5 Y0 s5000
X27.6 Y0 s5000
X27.7 Y0 s5000
X27.8 Y0 s5000
X27.9 Y0 s5000
X28 Y0 s5000
X28.1 Y0 s5000
X28.2 Y0 s5000
X28.3 Y0 s5000
X28.4 Y0 s5000
X28.5 Y0 s5000
X28.6 Y0 s5000
X28.7 Y0 s5000
X28.8 Y0 s5000
X28.9 Y0 s5000
X29 Y0 s5000
X29.1 Y0 s5000
X29.2 Y0 s5000
X29.3 Y0 s5000
X29.4 Y0 s5000
X29.5 Y0 s5000
X29.6 Y0 s5000
X29.7 Y0 s5000
X29.8 Y0 s5000
X29.9 Y0 s5000
X30 Y0 s5000
X30.1 Y0 s5000
X30.2 Y0 s5000
X30.3 Y0 s5000
X30.4 Y0 s5000
X30.5 Y0 s5000
X30.6 Y0 s5000
X30.7 Y0 s5000
X30.8 Y0 s5000
X30.9 Y0 s5000
X31 Y0 s5000
X31.1 Y0 s5000
X31.2 Y0 s5000
X31.3 Y0 s5000
X31.4 Y0 s5000
X31.5 Y0 s5000
X31.6 Y0 s5000
X31.7 Y0 s5000
X31.8 Y0 s5000
X31.9 Y0 s5000
X32 Y0 s5000
X32.1 Y0 s5000
X32.2 Y0 s5000
X32.3 Y0 s5000
X32.4 Y0 s5000
X32.5 Y0 s5000
X32.6 Y0 s5000
X32.7 Y0 s5000
X32.8 Y0 s5000
X32.9 Y0 s5000
X33 Y0 s5000
X33.1 Y0 s5000
X33.2 Y0 s5000
X33.3 Y0 s5000
X33.4 Y0 s5000
X33.5 Y0 s5000
X33.6 Y0 s5000
X33.7 Y0 s5000
X33.8 Y0 s5000
X33.9 Y0 s5000
X34 Y0 s5000
X34.1 Y0 s5000
X34.2 Y0 s5000
X34.3 Y0 s5000
X34.4 Y0 s5000
X34.5 Y0 s5000
X34.6 Y0 s5000
X34.7 Y0 s5000
X34.8 Y0 s5000
X34.9 Y0 s5000
X35 Y0 s5000
X35.1 Y0 s5000
X35.2 Y0 s5000
X35.3 Y0 s5000
X35.4 Y0 s5000
X35.5 Y0 s5000
X35.6 Y0 s5000
X35.7 Y0 s5000
X35.8 Y0 s5000
X35.9 Y0 s5000
X36 Y0 s5000
X36.1 Y0 s5000
X36.2 Y0 s5000
X36.3 Y0 s5000
X36.4 Y0 s5000
X36.5 Y0 s5000
X36.6 Y0 s5000
X36.7 Y0 s5000
X36.8 Y0 s5000
X36.9 Y0 s5000
X37 Y0 s5000
X37.1 Y0 s5000
X37.2 Y0 s5000
X37.3 Y0 s5000
X37.4 Y0 s5000
X37.5 Y0 s5000
X37.6 Y0 s5000
X37.7 Y0 s5000
X37.8 Y0 s5000
X37.9 Y0 s5000
X38 Y0 s5000
X38.1 Y0 s5000
X38.2 Y0 s5000
X38.3 Y0 s5000
X38.4 Y0 s5000
X38.5 Y0 s5000
X38.6 Y0 s5000
X38.7 Y0 s5000
X38.8 Y0 s5000
X38.9 Y0 s5000
X39 Y0 s5000
X39.1 Y0 s5000
X39.2 Y0 s5000
X39.3 Y0 s5000
X39.4 Y0 s5000
X39.5 Y0 s5000
X39.6 Y0 s5000
X39.7 Y0 s5000
X39.8 Y0 s5000
X39.9 Y0 s5000
X40 Y0 s5000
M05
G01 X0.00 Y0.00
Code for 3

Code: Select all

G21
F2000
$T120=400
$T121=400
M05
G01 X0.00 Y0.00

M03 S0
X10 Y0 S0
$T120=10000
$T121=10000

X10 Y0 s5000
X10.1 Y0 s5000
X10.2 Y0 s5000
X10.3 Y0 s5000
X10.4 Y0 s5000
X10.5 Y0 s5000
X10.6 Y0 s5000
X10.7 Y0 s5000
X10.8 Y0 s5000
X10.9 Y0 s5000
X11 Y0 s5000
X11.1 Y0 s5000
X11.2 Y0 s5000
X11.3 Y0 s5000
X11.4 Y0 s5000
X11.5 Y0 s5000
X11.6 Y0 s5000
X11.7 Y0 s5000
X11.8 Y0 s5000
X11.9 Y0 s5000
X12 Y0 s5000
X12.1 Y0 s5000
X12.2 Y0 s5000
X12.3 Y0 s5000
X12.4 Y0 s5000
X12.5 Y0 s5000
X12.6 Y0 s5000
X12.7 Y0 s5000
X12.8 Y0 s5000
X12.9 Y0 s5000
X13 Y0 s5000
X13.1 Y0 s5000
X13.2 Y0 s5000
X13.3 Y0 s5000
X13.4 Y0 s5000
X13.5 Y0 s5000
X13.6 Y0 s5000
X13.7 Y0 s5000
X13.8 Y0 s5000
X13.9 Y0 s5000
X14 Y0 s5000
X14.1 Y0 s5000
X14.2 Y0 s5000
X14.3 Y0 s5000
X14.4 Y0 s5000
X14.5 Y0 s5000
X14.6 Y0 s5000
X14.7 Y0 s5000
X14.8 Y0 s5000
X14.9 Y0 s5000
X15 Y0 s5000
X15.1 Y0 s5000
X15.2 Y0 s5000
X15.3 Y0 s5000
X15.4 Y0 s5000
X15.5 Y0 s5000
X15.6 Y0 s5000
X15.7 Y0 s5000
X15.8 Y0 s5000
X15.9 Y0 s5000
X16 Y0 s5000
X16.1 Y0 s5000
X16.2 Y0 s5000
X16.3 Y0 s5000
X16.4 Y0 s5000
X16.5 Y0 s5000
X16.6 Y0 s5000
X16.7 Y0 s5000
X16.8 Y0 s5000
X16.9 Y0 s5000
X17 Y0 s5000
X17.1 Y0 s5000
X17.2 Y0 s5000
X17.3 Y0 s5000
X17.4 Y0 s5000
X17.5 Y0 s5000
X17.6 Y0 s5000
X17.7 Y0 s5000
X17.8 Y0 s5000
X17.9 Y0 s5000
X18 Y0 s5000
X18.1 Y0 s5000
X18.2 Y0 s5000
X18.3 Y0 s5000
X18.4 Y0 s5000
X18.5 Y0 s5000
X18.6 Y0 s5000
X18.7 Y0 s5000
X18.8 Y0 s5000
X18.9 Y0 s5000
X19 Y0 s5000
X19.1 Y0 s5000
X19.2 Y0 s5000
X19.3 Y0 s5000
X19.4 Y0 s5000
X19.5 Y0 s5000
X19.6 Y0 s5000
X19.7 Y0 s5000
X19.8 Y0 s5000
X19.9 Y0 s5000
X20 Y0 s5000
X20.1 Y0 s5000
X20.2 Y0 s5000
X20.3 Y0 s5000
X20.4 Y0 s5000
X20.5 Y0 s5000
X20.6 Y0 s5000
X20.7 Y0 s5000
X20.8 Y0 s5000
X20.9 Y0 s5000
X21 Y0 s5000
X21.1 Y0 s5000
X21.2 Y0 s5000
X21.3 Y0 s5000
X21.4 Y0 s5000
X21.5 Y0 s5000
X21.6 Y0 s5000
X21.7 Y0 s5000
X21.8 Y0 s5000
X21.9 Y0 s5000
X22 Y0 s5000
X22.1 Y0 s5000
X22.2 Y0 s5000
X22.3 Y0 s5000
X22.4 Y0 s5000
X22.5 Y0 s5000
X22.6 Y0 s5000
X22.7 Y0 s5000
X22.8 Y0 s5000
X22.9 Y0 s5000
X23 Y0 s5000
X23.1 Y0 s5000
X23.2 Y0 s5000
X23.3 Y0 s5000
X23.4 Y0 s5000
X23.5 Y0 s5000
X23.6 Y0 s5000
X23.7 Y0 s5000
X23.8 Y0 s5000
X23.9 Y0 s5000
X24 Y0 s5000
X24.1 Y0 s5000
X24.2 Y0 s5000
X24.3 Y0 s5000
X24.4 Y0 s5000
X24.5 Y0 s5000
X24.6 Y0 s5000
X24.7 Y0 s5000
X24.8 Y0 s5000
X24.9 Y0 s5000
X25 Y0 s5000
X25.1 Y0 s5000
X25.2 Y0 s5000
X25.3 Y0 s5000
X25.4 Y0 s5000
X25.5 Y0 s5000
X25.6 Y0 s5000
X25.7 Y0 s5000
X25.8 Y0 s5000
X25.9 Y0 s5000
X26 Y0 s5000
X26.1 Y0 s5000
X26.2 Y0 s5000
X26.3 Y0 s5000
X26.4 Y0 s5000
X26.5 Y0 s5000
X26.6 Y0 s5000
X26.7 Y0 s5000
X26.8 Y0 s5000
X26.9 Y0 s5000
X27 Y0 s5000
X27.1 Y0 s5000
X27.2 Y0 s5000
X27.3 Y0 s5000
X27.4 Y0 s5000
X27.5 Y0 s5000
X27.6 Y0 s5000
X27.7 Y0 s5000
X27.8 Y0 s5000
X27.9 Y0 s5000
X28 Y0 s5000
X28.1 Y0 s5000
X28.2 Y0 s5000
X28.3 Y0 s5000
X28.4 Y0 s5000
X28.5 Y0 s5000
X28.6 Y0 s5000
X28.7 Y0 s5000
X28.8 Y0 s5000
X28.9 Y0 s5000
X29 Y0 s5000
X29.1 Y0 s5000
X29.2 Y0 s5000
X29.3 Y0 s5000
X29.4 Y0 s5000
X29.5 Y0 s5000
X29.6 Y0 s5000
X29.7 Y0 s5000
X29.8 Y0 s5000
X29.9 Y0 s5000
X30 Y0 s5000
X30.1 Y0 s5000
X30.2 Y0 s5000
X30.3 Y0 s5000
X30.4 Y0 s5000
X30.5 Y0 s5000
X30.6 Y0 s5000
X30.7 Y0 s5000
X30.8 Y0 s5000
X30.9 Y0 s5000
X31 Y0 s5000
X31.1 Y0 s5000
X31.2 Y0 s5000
X31.3 Y0 s5000
X31.4 Y0 s5000
X31.5 Y0 s5000
X31.6 Y0 s5000
X31.7 Y0 s5000
X31.8 Y0 s5000
X31.9 Y0 s5000
X32 Y0 s5000
X32.1 Y0 s5000
X32.2 Y0 s5000
X32.3 Y0 s5000
X32.4 Y0 s5000
X32.5 Y0 s5000
X32.6 Y0 s5000
X32.7 Y0 s5000
X32.8 Y0 s5000
X32.9 Y0 s5000
X33 Y0 s5000
X33.1 Y0 s5000
X33.2 Y0 s5000
X33.3 Y0 s5000
X33.4 Y0 s5000
X33.5 Y0 s5000
X33.6 Y0 s5000
X33.7 Y0 s5000
X33.8 Y0 s5000
X33.9 Y0 s5000
X34 Y0 s5000
X34.1 Y0 s5000
X34.2 Y0 s5000
X34.3 Y0 s5000
X34.4 Y0 s5000
X34.5 Y0 s5000
X34.6 Y0 s5000
X34.7 Y0 s5000
X34.8 Y0 s5000
X34.9 Y0 s5000
X35 Y0 s5000
X35.1 Y0 s5000
X35.2 Y0 s5000
X35.3 Y0 s5000
X35.4 Y0 s5000
X35.5 Y0 s5000
X35.6 Y0 s5000
X35.7 Y0 s5000
X35.8 Y0 s5000
X35.9 Y0 s5000
X36 Y0 s5000
X36.1 Y0 s5000
X36.2 Y0 s5000
X36.3 Y0 s5000
X36.4 Y0 s5000
X36.5 Y0 s5000
X36.6 Y0 s5000
X36.7 Y0 s5000
X36.8 Y0 s5000
X36.9 Y0 s5000
X37 Y0 s5000
X37.1 Y0 s5000
X37.2 Y0 s5000
X37.3 Y0 s5000
X37.4 Y0 s5000
X37.5 Y0 s5000
X37.6 Y0 s5000
X37.7 Y0 s5000
X37.8 Y0 s5000
X37.9 Y0 s5000
X38 Y0 s5000
X38.1 Y0 s5000
X38.2 Y0 s5000
X38.3 Y0 s5000
X38.4 Y0 s5000
X38.5 Y0 s5000
X38.6 Y0 s5000
X38.7 Y0 s5000
X38.8 Y0 s5000
X38.9 Y0 s5000
X39 Y0 s5000
X39.1 Y0 s5000
X39.2 Y0 s5000
X39.3 Y0 s5000
X39.4 Y0 s5000
X39.5 Y0 s5000
X39.6 Y0 s5000
X39.7 Y0 s5000
X39.8 Y0 s5000
X39.9 Y0 s5000
X40 Y0 s5000

M05
x50 y0

$T120=400
$T121=400
G01 X0.00 Y0.00

FargoPhil
Posts: 62
Joined: Wed May 20, 2015 2:40 pm

Re: acceleration

Post by FargoPhil » Sun Oct 11, 2015 4:27 am

Looks like I'll just need to wait until the new laser support comes out. I was expecting that the spindle speed change motion stops would be overcome by a crazy high acceleration. I was expecting to hear buttery smooth motion regardless of spindle changes. I may dig around a bit more to see if I can remove the dwell, but it's likely that the official version will be better anyway.

Thanks
Phil

FargoPhil
Posts: 62
Joined: Wed May 20, 2015 2:40 pm

Re: acceleration

Post by FargoPhil » Sun Oct 11, 2015 4:43 pm

I'm learning what you guys already know. The reason the spindle stops is because the buffer gets flushed before the pwm is changed. I still haven't quite figured out the flow of things, but my guess is that's because the spindle change command is being executed when it is first received over serial, NOT when it's turn comes up in the queue.

FargoPhil
Posts: 62
Joined: Wed May 20, 2015 2:40 pm

Re: acceleration

Post by FargoPhil » Tue Dec 29, 2015 6:22 pm

chamnit wrote:I am working on a laser mode for Grbl (for real). It'll likely be available as a compile-time option, but I can't tell you exactly when it'll be released. My day job is crazy at the moment and there isn't relief until November. I would say Thanksgiving for a beta release, if not earlier.
I've been watching the grbl commit logs for this.. Any updates on when we might be able to take the beta for a spin?

Thanks,
Phil

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: acceleration

Post by chamnit » Wed Dec 30, 2015 3:49 pm

I'm working on it right now. I'm not posting any new code until I'm closer to a public beta release for testing. I'm hoping I can get things installed and cleaned up in the next couple of weeks. We'll see.

FargoPhil
Posts: 62
Joined: Wed May 20, 2015 2:40 pm

Re: acceleration

Post by FargoPhil » Wed Dec 30, 2015 4:01 pm

No worries, take your time. Thanks!

Post Reply