Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

G3 and G41 programming issue


honeybunches
 Share

Recommended Posts

I will post two examples of code that does not work and I think only because the G41 and G3 land on the same line of code. However, We really need to know "where" to put it. There is not an X Y value above to put it on so not sure how to fix this. This code is being generated by the multi offset post from this site and one other post. Machine is a Haas VMC

 

I would also like to know if there is any advantage to R code as opposed to I J? We have a serious lag issue on an older machine and I think it is having trouble keeping up so I would think the less data, the better but not sure on this one.

 

Here is the example of what we are running now. This code runs the correct path but as soon as we enter a non-zero in the comp tables, the machine will error out. Indication is the G41 and G3 are on the same line. The "counterbore" is the area that will not execute

 

(DEFINE TOOL NAMES - DRILL/CBORE)

N100 G00 G90 X2.519 Y-.725

N110 Z1.

N120 G98 G81 Z.19 R.6 F40.

N130 Y-1.875

N140 G80

N150 (COUNTERBORE)

N160 S7500

N170 G00

N180 X2.855

N190 Z.6

N200 G01 Z.5 F200.

N210 G41 D6 G03 Y-1.793 I0. J.041 F90.

N220 Y-1.957 Z.45 I0. J-.082

N230 Y-1.793 Z.4 I0. J.082

N240 Y-1.957 I0. J-.082 F63.

N250 Y-1.793 I0. J.082

N260 G40 Y-1.875 I0. J-.041

N270 G00 Z1.

N280 Y-.725

N290 Z.6

N300 G01 Z.5 F200.

N310 G41 D6 G03 Y-.643 I0. J.041 F90.

N320 Y-.807 Z.45 I0. J-.082

N330 Y-.643 Z.4 I0. J.082

N340 Y-.807 I0. J-.082 F63.

N350 Y-.643 I0. J.082

N360 G40 Y-.725 I0. J-.041

N370 G00 Z1.

N380 (PROFILE TRIM)

 

 

Here is an example of the R code from another post and this will not run at all and will error out during the "counterbore" op. Tool will just start an arc and then error out. This one does not have the G41 on the G3 line but still will not run.

 

 

N1270 ( Drill tool holes with EM )

N1280 T06 M6 ( )

N1290 M8

N1300 G0 G90 G54 X2.519 Y-.725 S3000 M3

N1310 G43 H06 Z1.

N1320 G98 G81 X2.519 Y-.725 Z.19 R.6 F40.

N1330 Y-1.875

N1340 G80

N1350 ( Counterbore )

N1360 S7500

N1370 G54 G0 X2.855 Y-1.834

N1380 Z.6

N1390 G17 G1 Z.5 F200.

N1400 G41 D06 Y-1.875 F90.

N1410 G3 Y-1.793 R.041

N1420 G3 Z.4 R-.082

N1430 G3 R-.082 F63.

N1440 G3 G40 Y-1.875 R.041

N1450 G0 Z1.

N1460 X2.855 Y-.684

N1470 Z.6

N1480 G1 Z.5 F200.

N1490 G41 D06 Y-.725 F90.

N1500 G3 Y-.643 R.041

N1510 G3 Z.4 R-.082

N1520 G3 R-.082 F63.

N1530 G3 G40 Y-.725 R.041

N1540 G0 Z1.

N1550 ( PROFILE TRIM )

 

 

Any help would be greatly appreciated. We are not sure if this is an MCX settings issue all the way or if this is a post issue. We are using X2MR2.

Link to comment
Share on other sites

Oops. That second one is wrong. We are using subs for these. here is the correct code that is having the problem. The first string is correct.

 

 

(SUB FOR T06 )

G98 G81 X2.519 Y-.725 Z.19 R.6 F40.

Y-1.875

G80

( counter bore pocket )

S7500

G0 Z1.1

X2.773 Y-1.875

G17 G1 Z.5 F200.

G3 G41 D06 Z.4 R-.082 F90.

G3 R-.082

G3 X2.7785 Y-1.8902 R.0236

G1 G40 X2.7861 Y-1.8992

G0 Z1.

Z1.1

X2.773 Y-.725

G1 Z.5 F200.

G3 G41 D06 Z.4 R-.082 F90.

G3 R-.082

G3 X2.7785 Y-.7402 R.0236

G1 G40 X2.7861 Y-.7492

G0 Z1.

( PROFILE TRIM )

Link to comment
Share on other sites

viper1

i have never had good luck with using R values i have had out of round issues with using it so i always use I and J

 

as far as the cutter comp thing the machine does not like to turn it on with an arc you need to have a G01 linear move to turn it on/off, on some older machines the distance it needed to move had to be greater than the offset amount

Link to comment
Share on other sites

what kind of path are you using in mcam? (contour, circle mill..)

If you're using contour, chain the center point, then the circle. In the lead in/out settings enable use entry point & use exit point and plunge after first/retract before last. this will execute the line move in the clearance plane where you'll get G40/41

 

If you're using circle mill enable the perpendicular entry option

Link to comment
Share on other sites

What I always do is us the "Lead In/Out"

I check "Perpendicular" on (entry and exit) and adjust the Line Lenght and/or the Radius to fit. to ensure a that I am in a G1

entry to force a G1 G41 and G1 G40.

And if you are using wear the lead in can be very short (a few thousenths).

Try it

Link to comment
Share on other sites

Old habits die hard! Long time ago someone on the board gave me that way to do it and it worked well. At the time I think circle mill had a problem with this very issue. I'm not sure. But I have been using it for a few years. I also use it to come down in the middle of some slots. Like I told you the other day I needed to start using circle mill.

Link to comment
Share on other sites

A couple of high-lighters inserted will show up when posting

 

code:

sworkoffseterror "ERROR - NO WORK CO-ORD SYSTEM APPLIED"

sspeederror "ERROR - RPM NOT SET CORRECTLY ?"

speck1error "ERROR - NO PECKS SET FOR DRILLING"

scutcomperror "ERROR - CUTTER COMP STARTS / FINISHES ON AN ARC"

code:

pwcs            #G54+ coordinate setting at toolchange

 

if mi1$ > 0,

[

sav_frc_wcs = force_wcs

if sub_level$ > 0, force_wcs = zero

if workofs$ <> prv_workofs$ | (force_wcs & toolchng),

[

#if workofs$ < 6,

# [

g_wcs = workofs$ # + one

"G15", *g_wcs

if workofs$ < 1, result = mprint(sworkoffseterror), sworkoffseterror, e$

#]

#else,

# [

# p_wcs = workofs$ - five

# "G54.1", *p_wcs

# ]

]

force_wcs = sav_frc_wcs

!workofs$

]

code:

 

pcirout #Output to NC of circular interpolation

if prv_cc_pos$ <> cc_pos$, result = mprint (scutcomperror), "ERROR-CUTTER COMP"

pcan1, pbld, n$, `sgfeed, sgplane, sgcode, sgabsinc,

pxout, pyout, pzout, pcout, parc, feed, strcantext, scoolant, e$ #pccdia removed

Link to comment
Share on other sites

One of the posts we have tried is the mutli offset post available here. I have tried both circle mill and contour. I originally chose circle so I could easily change my feedrate at the bottom of the helix. There is not tool for this in contour. When I used contour, I put a very small lead out on. I have never had good luck with trying to ramp cut (helix) with contour and slow the feed at the bottom.

 

Anyway, can someone recommend or show me what the corrected code should look like? Everyone has said just don't have the G3 on the G41 line but where do I put it??

 

I have also heard there are a few settings to adjust in MC that can help with this, is this true?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...