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:

2D - High Speed Toolpaths


Recommended Posts

Hello everyone,
    I've been using 2D - High Speed ToolPaths because that is how most companies make money.  I usually put my feed rate F100. to F650. with step over from 10% to 25% of tool diameter. However, for some setup men they are very "SCARE" to run.  So I try to make the post spits out the STEP OVER of the TOOLPATH and I got some conflicts of which the normal CONTOUR, POCKET are also spit out as 0% of TOOL DIAMETER STEP OVER.  I would like to take them out and just for 2D - HIGH SPEEDS TOOL PATHS only.   I think I did something wrong and please help.  

Below here, I defined them but not spiting out right.  Please help....

Under....

pHighSpeed2DToolPaths
      if HighSpeed2DToolPaths,
	  [
       if HighSpeed2DToolPaths = 0, "(", *HighSpeed2DToolPathStepOver, "STEPOVER ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% OF TOOL DIA.)", e$
	   if HighSpeed2DToolPaths = 1, "(", *HighSpeed2DToolPathStepOver, " STEP OVER 2D AREA MILL WRONG)", e$
	   if HighSpeed2DToolPaths = 2, "(", *HighSpeed2DToolPathStepOver, "DYNAMIC CONTOUR MILL)", e$
	   if HighSpeed2DToolPaths = 3, "(", *HighSpeed2DToolPathStepOver, "STEPOVER, ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% OF TOOL DIA.)", e$
	   if HighSpeed2DToolPaths = 4, "(", *HighSpeed2DToolPathSBlendStepOver, "DYNAMIC BLEND)", e$
	   if HighSpeed2DToolPaths = 5, "(DYNAMIC AREA)", e$
	   if HighSpeed2DToolPaths = 6, "(DYNAMIC REST)", e$
	   if HighSpeed2DToolPaths = 7, "(DYNAMIC CORE)", e$
	   if HighSpeed2DToolPaths = 8, "(DYNAMIC CONTOUR)", e$
      ]

Under...

ptlchg_com      #Tool change common blocks
      pHighSpeed2DToolPaths

 

Under...

ptlchg0$         #Call from NCI null tool change (tool number repeats)
 pHighSpeed2DToolPaths


 

pparameter$ # Run parameter table           
     if prmcode$ = 12713, HighSpeed2DToolPaths = rpar(sparameter$,8)

=====NOTE=====

Note: according to MASTERCAMPOST PARAMETERS 2017, they give out

High Speed 2D Toolpaths

PRM_2D_HMM
12713     2D toolpath style:
0 = 2D Core
1 = 2D Peel
2 = 2D Blend
3 = 2D Area
4 = 2D Rest
5 = 2D Dynamic Area
6 = 2D Dynamic
7 = 2D Dynamic Core
8 = 2D Dynamic Contour

=====G-CODE OUTPUTS=====
 

%
O3698(X03852-0101-0102 CUSTOM CLAMPS.NC)
N25( .5000,1/2 FLAT ENDMILL, HSS, USED TOOL,)
(4FLTS 1.000LOC, 1.500LBS, 3.00LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 
T25 M6(2D HIGH PSEED TOOLPATH - DYNAMIC, CUT#2)
G90 G54 X1.5718 Y-1.2443 S7500 M3
(Z STK= .015)
(XY STK= .015)
G43 H25 Z1. T4 (DOC= Z-.11)

(.075 STEPOVER, 15.% OF TOOL DIA.) =====> MISSING THIS ENTIRE LINE
M8 Z.125
G3 X1.625 Y-1.25 Z.1231 R.25 F100.
(CUTTING...)
G1 X3.6969 Y-1.6747 Z-.1
G0 Z1.
S1069 M3
(*)
N2502(2D TOOLPATHS - POCKET, CUT#3)
G0 G90 G54 Z1.(Z STK= .015)
(XY STK= .015)
G43 H25 Z1.(DOC=Z-.11)
X1.209 Y-.9567
Z.0313
G1 X1.3013 Z.0296 F6.42
(CUTTING...)
G1 X1.015 Y-1.125
G0 Z1.
S7000 M3
(*)
N2503(ROUGH OUT FIRST STEP SURFACE, CUT#4)
G0 G90 G54 Z1.(Z STK= .005)
G43 H25 Z1.(DOC=Z-.12)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT RIGHT
X3.7069 Y-2.8345
Z.03
G1 Z-.12 F200.
X3.7355 Y-2.7695
(CUTTING...)
Z.03
G1 Z-.12 F200.
Y-2.125 F50.
Y.875
G0 Z1.
S6500 M3
(*)
N2504(ROUGH OUT FIRST STEP SURFACE, CUT#5)
G0 G90 G54 Z1.(Z STK= .005)
G43 H25 Z1.(DOC=Z-.995)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT RIGHT
X3.7119 Y-2.8516
Z0.
G1 Z-.995 F100.
X3.7405 Y-2.7867
(CUTTING...)
G3 X2.2763 Y-2.3232 R.25
G1 G40 X2.4531 Y-2.5
G0 Z1.
G91 G28 Z0. M9
G28 Y0. M5
M1
(*)
N4( .5000, 1/2 x 90 DEGREE SPOTDRILL, HSS, 90.DEGS,)
(2FLTS .500LOC, 2.500LBS, 3.00LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 M8
T4 M6(SPOT ALL HOLES, CUT#7)
G90 G54 X.25 Y-1. S840 M3
G43 H4 Z2. T12 (DOC= Z-.375)

(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT WRONG

G98 G81 Z-.13 R.1 F5.
X1.5 Z-.375
G80
(*)
N402(SPOT ALL HOLES, CUT#8)
G0 G90 G54 Z1.
G43 H4 Z1.(DOC=Z-1.073)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT WRONG
X3.3572 Y-1.7039
Z-.875
G99 G81 Z-1.073 R-.875 F5.
Y-.2961
G80
Z1.
G91 G28 Z0. M9
G28 Y0. M5
M1
(*)
N12( .2250, NO. 2 DRILL, CB, 118.DEGS,)
(2FLTS 2.000LOC, 2.500LBS, 4.00LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 M8
T12 M6(PREDRILL 2 HOLES, CUT#9)
G90 G54 X.25 Y-1. S1528 M3
G43 H12 Z2. T13 (DOC= Z-1.6276)
(.1276 DRILLED THROUGH)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT WRONG
(17 PECKS, 1.5 FLAT DEPTH)
G98 G83 Z-1.6276 R.1 Q.1 F4.
X1.5
G80
G91 G28 Z0. M9
G28 Y0. M5
M1
(*)
N13( .5313, 17/32 DRILL, CB, 118.DEGS,)
(2FLTS 2.000LOC, 2.500LBS, 3.00LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 M8
T13 M6(DRILL BOLT HOLE, CUT#10)
G90 G54 X1.5 Y-1. S647 M3
G43 H13 Z2. T18 (DOC= Z-1.7196)
(.2196 DRILLED THROUGH)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT WRONG
(18 PECKS, 1.5 FLAT DEPTH)
G98 G83 Z-1.7196 R.1 Q.1 F5.
G80
G91 G28 Z0. M9
G28 Y0. M5
M1
(*)
N18( .1750, NO. 17 DRILL, CB, 118.DEGS,)
(2FLTS 2.000LOC, 2.500LBS, 5.00LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 M8
T18 M6(PREDRILL  FOR 10-32 HOLES, CUT#11)
G90 G54 X3.3572 Y-1.7039 S1746 M3
G43 H18 Z1. T19 (DOC= Z-1.7026)
(.2026 DRILLED THROUGH)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT WRONG
Z-.875
(18 PECKS, 1.5 FLAT DEPTH)
G99 G83 Z-1.7026 R-.875 Q.04 F3.
Y-.2961
G80
Z1.
G91 G28 Z0. M9
G28 Y0. M5
M1
(*)
N19( .1900,NO. 10-32 ROLL TAPRH, FLAT BOTTOM, CB,)
(1FLT 2.000LOC, 2.500LBS, 3.00LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 M8
T19 M6(TAP 10-32 HOLES, CUT#12)
G90 G54 X3.3572 Y-1.7039 S320 M3
G43 H19 Z1. T22 (DOC= Z-1.56)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT WRONG
Z-.875
G99 G84 Z-1.56 R-.875 Q.04 P.1 F10.
Y-.2961
G80
Z1.
G91 G28 Z0. M9
G28 Y0. M5
M1
(*)
N22( .2500, 1/4-20 ROLL TAPRH, FLAT BOTTOM, CB,)
(1FLT 2.000LOC, 2.500LBS, 3.00LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 M8
T22 M6(TAP 1/4-20, CUT#13)
G90 G54 X.25 Y-1. S200 M3
G43 H22 Z1. T6 (DOC= Z-.75)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT WRONG
G99 G84 Z-.75 R.1 Q.1 P.1 F10.
G80
G91 G28 Z0. M9
G28 Y0. M5
M1
(*)
N6( .2500, 1/4 X 90 CHAMFER MILL, CB, 45.DEGS, .0005TIP DIA,)
(2FLTS .500LOC, .750LBS, 2.50LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 M8
T6 M6(CHAMFER EDGES, CUT#14)
G90 G54 X-.25 Y.0302 S3000 M3
G43 H6 Z1. T25 (DOC= Z-.045)
(.015 CHAMFER SIZE, .03 TIP OFFSET)
(.075 STEPOVER, 15.% OF TOOL DIA.) =====> THIS SPITS OUT WRONG
Z.03
G1 Z-.045 F40.
X0.
X.5
G2 X.5303 Y0. R.0302
G1 Y-2.
G2 X.5 Y-2.0303 R.0302
G1 X0.
G2 X-.0302 Y-2. R.0303
G1 Y0.
Y.25
G0 Z1.
(*)
N602(CHAMFER EDGES, CUT#15)
G0 G90 G54 Z1.
G43 H6 Z1.(DOC=Z-.17)
(.075 STEPOVER, 15.% OF TOOL DIA.)
(.015 CHAMFER SIZE, .03 TIP OFFSET)
S3000 M3 X.5674 Y.1369
Z.03
G1 Z-.17
X.6558 Y.0486
G3 X.7 Y.0302 R.0625
G1 X2.4531
G2 X2.583 Y-.0905 R.1303
Y-1.9095 R12.4303
X2.4531 Y-2.0303 R.1302
G1 X.7
G3 X.6558 Y-2.0486 R.0625
G1 X.5674 Y-2.1369
G0 Z1.
G91 G28 Z0. M9
G28 Y0. M5
G0 G90 G54 X0.
M1
T25 M6(FIRST PROGRAMMED TOOL)
M30(50,183CHARS - 50.35KB)
%

Link to comment
Share on other sites

That is doing exactly what you told it to do. You didn't put logic in there to see if it was anything other than these types of toolpaths. You need to create logic to check to see if you are doing anything other than these types of toolpaths. If you are then you ignore the call, but if you are then you want the output. The way you made your logic statement anytime any milling toolpath is used this will output something.

 

Question why do you make your variables so long named? You should really think about making them a lot smaller will help you debug your posts a lot easier.

Link to comment
Share on other sites

Hi 5th Axis CGI,
   Should I look say if HIGH SPEED TOOLPATH then out put, it CONTOUR, POCKET, DRILL, don't show?  Should I use the TOOL_OP$ or OP_ID$?  Where do I get those TOOL_OP$? or OP_ID$ value?  

 

 

Thank you for your time to reply,
     S.Luong

Link to comment
Share on other sites

Hi 5th Axis CGI,
   As you instructed, I tried to put a condition and somehow it is not showing up the comment as I tried.  What did I miss?

 

pHighSpeed2DToolPaths
      if opcode$ < 0 & HighSpeed2DToolPaths, =====> This is what I changed, I'm trying to exclude CONTOUR, POCKET, DRILL but don't know what is best to use OP_CODE&, OP_ID$ or TOOL_OP$
	  [
       if HighSpeed2DToolPaths = 0, "(", *HighSpeed2DToolPathStepOver, "STEPOVER ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% OF TOOL DIA.)", e$
	   if HighSpeed2DToolPaths = 1, "(", *HighSpeed2DToolPathStepOver, " STEP OVER 2D AREA MILL WRONG)", e$
	   if HighSpeed2DToolPaths = 2, "(", *HighSpeed2DToolPathStepOver, "DYNAMIC CONTOUR MILL)", e$
	   if HighSpeed2DToolPaths = 3, "(", *HighSpeed2DToolPathStepOver, "STEPOVER, ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% OF TOOL DIA.)", e$
	   if HighSpeed2DToolPaths = 4, "(", *HighSpeed2DToolPathSBlendStepOver, "DYNAMIC BLEND)", e$
	   if HighSpeed2DToolPaths = 5, "(DYNAMIC AREA)", e$
	   if HighSpeed2DToolPaths = 6, "(DYNAMIC REST)", e$
	   if HighSpeed2DToolPaths = 7, "(DYNAMIC CORE)", e$
	   if HighSpeed2DToolPaths = 8, "(DYNAMIC CONTOUR)", e$
      ]
Link to comment
Share on other sites

I might look to op_id$ to control this. You are in uncharted areas and what I have found over the years when people do uncommon things in Mastercam you must make special trap or conditions to filter out things. You are on the right track, but I am thinking the extra stuff is related what you are doing never done before.  With that extra code is being read as true, but you don't want it read that way. You need to create and extra trap or filter to help get the output to respect what you want it to respect.

Link to comment
Share on other sites

is there a "op_id$" numbers list?  I tried to do like this

 

pHighSpeed2DToolPaths
      if op_id$ > 200 & HighSpeed2DToolPaths, ====================> I'm looking for op_id$ NUMBERS.....
	  [
       if HighSpeed2DToolPaths = 0, "(", *HighSpeed2DToolPathStepOver, "STEPOVER ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% OF TOOL DIA.)", e$
	   if HighSpeed2DToolPaths = 1, "(", *HighSpeed2DToolPathStepOver, " STEP OVER 2D AREA MILL WRONG)", e$
	   if HighSpeed2DToolPaths = 2, "(", *HighSpeed2DToolPathStepOver, "DYNAMIC CONTOUR MILL)", e$
	   if HighSpeed2DToolPaths = 3, "(", *HighSpeed2DToolPathStepOver, "STEPOVER, ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% OF TOOL DIA.)", e$
	   if HighSpeed2DToolPaths = 4, "(", *HighSpeed2DToolPathSBlendStepOver, "DYNAMIC BLEND)", e$
	   if HighSpeed2DToolPaths = 5, "(DYNAMIC AREA)", e$
	   if HighSpeed2DToolPaths = 6, "(DYNAMIC REST)", e$
	   if HighSpeed2DToolPaths = 7, "(DYNAMIC CORE)", e$
	   if HighSpeed2DToolPaths = 8, "(DYNAMIC CONTOUR)", e$
      ]
Link to comment
Share on other sites
On 4/15/2017 at 0:12 PM, 5th Axis CGI said:

I was thinking of the wrong variable to use it was the opcode$ one you want to use.

Albert, good memory sir. I have not seen Peter for some time he is missed. 

 

Thank you 5th Axis CGI,
   Over the weekend, I thought about your suggestion and here is what I did and it worked.

#Custom Defined Variables
HighSpeed2DToolPaths: 0
HighSpeed2DToolPathStepOver: 0
HighSpeed2DToolPathAreaMillStepOverMin: 0
HighSpeed2DToolPathAreaMillStepOverMax: 0
HighSpeed2DToolPathStepOverPercent: 0
HighSpeed2DToolPathSBlendStepOver: 0
HighSpeed2DToolPathSBlendStepOver2: 0
HighSpeed2DToolPathStepOverCoreMill: 0


#region Format assignments
fmt      2 HighSpeed2DToolPathStepOver
fmt      2 HighSpeed2DToolPathAreaMillStepOverMin
fmt      2 HighSpeed2DToolPathAreaMillStepOverMax
fmt      2 HighSpeed2DToolPathStepOverPercent
fmt      2 HighSpeed2DToolPathSBlendStepOver
fmt      2 HighSpeed2DToolPathSBlendStepOver2
fmt      2 HighSpeed2DToolPathStepOverCoreMill

#region pHighSpeed2DToolPaths
pHighSpeed2DToolPaths
      if HighSpeed2DToolPathStepOverCoreMill > 0 & s3DHighSpeedSurfaceToolPaths < 0,
      [
       if HighSpeed2DToolPaths = 0, "(", *HighSpeed2DToolPathStepOver, "STEPOVER, ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% TOOL DIA.)", e$
       if HighSpeed2DToolPaths = 1, "(", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% TOOL DIA., ", *HighSpeed2DToolPathAreaMillStepOverMin, no_spc$, "/",         *HighSpeed2DToolPathAreaMillStepOverMax, "STEPOVER)", e$
       if HighSpeed2DToolPaths = 2, "(", *HighSpeed2DToolPathStepOver, "STEPOVER, ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% TOOL DIA.)", e$
       if HighSpeed2DToolPaths = 3, "(", *HighSpeed2DToolPathStepOver, "STEPOVER, ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% TOOL DIA.)", e$
       if HighSpeed2DToolPaths = 4, "(", *HighSpeed2DToolPathSBlendStepOver2, "STEPOVER, ", *HighSpeed2DToolPathStepOverCoreMill, no_spc$, "% TOOL DIA.)", e$
       if HighSpeed2DToolPaths = 5, "(DYNAMIC AREA)", e$
       if HighSpeed2DToolPaths = 6, "(DYNAMIC REST)", e$
       if HighSpeed2DToolPaths = 7, "(DYNAMIC CORE)", e$
       if HighSpeed2DToolPaths = 8, "(DYNAMIC CONTOUR)", e$
      ]
#endregion

ptlchg_com      #Tool change common blocks
    pHighSpeed2DToolPaths


ptlchg0$         #Call from NCI null tool change (tool number repeats)
    pHighSpeed2DToolPaths


pparameter$ # Run parameter table
           if prmcode$ = 12713, HighSpeed2DToolPaths = rpar(sparameter$,8)
           if prmcode$ = 12719, HighSpeed2DToolPathStepOver = rpar(sparameter$, 1)
           if prmcode$ = 15492, HighSpeed2DToolPathStepOverPercent = rpar(sparameter$, 1)
           if prmcode$ = 12302, HighSpeed2DToolPathSBlendStepOver = rpar(sparameter$, 1)
           if prmcode$ = 12971, HighSpeed2DToolPathStepOverCoreMill = rpar(sparameter$, 1)
           if prmcode$ = 12973, HighSpeed2DToolPathAreaMillStepOverMin = rpar(sparameter$, 1)
           if prmcode$ = 12974, HighSpeed2DToolPathAreaMillStepOverMax = rpar(sparameter$, 1)
           if prmcode$ = 12996, HighSpeed2DToolPathSBlendStepOver2 = rpar(sparameter$, 1)

  • Like 2
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...