G code alarm with Fanuc 21i

G code alarm with Fanuc 21i

Anonymous
Not applicable
5,327 Views
10 Replies
Message 1 of 11

G code alarm with Fanuc 21i

Anonymous
Not applicable

Totally new to CNC in general. I'm using F360 to CAD and CAM parts on the lathe. So far all turning functions have worked fine. This is the first time trying a drill function. I'm getting a invalid G code alarm. Any suggestions what to change? IMG_0705.jpg

0 Likes
Accepted solutions (1)
5,328 Views
10 Replies
Replies (10)
Message 2 of 11

randyT9V9C
Collaborator
Collaborator

What post are you using? Is it turn specific post? 

 

The face drilling (z-axis) operation on a Fanuc lathe should be G83. Side drilling (x-axis) would use G81 on a lathe with live tooling. Editing the line in your g-code by hand and it should work.

Message 3 of 11

Anonymous
Not applicable

The post is the generic Fanuc turn from the online library. I did see something about live tool I thought I unchecked it. I'll give it a shot and report back lunch time now!!!

0 Likes
Message 4 of 11

randyT9V9C
Collaborator
Collaborator

I looked at the post. If you change the the drill cycle to Deep Drilling -Full Retract it will call G83. The other drilling operations are using G81 (drilling, counter-boring, etc).

 

The cycle chip-breaking is calling G73 which on my lathe is a "closed-loop cutting cycle" and G74 is "Face cut-off cycle, deep hole drilling cycle." As a result I'm not sure about the chip-breaking cycle. 😉

 

If changing your routine to G83 works then you should modify the post.

 

 

0 Likes
Message 5 of 11

Anonymous
Not applicable

Changing the G81 to G83 worked on the peck drill and drill function. Now I got flagged for illegal use of decimal point. In the final small hole .1015" drill with chip break. F360 did call up G73 to start the program.IMG_0721 (2).JPG

0 Likes
Message 6 of 11

randyT9V9C
Collaborator
Collaborator

My Fanuc 0i manual states G73 is milling and G83 is turning. Change the value in line 938 to gCycleModal.format(83) instead of 73.

 

I'm also suspect of the counter-boring using G82 on a lathe. I'll need to check my control, but I suspect that needs to be changed also.

 

The issue is that the Generic Fanuc Turn clearly was based off the milling post and there are still a lot of DNA still present. Like most generic posts. Test and change to your machine environment.

 

Some of these changes clearly need to be pushed up into the current generic post because as your finding, it's pretty rough at present.

 

One of these days I'll get around to building a post for my lathe with a Fanuc 0i control.

 

 

0 Likes
Message 7 of 11

Anonymous
Not applicable

I replaced the G73 with G83 and I'm still getting a illegal use of a decimal point. 

0 Likes
Message 8 of 11

randyT9V9C
Collaborator
Collaborator
Accepted solution

Illegal use of a decimal point normally denotes a double decimal point or usage in a value that must be an integer.

 

I'm pretty sure the Q value must not be a decimal. Normally, Q1000 would be 0.1 when using inches. Q has to be in steps of 0.0001 inch (or in microns in millimeter mode). So the line should be Q256. In you post you will need to multiply that value by 10000 to get an integer.

 

I downloaded you Fanuc 21i manual and it appear G74 and G83 are both face drilling operations. 😉

Message 9 of 11

Anonymous
Not applicable

My book says (P, Q Calling of compound repeat cycle, end number)
 

0 Likes
Message 10 of 11

randyT9V9C
Collaborator
Collaborator

This is the G83 drilling example from the manual Series 21i-TB/210i-TB http://cncmanual.com/download/39/ Note that YMMV. See how P and Q are integers without decimal places. Take the peck value or dwell value and multiply by 10000.

 

G83 Z–40.0 R–5.0 Q5000 F5.0 M31 ; Drilling hole 1

G83 Z–40.0 R–5.0 P500 F5.0 M31 ; Drilling hole 1

 

What about "End Face Peck Drilling Cycle (G74)"?

http://www.helmancnc.com/simple-cnc-lathe-drilling-with-fanuc-g74-peck-drilling-cycle/

 

It's possible that G73 could be valid but G74 looks more promising.

Closed–loop turning cycle
G73P_Q_U_W_I_K_D_F_S_T_;
I : Length and direction of clearance along the X–axis (radius)
K : Length and direction of clearance along the Z–axis
D : Number of divisions

 

Unfortunately my lathe conversational doesn't used the canned function so I have little to reference.

0 Likes
Message 11 of 11

Anonymous
Not applicable

Changing the Q value did the trick on the illegal use of a decimal point. 

Thank you !!! 

Now the working cycle is painfully slow. But I got that fixed now.

0 Likes