Invalid gcode ID:26

Post Reply
Shook
Posts: 139
Joined: Thu Nov 12, 2015 6:50 pm
Location: Downingtown, PA

Invalid gcode ID:26

Post by Shook » Sun Jul 17, 2016 6:53 pm

Question: What do I need to do in F-Engrave to get the gcode to execute in bCNC

Background:
I was trying to print a sign for our local Cub Scout pack. I did up a quick design in Inkscape and ran it through F-Engrave. I did a test run through Universal G-Code sender and noticed that the right of the sign wasn't as deep as the left. I figured I should give bCNC another try and see how the auto-levelling works.

I wrapped the workpiece in foil, probed and zero'ed, but every time I tried to send the file, I got "Invalid gcode ID:26". I fiddled with bCNC, tried the "check gcode" command, but in the end I gave up on bCNC and went back to UGS.
Attachments
ScoutSign.ngc
(92.83 KiB) Downloaded 54 times
Shapeoko 3 (#1107)

CastIrony
Posts: 650
Joined: Mon Jul 21, 2014 10:21 pm
Location: Portland, OR

Re: Invalid gcode ID:26

Post by CastIrony » Mon Jul 18, 2016 2:26 am

There's a 'G64' command in your file, which is not one of the allowed Grbl commands.

In F-Engrave settings, remove that command from the 'G Code Header' field.
Shapeoko 3 #192 - Complete! Needs limit switches.

Shook
Posts: 139
Joined: Thu Nov 12, 2015 6:50 pm
Location: Downingtown, PA

Re: Invalid gcode ID:26

Post by Shook » Mon Jul 18, 2016 7:00 pm

Thanks! I'll take a look at that. There didn't seem to be a line number or anything else pointing to the offending line, so for me it was like searching for a needle in a haystack.

Out of curiosity - how did you find it? Sharper eyes or just that familiar with the Grbl set of commands.
Shapeoko 3 (#1107)

CastIrony
Posts: 650
Joined: Mon Jul 21, 2014 10:21 pm
Location: Portland, OR

Re: Invalid gcode ID:26

Post by CastIrony » Mon Jul 18, 2016 9:54 pm

Most of the file is made of G0-G3 commands, which should be valid, so I ignored them.

The lines at the start of the file are surrounded by parentheses, which makes grbl ignore them.

That left the following:

Code: Select all

G90
G91.1
G20
G17 G64 P0.001 M3 S3000
I recognized a few of those, and compared the rest to the list of valid codes:
List of Supported G-Codes in Grbl v0.9 Master:
- Non-Modal Commands: G4, G10L2, G10L20, G28, G30, G28.1, G30.1, G53, G92, G92.1
- Motion Modes: G0, G1, G2, G3, G38.2, G38.3, G38.4, G38.5, G80
- Feed Rate Modes: G93, G94
- Unit Modes: G20, G21
- Distance Modes: G90, G91
- Arc IJK Distance Modes: G91.1
- Plane Select Modes: G17, G18, G19
- Tool Length Offset Modes: G43.1, G49
- Cutter Compensation Modes: G40
- Coordinate System Modes: G54, G55, G56, G57, G58, G59
- Control Modes: G61
- Program Flow: M0, M1, M2, M30*
- Coolant Control: M7*, M8, M9
- Spindle Control: M3, M4, M5
- Valid Non-Command Words: F, I, J, K, L, N, P, R, S, T, X, Y, Z
G64 wasn't on the list, and when I looked it up, it was pretty clearly not a grbl-supported feature.
Shapeoko 3 #192 - Complete! Needs limit switches.

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: Invalid gcode ID:26

Post by Will Winder » Thu Jul 21, 2016 6:30 pm

I added a long overdue feature to UGS recently (in the nightly build). Grbl is a lot more strict about these sorts of errors than it used to be.
Attachments
skip_error.png
skip_error.png (54.42 KiB) Viewed 1769 times
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

Shook
Posts: 139
Joined: Thu Nov 12, 2015 6:50 pm
Location: Downingtown, PA

Re: Invalid gcode ID:26

Post by Shook » Fri Aug 05, 2016 2:10 pm

Thanks - I'm long overdue to pull down the latest version of UGS. I think the version I'm using is a beta from December 2015
Shapeoko 3 (#1107)

CastIrony
Posts: 650
Joined: Mon Jul 21, 2014 10:21 pm
Location: Portland, OR

Re: Invalid gcode ID:26

Post by CastIrony » Fri Aug 05, 2016 3:27 pm

Will Winder wrote:I added a long overdue feature to UGS recently (in the nightly build). Grbl is a lot more strict about these sorts of errors than it used to be.
That's really cool!

I get why Grbl is so strict about these commands (their presence or not might totally change the tool path in dangerous ways) but the vast majority of them are just turning on some barely-related feature that Grbl doesn't even have.
Shapeoko 3 #192 - Complete! Needs limit switches.

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

Re: Invalid gcode ID:26

Post by cvoinescu » Fri Aug 05, 2016 4:13 pm

One of the recent changes in GRBL was to support some of those commands that "do nothing" (that is, cancel modes and features that aren't supported by GRBL anyway, or switch them to "no effect" settings). For example, even if GRBL does not support cutter compensation, there's no harm in allowing the code to disable cutter compensation -- that will only serve to make more G-code programs run on GRBL without modification. So we're getting there.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

CastIrony
Posts: 650
Joined: Mon Jul 21, 2014 10:21 pm
Location: Portland, OR

Re: Invalid gcode ID:26

Post by CastIrony » Fri Aug 05, 2016 5:32 pm

Yeah, G64 is one of the weird edge cases where it's enabling an unsupported feature, but making it a no-op wouldn't really hurt anything, but that might give people the mistaken impression that Grbl supports the feature.

I'm not sure there is a way to handle commands like that better than how Grbl does now.

EDIT: And looking at the list, it might be the only command that actually falls in that category.
Shapeoko 3 #192 - Complete! Needs limit switches.

Post Reply