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:

Z RETRACT ISSUE


Recommended Posts

Hello everyone,
    I've been having trouble to have bad RETRACT at Z value.  G0 (rapid) X(value) Z(rapid) stays on the same line of which may cause diagonal retracts.  I have checked on the PRAPIDOUT and it is fine, is this issue come from MACHINE DEFINTION?  

 

 

Thank you for your help.


=========================================

G-CODES...


 

N16( .2500,1/4 CHMF, CB, 45.DEGS, .0010TIP,)
(2FLTS .125LOC, 1.50STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 
T16 M6(DEBURR  PROFILE, CUT#93)
G90 G55 X9.1505 Y9.
S7500 M3
(.025 CHAMFER SIZE, .025 TIP OFFSET)
G43 H16 Z1. M8(DOC= Z-.05)
Z.0625
G1 Z-.05 F100.
X9.0621 Y9.0884
G3 X9.0255 Y9. R.125
(CUTTING....)
G3 X9.0621 Y8.7866 R.125
G1 X9.1505 Y8.875
G0 Z1. =====> GOOD CODE
(*)
N1602(PART BOUNDRY LINES, CUT#94)
T16 M6( .2500,1/4 CHMF, CB, 45.DEGS, .0010TIP,)
(2FLTS .125LOC, 1.50STO)
G0 G90 G55 A0.
S7500 M3
G43 H16 Z1.(DOC= Z-.025)
X-6.5136 Y-6.4716
Z.0625
G1 Z-.025 F2.5
Y6.2856 F50.
X-6.5111 Y6.298
X-6.5046 Y6.3075
(CUTTING....)
G1 X-6.1386
G2 X-6.5137 Y-6.4716 R.375
G0 X-6.5136 Z1.  =====> BAD CODE
(*)
N1603(OP2 - PART BOUNDRY LINES, CUT#95)
T16 M6( .2500,1/4 CHMF, CB, 45.DEGS, .0010TIP,)
(2FLTS .125LOC, 1.50STO)
G0 G90 G55 A0.
S7500 M3
G43 H16 Z1.(DOC= Z-.025)
X-6.4436 Y-.7684
Z.0625
G1 Z-.025 F2.5
Y2.4356 F50.
G3 X-6.4825 Y2.6289 R.5
(CUTTING....)
X-6.4825 Y-.9617 R.3927
G3 X-6.4436 Y-.7684 R.5
G0 Z1.  =====> GOOD CODE
M9
G91 G28 Z0.
/G28 Y0.
M5
G0 G90 G55 X0.
M30(3,518CHARS - 3.53KB)
%
Link to comment
Share on other sites
14 minutes ago, Leon82 said:

You probably have to edit the prapidout block  so that z in in a second line.

 

After a second look I have seen that before but it's probably from geometry that is wacky.  It's only moving.0001 

Hi Leon82,
    I have looked into the PRAPIDOUT as you suggested and where do I add a second line for the PZOUT?


Thanks



=========================================

prapidout       #Output to NC of linear movement - rapid
      sav_gcode = gcode$
      if convert_rpd$ = one,
        [
        gcode$ = one
        feed = maxfeedpm
        ipr_type = zero
        ]
    #"DEBUG: ", ~mr3$, ~nextop$, e$
      if tool_op$ = 19, "M0(AGAINST PIN STOP HERE)", e$
      pcan1, pbld, n$, [if sgplane     <> sgplane, sgplane], `sgcode, [if sgplane     <> sgplane, sgabsinc], pccdia, [if gcode$ = 1, sgfeed]
        pxout, pyout, pzout, pcout, [if gcode$ = 1, `feed], strcantext, scoolant, e$
      gcode$ = sav_gcode
Link to comment
Share on other sites
42 minutes ago, PcRobotic said:

pxout, pyout, pzout, pcout, [if gcode$ = 1, `feed], strcantext, scoolant, e$

Here I would try. Move pzout.

 

But I think that will effect the rapid to the next cut. Not your retract from the current cut

  • Thanks 1
Link to comment
Share on other sites
33 minutes ago, Leon82 said:

Here I would try. Move pzout.

 

But I think that will effect the rapid to the next cut. Not your retract from the current cut

I am not sure my way is right, here is what I've done.  If you think I am wrong, I am welcome to take the compliment.


Thank you for your time and looking forward for your next responds.


======================================================

 

prapidout       #Output to NC of linear movement - rapid
      sav_gcode = gcode$
      if convert_rpd$ = one,
        [
        gcode$ = one
        feed = maxfeedpm
        ipr_type = zero
        ]
    #"DEBUG: ", ~mr3$, ~nextop$, e$
      if tool_op$ = 19, "M0(AGAINST PIN STOP HERE)"
	  
      pcan1, pbld, n$, [if plane$ > 0, plane$ = 1, sgplane], `sgcode, [if plane$ > 0, plane$ = 1, sgabsinc], pccdia, [if gcode$ = 1, sgfeed]
        pxout, pyout, pzout, [if HorizontalCellSystem <> 2, pcout], [if gcode$ = 1, `feed], strcantext, scoolant

	[
	 if (opcode$ > 0| opcode$ < 6),
	  if (nextop$=1003 | (nextop$=1011 & t$<>abs(nexttool))),
	    "", else, e$
	] # NO NEW LINE, COOLANT M9

      gcode$ = sav_gcode
#Region pzout
pzout           #Z output
      [if nextop$ = 1011 & retractflg = 0, e$, gcode$ = 0, sgcode] ==============================> Add this line
      if absinc$ = zero, zabs, !zinc
      else, zinc, !zabs
      #if nextop$ = 1003, "(COOLANT SHOULD BE HERE)"
#EndRegion pzout

================= Outcome =======================

N16( .2500, 1/4 CHMF, CB, 45.DEGS, .0010TIP,)
(2FLTS .125LOC, 1.50STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.(TOOLPATH ZCLEARANCE= .06 MIN.)
T16 M6(DEBURR  PROFILE, CUT#93)
G90 G55 S7500 M3
X9.1505 Y9.(.025 CHAMFER SIZE, .025 TIP OFFSET)
G43 H16 Z1.(DOC= Z-.05)
M8 Z.0625
G1 Z-.05 F100.
X9.0621 Y9.0884
G3 X9.0255 Y9. R.125
G1 Y-9.
(CUTTING....) <===================> (CUTTING....)
G1 Y8.875
G3 X9.0621 Y8.7866 R.125
G1 X9.1505 Y8.875
G0 Z1. ===================> Good code here
(*)
N1602(OP2 - PART BOUNDRY LINES, CUT#94)
G0 G90 G55 S7500 M3(PROGRAM JUMPS HERE)
X-6.5136 Y-6.4716
G43 H16 Z1.(DOC= Z-.025)
Z.0625
G1 Z-.025 F2.5
Y6.2856 F50.
(CUTTING....) <===================> (CUTTING....)
G1 X-6.1386
G2 X-6.5137 Y-6.4716 R.375
G0 X-6.5136
Z1. ===================> Good code here
(*)
N1603(OP2 - PART BOUNDRY LINES, CUT#95)
G0 G90 G55 S7500 M3(PROGRAM JUMPS HERE)
X-6.4436 Y-.7684
G43 H16 Z1.(DOC= Z-.025)
Z.0625
G1 Z-.025 F2.5
Y2.4356 F50.
(CUTTING....) <===================> (CUTTING....)
G3 X-6.4436 Y-.7684 R.5
G0 Z1. ===================> Good code here
(*)
N1604(THRU WINDOWS, CUT#96)
G0 G90 G55 S7500 M3(PROGRAM JUMPS HERE)
X-5.7339 Y5.3266
G43 H16 Z1.(DOC= Z-.025)
Z.0625
G1 Z-.025 F2.5
Y4.1766 F50.
G3 X-5.7135 Y4.1082 R.1273
(CUTTING....) <===================> (CUTTING....)
G3 X-5.7339 Y5.3266 R.1257
G0 Z.125 ===================> Good code here
X-3.5558 Y5.2086
Z.0625 ===================> Good code here
G1 Z-.025 F2.5
Y4.0836 F50.
G3 X-3.4758 Y4.0036 R.0805
(CUTTING....) <===================> (CUTTING....)
G2 X-3.2942 Y5.2896 R.2201
G1 X-3.4758 Y5.2886
G3 X-3.5558 Y5.2086 R.0795
G0 Z.125 ===================> Good code here
X1.8742 Y5.5146
Z.0625 ===================> Good code here
G1 Z-.025 F2.5
(CUTTING....) <===================> (CUTTING....)
G1 X1.9372
G3 X1.8741 Y5.5146 R.063
G0 X1.8742 Z.125  ===================> OK code here, ANY IDEAS?  
X2.4862 Y2.398
Z.0625
G1 Z-.025 F2.5
X2.4863 Y-.7336 F50.
G3 X2.5492 Y-.7939 R.063
(CUTTING....) <===================> (CUTTING....)
G3 X2.4862 Y2.398 R.063
G0 Z.125  ===================> Good code here
X-3.3298 Y.4576
Z.0625 ===================> Good code here
G1 Z-.025 F2.5
Y-1.4454 F50.
X-3.4279
(CUTTING....) <===================> (CUTTING....)
G1 X-3.2532 Y.5375
G3 X-3.3298 Y.4576 R.08
G0 Z1. M9 ===================> Good code here
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G55 X0.
M30
%(6,409 CHARACTERS = 6.43KB)
Link to comment
Share on other sites
18 minutes ago, Leon82 said:

I meant move it to a new line in the prapidout block. Either below or above the line where xy and c are output 

I have seen what you are getting but I have never had problems from it.

I don't have any issue either until I have a 5AXIS machine of which is very PICKY when someone from fanuc WROTE a macro of which FORCES

 

X... Y.... rapid in one line
Z... rapid in one line with M9 on the same line.

 

EXAMPLE...

G0 X.2588 Y.369

Z1. M9

then... LASER tool measurement macro starts here, like to check tool break or blowing off the TOOLS PRESETER throughout the AIR BLAST. M7 

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...