Whacky grbl 0.9 issue

Discussion about the arduino based g-code interpreter, grbl
cyberreefguru
Posts: 14
Joined: Sun Jan 18, 2015 4:30 pm
Location: USA

Whacky grbl 0.9 issue

Post by cyberreefguru » Tue Feb 10, 2015 1:08 am

Hello everyone. I just upgraded to grbl 0.9g (grbl_v0_9g_atmega328p_16mhz_115200_for_SO2.hex). Everything was working fine before the upgrade and I can jog and move the machine manually after the upgrade. After the upgrade I decided to run some previous jobs to test the accuracy and ensure my steps/mm are still correct. With grbl 0.9, the same nc file that worked in 0.8 does not work at all. The machine moves about 2 mm to the right and about 0.2mm -z then just and sits there without moving at all. I see the commands flying by in UGS - much faster than under 0.8. I also noticed a couple errors at the beginning of the file. So I'm wondering two things:

1) Is UGS sending the commands too fast or something?
2) Are the gcode errors causing the program to not run correctly (it renders properly in UGC and OpenSCAM).

I've attached the nc file and here is what UGS is reporting at the beginning:

Code: Select all

**** Connected to /dev/tty.usbmodem1421 @ 115200 baud ****

Grbl 0.9g ['$' for help]
>>> G10 P0 L20 X0 Y0 Z0
ok
>>> G21 G91 G0  Z2
ok
>>> G90
Skipping command #3
>>> G20G90G40
Skipping command #5
>>> G0Z0.125
>>> T0M6
>>> G17
ok
>>> M3
>>> G0X0.0881Y0.0444
>>> G1Z-0.02F7
>>> G3X0.0925Y0.0531I-0.0253J0.0184F15
error: Unsupported command
>>> G3X0.094Y0.0628I-0.0297J0.0096
ok
>>> G1X0.094Y0.0628
error: Unsupported command
ok
Skipping command #161
Skipping command #314
Skipping command #467
Skipping command #620
Skipping command #773
Skipping command #926
Skipping command #1079
ok
ok

<<a lot more gcode>>

>>> G3 X8.0328 Y0.0531 I0.0313 J0
ok
>>> G3 X8.0372 Y0.0444 I0.0297 J0.0096
ok
>>> G3 X8.0441 Y0.0375 I0.0253 J0.0184
ok
ok
>>> G3 X8.0528 Y0.033 I0.0184 J0.0253
>>> G0 Z0.125
>>> M5
>>> M30
ok
ok
ok
ok
ok

**** Finished sending file. ****
I am using UGS 1.0.8 nightly 2015-02-19 (previous version 1.0.7 would not reset zero properly).

For the record, I changed the UGS settings to keep whitespace and it didn't change anything (doubted that was the problem). I'm really at a loss. Any suggestions?

Really appreciate any help you can give. Thanks.

-Tom
Attachments
circle_long.nc
(38.55 KiB) Downloaded 97 times
--
Shapeoko 2 #7976; acme z-axis; grbl 0.9g; UGS 1.0.8
Workflow 1: Eagle -> Gerbv -> Inkscape -> MC -> OpenSCAM -> grbl
Workflow 2: Inkscape -> MC -> OpenSCAM -> grbl

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

Re: Whacky grbl 0.9 issue

Post by cvoinescu » Tue Feb 10, 2015 1:50 am

The problem is with the G20G90G40 line. It has three commands on it: G20 switch to inch mode, G90 switch to absolute mode, G40 cancel tool radius compensation. G40 is not supported by GRBL. When GRBL 0.8 encountered an unsupported command, it simply ignored it. However, the standard recommends that a line is either executed in its entirety, or not at all, so GRBL 0.9 changed to reject the entire line if it contains any error, including an unsupported command. This behavior, while correct, has the side effect of ignoring the G20 "switch to inches" command, so all dimensions in the rest of the file are treated as millimeters. Your machine works, only it tries to make something about 25 times smaller than intended.

Edit the .nc file and remove the G40 from that line. That should fix the problem.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

cyberreefguru
Posts: 14
Joined: Sun Jan 18, 2015 4:30 pm
Location: USA

Re: Whacky grbl 0.9 issue

Post by cyberreefguru » Tue Feb 10, 2015 3:10 am

Thanks for the reply. After much more searching, I came to the same conclusion as you. I deleted the G40 and all works fine.

Many thanks!

-Tom
--
Shapeoko 2 #7976; acme z-axis; grbl 0.9g; UGS 1.0.8
Workflow 1: Eagle -> Gerbv -> Inkscape -> MC -> OpenSCAM -> grbl
Workflow 2: Inkscape -> MC -> OpenSCAM -> grbl

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

Re: Whacky grbl 0.9 issue

Post by chamnit » Tue Feb 10, 2015 3:29 pm

FYI all, Grbl v0.9h will be pushed to master later this week. It now supports G40 commands. Hopefully this issue will no longer be a problem.

mortonwoodworks
Posts: 9
Joined: Mon Jan 27, 2014 7:36 pm
Location: Central Illinois, USA
Contact:

Re: Whacky grbl 0.9 issue

Post by mortonwoodworks » Wed Mar 11, 2015 7:01 pm

When will the "H" release be public? I just went to the GITHUB site and it still has "G" as the latest.

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

Re: Whacky grbl 0.9 issue

Post by chamnit » Wed Mar 11, 2015 7:49 pm

Sorry got sidetracked by multiple things. I'll need to review where I last left off, but it's safe to use the edge branch v0.9i. It supports G40 (and G91.1). I think was I was waiting to find time to install a couple for things, but I'll just have to push to master and work on a new version. Just so that this problem is solved.

mortonwoodworks
Posts: 9
Joined: Mon Jan 27, 2014 7:36 pm
Location: Central Illinois, USA
Contact:

Re: Whacky grbl 0.9 issue

Post by mortonwoodworks » Thu Mar 12, 2015 2:07 am

Where can I get this "I" version? Under the Master Branch section of the GITHUB website it has Grbl v0.9g. I'd like the version "I" that you are speaking of that works with G40, but would like the ShapeOko2 defaults like the website has. Sorry if this sounds like I want to have my cake and eat it too, I'm just not super confident in these types of programming changes.

JohnSielaff
Posts: 3
Joined: Sun May 18, 2014 1:48 pm

Re: Whacky grbl 0.9 issue

Post by JohnSielaff » Fri Apr 17, 2015 1:56 am

I am having problems with my machine also. It will move by jogging but it will not move if you run a file. Have I made the right changes to the .09 or where am I going wrong? I have a 1m by 1 m machine with nema 23's at my x and y but not Z and I am running grbl with a g shield. It worked fine but slow at .08 but I can not seem to get .09 to work.
Arduino .09 changed files
$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=3 (dir port invert mask:00000011)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.050 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$14=1 (auto start, bool)
$20=0 (soft limits, bool)
$21=0 (hard limits, bool)
$22=0 (homing cycle, bool)
$23=3 (homing dir invert mask:00000011)
$24=25.000 (homing feed, mm/min)
$25=750.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=40.000 (x, step/mm)
$101=40.000 (y, step/mm)
$102=320.000 (z, step/mm)
$110=8000.000 (x max rate, mm/min)
$111=8000.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=500.000 (x accel, mm/sec^2)
$121=500.000 (y accel, mm/sec^2)
$122=50.000 (z accel, mm/sec^2)
$130=790.000 (x max travel, mm)
$131=790.000 (y max travel, mm)
$132=100.000 (z max travel, mm)
ok

Mrevoir
Posts: 31
Joined: Fri Aug 22, 2014 4:21 pm

Re: Whacky grbl 0.9 issue

Post by Mrevoir » Fri Apr 17, 2015 4:00 pm

Your acceleration is crazy fast. Mine is set at 50.

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

Re: Whacky grbl 0.9 issue

Post by chamnit » Fri Apr 17, 2015 4:15 pm

@mortonwoodworks : You can have your cake and eat it too! :) Everything has been coded, tested, and pushed to master for about a month. I generally don't willy-nilly push a master release of code unless it's been tested. But for the record, adding the G40 code support is trivial and you don't need to worry about that.

@JohnSielaff : You'll need to be a little more descriptive on what's going on and why it's not working. Do the motor run? How far into a streaming g-code program do you get? Does it not turn on at all? etc. etc.

Post Reply