Getting invalid g-code error 20 in ugs

Getting invalid g-code error 20 in ugs

Anonymous
Not applicable
12,765 Views
13 Replies
Message 1 of 14

Getting invalid g-code error 20 in ugs

Anonymous
Not applicable

Hi everyone. This is my first time using fusion360 for cam and I am getting an invalid g-code error from universal g-code sender:( (error:20) Unsupported or invalid g-code command found in block.(error:20) Unsupported or invalid g-code command found in block.) I am using a bob'scnc e3 machine. I have attached the g-code file as a .txt to see if anyone has any idea of what is wrong. Thank you.

0 Likes
12,766 Views
13 Replies
Replies (13)
Message 2 of 14

daniel_lyall
Mentor
Mentor

Do you know what G code is the problem 


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 3 of 14

Anonymous
Not applicable

I'm not really sure but I think that the last line that runs is line 21:

G3 X1.9644 Y0.04 Z0.1078 I-0.0153 J-0.0397 F30

Also i'm using the generic GRBL post processor

0 Likes
Message 4 of 14

daniel_lyall
Mentor
Mentor

Can you post a model this happens on as well, To do this Go to File -> Export and save as a .F3D Archive File and attach it to your next post.

 

The more info you can post the better the support you can get is more facts and less guess work. 

 

If you Google GRBL G3 you can find a lot of post on this problem.

 

I would do this before changing anything in the post there is a lot of reasion and G code sample where this fail happens.


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 5 of 14

Anonymous
Not applicable

Sure it has happened on both of these models(these are my first two models). Thank you for the help by the way.

0 Likes
Message 6 of 14

daniel_lyall
Mentor
Mentor

it is something to do with the G1, G2 and G3  moves a common reasion will need to be found so a permanent fix can be done to the post. what ADSK may do


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 7 of 14

Anonymous
Not applicable

What??

 

I'm having the same problem and can't find a fix. 

0 Likes
Message 8 of 14

Anonymous
Not applicable

Sorry I meant to post the solution I found. At the beginning of the g-code, there is a tool change command and my machine doesn't support tool changes. I just deleted these lines 

M9
T1 M6
S30000 M3
G54

at the beginning and it worked.

Message 9 of 14

Anonymous
Not applicable
Thank you!!! That was the issue.

Is there a plan to create a post that doesn't include tool changes? It would be great if I didn't have to go in and delete the code for every project.

Thanks again!
Message 10 of 14

rmfolsom
Participant
Participant

Seems two years later that this problem still persists. I checked all my setting and no where can I find that tool change has been selected, not in the setup, not in the machine, not in the tools.  In my case the code is slightly different, but removing it worked.  No clue where the half inch end mill came from.  I do not have one and it is not in any of my settings.  Fusion seems to be just making sh*t up as it goes. Basic GRBL should be basic.

 

T2 M6
(0pt5 Inch End Mill)
S12000 M3
G54

0 Likes
Message 11 of 14

seth.madore
Community Manager
Community Manager

Hello and thank you for bringing your question to the forums!

Do you have a file that you can share?

Right click on the file in the Data Panel and select "Share Public Link". Copy the link and paste it here. 


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 12 of 14

rmfolsom
Participant
Participant
0 Likes
Message 13 of 14

seth.madore
Community Manager
Community Manager

The UGS and grbl itself will ignore the T# call out. It is M6 that causes trouble. However, some g codes senders, like the Carbide 3d, do take an M6 since carbide 3d supports that command, which is why it is still in the post.

 

If you download the most recent grbl post from the download website it should have the M6 turned off by default. It just has not been updated in the local library yet (6/11/2020). https://cam.autodesk.com/hsmposts?p=grbl

 

-EDIT-

Carbide 3D users should seek out the proper Carbide 3D post processor.


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 14 of 14

rmfolsom
Participant
Participant
Thx for following up.  The updated post file did indeed remove the M6 and the file now loads into UGS Platform Nightly Build without edits.  First few lines of a very simple project are below.  Still wondering where (0pt5 Inch End Mill) is coming from?  I do not have a 1/2" bit in my Tool Library.
 
I am hobbyist running a MillRight Mega V.  Workflows are only something I dream about.  Everything is manual.
 
(Hello World)
(Can be cut with an eighth or quarter inch vee, ball or end mill)
(Machine)
(  vendor: Millright)
(  model: Mega V 19x19)
(  description: Generic 3-axis, MDF Bed, Homing Switches)
(T2  D=6.35 CR=0 - ZMIN=-2 - flat end mill)
G90 G94
G17
G21
G28 G91 Z0
G90

(TraceBoarder)
T2
(0pt5 Inch End Mill)
S12000 M3
G54
G0 X37.789 Y146.148
Z15
Z5
G1 Z-2 F1000
X243.521
X244.281 Y146.129

Cheers,
Randy
0 Likes