Error in default LinuxCNC Post (not setting G0/G1 after G80)

Error in default LinuxCNC Post (not setting G0/G1 after G80)

Cederb
Explorer Explorer
1,792 Views
13 Replies
Message 1 of 14

Error in default LinuxCNC Post (not setting G0/G1 after G80)

Cederb
Explorer
Explorer

When generating a drill cycle in Fusion 360, LinuxCNC suddenly stops and gives me a "cannot use axis values without a g code that uses them" error.

 

The code looks like this:

 

(3004_DRILL_3.5MM)
(T2 D=3.5 CR=0. TAPER=118DEG - ZMIN=-4.052 - DRILL)
G90 G94 G91.1 G40 G49 G17
G21

(DRILL3)
M5
M9
T2 M6
S2000 M3
G54
M9
G0 X108.02 Y4.3
Z25.
G98 G81 X108.02 Y4.3 Z-3.052 R25. F10.
G80
X68.8 Y17.884 Z25.
Z24.
G81 X68.8 Y17.884 Z-4.052 R24. F10.
Y42.884
G80
Z25.
G81 X108.02 Y67.38 Z-3.052 R25. F10.
X4.3
Y4.3
G80
Z15.

M9
M30

The problem is that it cancels the G81 cycle with the G80 command and then tries to move the axis without setting the correct G0/G1 for movement, so LinuxCNC does not know what to do with the axis values it is fed.

0 Likes
1,793 Views
13 Replies
Replies (13)
Message 2 of 14

dave.anderson
Autodesk
Autodesk

You might have better luck on this by posting in the CAM Post Forum if you have not:
https://camforum.autodesk.com/index.php?board=3.0



Dave Anderson
Sr. Support Engineer– CAM
Autodesk, Inc.


0 Likes
Message 3 of 14

Steinwerks
Mentor
Mentor
Just as a note, standard G-code does not require the setting of G0 after a canned cycle if the modal feed code before it was G0. It should default to G0 (or G1 if it was in feedrate as opposed to rapid). What machine is this? Can you see if there's a setting that changes the modal operation?
Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes
Message 4 of 14

Anonymous
Not applicable

Have your post been edited or is this the stock one that comes with Fusion?

 

Looking at the code, whenever a G80 occurs the gMotionModal is reset.  This means that for the next move a G0-G3 should be generated.

 

function onCycleEnd() {
  if (!cycleExpanded) {
    writeBlock(gCycleModal.format(80));
    gMotionModal.reset();
  }
}

There is only one place in the post that I see where an axis move is created without a gMotionModal first occuring and that is within a cycle after the first move...

 

Are you able to share your model here so this can be recreated to better help troubleshoot?

 

Dave

 

 

0 Likes
Message 5 of 14

calexpavel
Advocate
Advocate

I know the post is old, but i have the same problem and i was wondering what solution have you found.

0 Likes
Message 6 of 14

daniel_lyall
Mentor
Mentor

details please


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

calexpavel
Advocate
Advocate

It wasn't adding a g0 or g1 command after g80, but i have added 

gMotionModal.reset()

at the end of

onCycleEnd()

function and now it works. 
Thanks! 

Message 8 of 14

Anonymous
Not applicable

G1, G2, G3, G0 are modal commands, in effect until changed to another G code in same group.

G80 cancels canned cycle, not last G0 or any of the other codes.

So I am curious, what's the point in having redundant code? is this unique to Mach3 or just "preference" in the way you want your code to look?

I have come across all possible formats that mean nothing to machine but define someones style and preference.

Things like repeated G1 on each line along the cutting path,.......or Z0.00, still no more and no less then Z0 just more clutter.

Message 9 of 14

calexpavel
Advocate
Advocate

I have very little knowledge about g code, but i had this error before adding that line on my post code, and now i don't  get it anymore, so i guess it wanted G0 or G1 again. I have no idea...WhatsApp Image 2019-06-20 at 20.00.10.jpeg

0 Likes
Message 10 of 14

Anonymous
Not applicable

Well, that's interesting, some controllers have different rules, I have zero experience with oddball equipment, except for Anilam, still trying to forget everything I learn about it. 

0 Likes
Message 11 of 14

seth.madore
Community Manager
Community Manager

@Anonymous wrote:

..except for Anilam, still trying to forget everything I learn about it. 


Good luck with that. It's been 20 years since I ran a 3200M control and I can see the menus and dialog boxes like it was yesterday...


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 12 of 14

Anonymous
Not applicable

Your ignorance index is too low, focus on something else just as dumb then mix it all together and,....... PUF...... gone.

0 Likes
Message 13 of 14

daniel_lyall
Mentor
Mentor

Linux can be a bit funny like that.


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 14 of 14

dylantrinh
Observer
Observer

Bump to an old topic but this worked for me also. Thank you or the help. I added it to the last line of "function onCycleEnd()"


@calexpavel wrote:

It wasn't adding a g0 or g1 command after g80, but i have added 

gMotionModal.reset()

at the end of

onCycleEnd()

function and now it works. 
Thanks! 


 

0 Likes