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:

Different feed rate at for drill custom


Recommended Posts

Hello everyone,

   I created a drill custom of which I would like different feed rates at my job demands.  However, I did not get the feed rate update at all. I think I did something wrong. 

 

Thank you for your help.

 

Image 1 

https://drive.google.com/file/d/0B4UZsmondnEzemdOUFgxd0NFUnM/view?usp=sharing

 

Image 2

https://drive.google.com/file/d/0B4UZsmondnEzMks5bEJaNmhyLVE/view?usp=sharing

 

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

This is what I've got for GCodes

 

N67( 1.3750,S123806 CUSTOM TOOL, CB,)
(4FLTS .500LOC, 2.800LBS, 10.00LOH)
G0 G17 G40 G49 G80 G90
G53 Z0. M19
G53 Y0.
T67 M6(FIRST & SECOND HOLE, CUT#175)
M39 (High Spindle Gear M-Code)
M8(All Machinine)
M131(Thru-Tool Coolant Pressure)
M130(Niagra Coolant)
G90 G54 B45.
X-13.2741 Y23.275 S2350 M3
G43 H67 Z8.6695(DOC= Z-1.2305)
G17 G90 Z1.6695
G1 Z-1. F10.(Half Section Downward) =====> This feed rate should be F15. from "feed"
Z-1.2305 F10.(Final Depth)
Z-.9805 F30.(Upward)
G0 Z1.6695(Next hole)
X-11.1491
G1 Z-1. F10.(Half Section Downward)=====> This feed rate should be F15. from "feed"
Z-1.2305 F10.(Final Depth)
Z-.9805 F30.(Upward)

 

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

This is how I defined

fmt "Z" 2  HalfSectionLengthCalculation  #calulate drilling distancefmt "Z" 2  HalfSectionUpwardLengthfmt     2  pck_amt     # Peck amountfmt ""  4  first_pass #counter for initial peckfmt "Z" 2  drl_depth_clrfmt ""  2 aircraftdrillretractfmt     2  HalfSectionLength  fmt "S" 4  HalfSectionRPMfmt "F" 2  HalfSectionFeedRatefmt "S" 4  UpwardRPM   fmt "F" 2  UpwardFeedRate  

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

pdrlcst$         #Custom drill cycles 8 - 19 (user option)      pdrlcommonb      if drillcyc$ = 13, pG1drill  #G1 Feed In/Out Drill Mode      pcom_movea
pdrlcst_2$       #Custom drill cycles 8 - 19, additional points (user option)           #Use this postblock to customize drilling cycles 8 - 19            if drillcyc$ = 13, pdrlcst13      pcom_movea

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

PG1Drill      pdrlcommonb      HalfSectionLength = peck1$      HalfSectionRPM = peck2$      HalfSectionFeedRate = peckclr$      UpwardRPM = retr$      UpwardFeedRate = dwell$      HalfSectionUpwardLength = depth$ + shftdrl$      HalfSectionLengthCalculation = depth$ + peck1$      gcode$ = zero #Rapid mode      pbld, no_spc$, sgcode, pxout, pyout, e$	  gcode$ = one #Feed mode	  pcan1, pbld, no_spc$, sgcode, [if HalfSectionLengthCalculation <> 0, *HalfSectionLengthCalculation, else, pfzout], 	  [if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], strcantext, no_spc$, "(Half Section Downward)", e$      if HalfSectionRPM > 1500 & mi10$ > zero & speed < 1500,        [         *mi10$, e$         sav_mi10 = zero        ]      if (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & mi9$ > zero & speed >= 1500,       [        *mi9$, e$        sav_mi9 = zero       ]	        pfzout, [if peck2$ > 0 & peck2$ <> rpm, *HalfSectionRPM],[if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], no_spc$, "(Final Depth)", e$	        if (UpwardRPM > 0 & UpwardRPM > 1500) & mi10$> zero & (HalfSectionRPM >0 & HalfSectionRPM < 1500),       [      	    *mi10$, e$        sav_mi10 = zero       ]     if (UpwardRPM > 0 & UpwardRPM < 1500) & mi9$> zero & (HalfSectionRPM > 0 & HalfSectionRPM <1500),      [       *mi9$, e$       sav_mi9 = zero      ]	  *HalfSectionUpwardLength, [if retr$ > 0, *UpwardRPM], [if UpwardFeedRate > 0, *UpwardFeedRate], no_spc$, "(Upward)", e$	        gcode$ = zero #Back to rapid positioning      #z_clear = (zdrill + z_clear_val)      #pbld, no_spc$, sg00, z_clear,      #pbld, no_spc$, sg01, pfzout, feed, e$      pbld, no_spc$, sgcode, *refht$, no_spc$, "(Next hole)", e$	  if speed <= 1500 & (HalfSectionRPM > 1500 & UpwardRPM > 1500),	    [		*mi9$, e$        sav_mi9 = zero		pfspindleout, e$		]	  if speed >= 1500 & (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & (UpwardRPM > 0 & UpwardRPM < 1500),	    [		*mi10$, e$        sav_mi10 = zero		pfspindleout, e$		]	        pcom_movea

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

pdrlcst13         #G1 Drill Mode      pdrlcommonb      HalfSectionLength = peck1$	  HalfSectionRPM = peck2$	  HalfSectionFeedRate = peckclr$	  UpwardRPM = retr$	  UpwardFeedRate = dwell$	  HalfSectionUpwardLength = depth$ + shftdrl$      HalfSectionLengthCalculation = depth$ + peck1$	  gcode$ = zero #Rapid mode      pbld, no_spc$, sgcode, pxout, pyout, e$	  gcode$ = one #Feed mode	  pcan1, pbld, no_spc$, sgcode, [if HalfSectionLengthCalculation <> 0, *HalfSectionLengthCalculation, else, pfzout], 	  [if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], strcantext, no_spc$, "(Half Section Downward)", e$      if HalfSectionRPM > 1500 & mi10$ > zero,        [         *mi10$, e$         sav_mi10 = zero        ]      if (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & mi9$ > zero,       [        *mi9$, e$        sav_mi9 = zero       ]	        pfzout, [if peck2$ > 0 & peck2$ <> rpm, *HalfSectionRPM],[if peckclr$ > 0, *HalfSectionFeedRate, else, *feed], no_spc$, "(Final Depth)", e$	        if UpwardRPM > 1500 & mi10$> zero & (HalfSectionRPM > 0 & HalfSectionRPM < 1500),       [      	    *mi10$, e$        sav_mi10 = zero       ]     if (UpwardRPM > 0 & UpwardRPM < 1500) & mi9$> zero & HalfSectionRPM > 1500,      [       *mi9$, e$       sav_mi9 = zero      ]	  *HalfSectionUpwardLength, [if retr$ > 0, *UpwardRPM], [if UpwardFeedRate > 0, *UpwardFeedRate], no_spc$, "(Upward)", e$	  	        gcode$ = zero #Back to rapid positioning      pbld, no_spc$, sgcode, *refht$, "(Next hole)", e$	  if speed <= 1500 & (HalfSectionRPM > 1500 & UpwardRPM > 1500),	    [		*mi9$, e$        sav_mi9 = zero		pfspindleout, e$		]	  if speed >= 1500 & (HalfSectionRPM < 1500 & UpwardRPM > 0 & UpwardRPM < 1500),	    [		*mi10$, e$        sav_mi10 = zero		pfspindleout, e$		]	        pcom_movea
Link to comment
Share on other sites

I guess your issue is HalfSectionFeedRate is always >0 because peckclr$=10 ANYTIME during cycle.

It s up to you to implement cycle logic (to tell MP: if you are in halfsection then post halfsectionFeedRate, if this is finaldepth then post feed).

 

 

What do you mean, David Colin?  I should set the HalftSectionFeedRate to certain value or reset the value?

 

Thank you for your responding.

Link to comment
Share on other sites

hi,

 

I mean you should do something like that in your pG1drill/pdrlcst13 postblocks (i didn't test but this is the idea):

pcan1, pbld, no_spc$, sgcode, [if HalfSectionLengthCalculation <> 0, *HalfSectionLengthCalculation, 
*HalfSectionFeedRate, else, pfzout, *feed], strcantext, no_spc$, "(Half Section Downward)", e$
Link to comment
Share on other sites

 

hi,

 

I mean you should do something like that in your  pG1drill/pdrlcst13 postblocks (i didn't test but this is the idea):

 pcan1, pbld, no_spc$, sgcode, [if HalfSectionLengthCalculation <> 0, *HalfSectionLengthCalculation, *HalfSectionFeedRate, else, pfzout, *feed], strcantext, no_spc$, "(Half Section Downward)", e$

Hi David,

   I did as you suggested and the "feed" is the same value as I pointed out as the above.  Do you think we should do something with the "feed" value?

 

Thank you for your help.

Link to comment
Share on other sites

What I don't understand is why you keep using feed as the variable for feed. My understanding is feed is the output from the original feed used on the 1st page. You are now using the additional drill parameters to achieve output. Anytime I have used additional drill outputs I needed to create a unique variable to then use. You wrote all these condition loops and other things for what I am sorry I just cannot wrap my brain around. I wrote thing liek you did, but just my simple brain just likes to keeps things simple. Here is an example from a probing post:

      if drillcyc$ = 11, #Internal Corner Measure
           [
           pdrlcommonb
           if icorn <> 0 & jcorn = 0, #Internal Corner Probing Using I
                [
                if drl_prm1$ = 1,
                     [
                     xcorn = xout + xdcorn
                     ycorn = yout + ydcorn
                     ]
                if drl_prm1$ = 2,
                     [                    
                     xcorn = xout - xdcorn
                     ycorn = yout + ydcorn
                     ]
                if drl_prm1$ = 3,
                     [                    
                     xcorn = xout - xdcorn
                     ycorn = yout - ydcorn
                     ]
                if drl_prm1$ = 4,
                     [
                     xcorn = xout + xdcorn
                     ycorn = yout - ydcorn
                     ]
                if drl_prm1$ = 0, result = mprint(scornerror), exitpost$
                if drl_prm1$ > 4, result = mprint(scornerror), exitpost$                      
                pbld, n$, *strg659810, *xcorn, *ycorn, e$
                pbld, n$, *strg659810, *prorefht, e$
                pbld, n$, *strg659810, *zcorn, e$
                pbld, n$, *strg659815, *xout, *yout, [if shftdrl$, *icorn], [if corn_angtoler > 0, *corn_angtoler], [if offupdate > 0,*offupdate], [if feattol, *feattol],
 [if trueposzone > 0, *trueposzone], [if drl_prm10$ > 0, *drl_prm10$], e$
                pbld, n$, *strg659810, *prorefht, e$
                if drl_prm10$,                
                     [
                     spaces$ = 0
                     "POPEN", e$
                     sdprint, "[", sopcomment, "]", e$
                     sdprint, "[INTERNAL*CORNER*PROBING*USING*I]", e$                     
                     sdprint, "[ANGLE*OF*X*SURFACE*IS*#139[24]*]", e$                     
                     sdprint, "[","*X*#135[24]*ERROR*#140[24]*]", e$
                     sdprint, "[","*Y*#136[24]*ERROR*#141[24]*]", e$
                     sdprint, "[","Z*POSITION*IS*",*zcorn,"]", e$
                     sdprint, "[","*TRUE*POSITION*ERROR*#145[24]*]", e$
                     sdprint, "[","-------------------------------------------","]", e$
                     "PCLOS", e$
                     spaces$ = 1
                     ]
                ]
           if icorn = 0 & jcorn <> 0, #Internal Corner Probing Using J
                [
                if drl_prm1$ = 1,
                     [
                     xcorn = xout + xdcorn
                     ycorn = yout + ydcorn
                     ]
                if drl_prm1$ = 2,
                     [                    
                     xcorn = xout - xdcorn
                     ycorn = yout + ydcorn
                     ]
                if drl_prm1$ = 3,
                     [                    
                     xcorn = xout - xdcorn
                     ycorn = yout - ydcorn
                     ]
                if drl_prm1$ = 4,
                     [
                     xcorn = xout + xdcorn
                     ycorn = yout - ydcorn
                     ]
                if drl_prm1$ = 0, result = mprint(scornerror), exitpost$
                if drl_prm1$ > 4, result = mprint(scornerror), exitpost$
                pbld, n$, *strg659810, *xcorn, *ycorn, e$
                pbld, n$, *strg659810, *prorefht, e$
                pbld, n$, *strg659810, *zcorn, e$
                pbld, n$, *strg659815, *xout, *yout, [if retr$, *jcorn], [if corn_angtoler > 0, *corn_angtoler], [if offupdate > 0,*offupdate], [if feattol, *feattol],
 [if trueposzone > 0, *trueposzone], [if drl_prm10$ > 0, *drl_prm10$], e$
                pbld, n$, *strg659810, *prorefht, e$
                if drl_prm10$,                
                     [
                     spaces$ = 0
                     "POPEN", e$
                     sdprint, "[", sopcomment, "]", e$
                     sdprint, "[INTERNAL*CORNER*PROBING*USING*J]", e$                                          
                     sdprint, "[","*X*#135[24]*ERROR*#140[24]*]", e$
                     sdprint, "[ANGLE*OF*Y*SURFACE*IIS*#142[24]*]", e$
                     sdprint, "[","*Y*#136[24]*ERROR*#141[24]*]", e$
                     sdprint, "[","Z*POSITION*IS*",*zcorn,"]", e$
                     sdprint, "[","*TRUE*POSITION*ERROR*#145[24]*]", e$
                     sdprint, "[","-------------------------------------------","]", e$
                     "PCLOS", e$
                     spaces$ = 1
                     ]
                ]
           if icorn <> 0 & jcorn <> 0, #Internal Corner Probing Using I and J
                [
                if drl_prm1$ = 1,
                     [
                     xcorn = xout + xdcorn
                     ycorn = yout + ydcorn
                     ]
                if drl_prm1$ = 2,
                     [                    
                     xcorn = xout - xdcorn
                     ycorn = yout + ydcorn
                     ]
                if drl_prm1$ = 3,
                     [                    
                     xcorn = xout - xdcorn
                     ycorn = yout - ydcorn
                     ]
                if drl_prm1$ = 4,
                     [
                     xcorn = xout + xdcorn
                     ycorn = yout - ydcorn
                     ]
                if drl_prm1$ = 0, result = mprint(scornerror), exitpost$
                if drl_prm1$ > 4, result = mprint(scornerror), exitpost$
                pbld, n$, *strg659810, *xcorn, *ycorn, e$
                pbld, n$, *strg659810, *prorefht, e$
                pbld, n$, *strg659810, *zcorn, e$
                pbld, n$, *strg659815, *xout, *yout, [if dwell$, *icorn], [if retr$, *jcorn],  [if corn_angtoler > 0, *corn_angtoler], [if offupdate > 0,*offupdate], [if feattol, *feattol],
 [if trueposzone > 0, *trueposzone], [if drl_prm10$ > 0, *drl_prm10$], e$
                pbld, n$, *strg659810, *prorefht, e$
                if drl_prm10$,                
                     [
                     spaces$ = 0
                     "POPEN", e$
                     sdprint, "[", sopcomment, "]", e$
                     sdprint, "[INTERNAL*CORNER*PROBING*USING*I*AND*J]", e$                     
                     sdprint, "[ANGLE*OF*X*SURFACE*=*#139]", e$                     
                     sdprint, "[","*X*#135[24]*ERROR*#140[24]*]", e$
                     sdprint, "[ANGLE*OF*Y*SURFACE*IS*#142[24]*]", e$
                     sdprint, "[","*Y*#136[24]*ERROR*#141[24]*]", e$
                     sdprint, "[","Z*POSITION*IS*",*zcorn,"]", e$
                     sdprint, "[","*TRUE*POSITION*ERROR*#145[24]*]", e$
                     sdprint, "[","-------------------------------------------","]", e$
                     "PCLOS", e$
                     spaces$ = 1
                     ]
                ]                
           if icorn = 0 & jcorn = 0, #Internal Corner Probing 90 deg Corner
                [
                if drl_prm1$ = 1,
                     [
                     xcorn = xout + xdcorn
                     ycorn = yout + ydcorn
                     ]
                if drl_prm1$ = 2,
                     [                    
                     xcorn = xout - xdcorn
                     ycorn = yout + ydcorn
                     ]
                if drl_prm1$ = 3,
                     [                    
                     xcorn = xout - xdcorn
                     ycorn = yout - ydcorn
                     ]
                if drl_prm1$ = 4,
                     [
                     xcorn = xout + xdcorn
                     ycorn = yout - ydcorn
                     ]
                if drl_prm1$ = 0, result = mprint(scornerror), exitpost$
                if drl_prm1$ > 4, result = mprint(scornerror), exitpost$                
                pbld, n$, *strg659810, *xcorn, *ycorn, e$
                pbld, n$, *sg00, *prorefht, e$
                pbld, n$, *strg659810, *zcorn, e$
                pbld, n$, *strg659815, *xout, *yout, [if offupdate > 0,*offupdate], [if feattol, *feattol],
 [if trueposzone > 0, *trueposzone], [if drl_prm10$ > 0, *drl_prm10$], e$
                pbld, n$, *strg659810, *prorefht, e$   
                if drl_prm10$,                
                     [
                     spaces$ = 0
                     "POPEN", e$
                     sdprint, "[", sopcomment, "]", e$
                     sdprint, "[INTERNAL*CORNER*90*DEG*CORNER*PROBING*]", e$                     
                     sdprint, "[","*X*#135[24]*ERROR*#140[24]*]", e$
                     sdprint, "[","*Y*#136[24]*ERROR*#141[24]*]", e$
                     sdprint, "[","Z*POSITION*IS*",*zcorn,"]", e$
                     sdprint, "[","*TRUE*POSITION*ERROR*#145[24]*]", e$
                     sdprint, "[","-------------------------------------------","]", e$
                     "PCLOS", e$
                     spaces$ = 1
                     ]
                ]    
           pcom_movea
           ]       
    

In this example there are four possible approaches for the routine and the conditions needed for each was controlled with additional drill parameters or already used drill parameters. Here you can see where I defined dwell$ and depth$ many different ways. I didn't call depth$ or dwell$ again. If I did I would expect the original value defined to be used and not the new value I was trying to work with.

# --------------------------------------------------------------------------
# Probe Varabiles Defined to Use with Drill Cycles
# --------------------------------------------------------------------------
prorefht = refht$ #Z Rapid Position for Rapid
prnrefht = tosz$ #Z Clearance for Protect Cycle
diadwell = dwell$      #P9814 Bore/Boss Measurement Dia call out
radclear = retr$ #P9814 Bore/Boss R Positive or Negative for clearance on Boss use Positive on Bore Use Negative
feattol = shftdrl$ #P9811 Single Surface Measure Tolerance of Surface you are Measuring
zbossdep = depth$ #P9814 Bore/Boss Section Default to Boss use 1 to Make it A Bore Measure Cycle
zpcddep = depth$ #P9819 Bolt Circle Measurement Depth for Id Measurement
zsinsurf = depth$ #P9811 Z Axis Single Surface Use
zcorn = depth$ #P9815 Z Axis Corner Probing
cyspan = dwell$ #Used for Across Distance
jcorn = dwell$ #Used for Internal Corner
icorn = retr$ #Used for Internal Corner
offupdate = peckclr$ #Used to Update Workoffsets if no Value is Used Nothing is Posted Out
trueposzone = peck2$ #Used for True Position Callout if no Value is Used Nothing is Posted Out
toolupdate = peck1$ #Used for Tooloffset Update to a Known Feature if No Value is Used Nothing is Posted Out
cangtoler = peck1$ #Used for C Axis Tolance in 4th Axis Measurements
corn_angtoler = peck1$ #Used for Internal Corner Angle Tolerance
covertrav = peck2$ #Used for C Axis Overtravel Adjustment and setting in Cycle
pcddia = peck1$ #Used for Bolt Hole Circle on PCD P9819 Cycle
apcdang = drl_prm1$ #Used for Angle of 1st Hole on PCD P9819 Cycle
xdcorn = drl_prm2$ #Used for Distance of Safe Position in X for Corner Cycles
ydcorn = drl_prm3$ #Used for Distance of Safe Position in Y for Corner Cycles

Yes it seems like extra work defining how they are to be used, but with MP I found this worked the best than trying to keep using the same variable over and over again as I would see exactly what you were seeing. I would also consider shorting up those variable names. Do they have to be so long? If you need to create a key in your post then do like I did above and use the # to describe them, but part of keeping it simple is making names I can easily manage.

 

HTH

Link to comment
Share on other sites

Steven,

 

I'm sure somewhere in your current post, the 'feed' variable is being manipulated. It could be in the "common tool change" section, it could be in the "feed calculation" section, or any one of a dozen different places that get called before the Drilling NCI Gcode is being called. You have very extensive modifications in your post. So chasing those changes down could be very tedious. The "out-of-the-box" MPMaster post is about 4,300 lines of code. Your post is almost 11,000 lines. That's a lot of extra stuff that has been added...

 

Fortunately, there is usually a good way to get around almost any problem.

 

In both your 'pG1drill' and 'pdrlcst13' post blocks, add a line just underneath the call to 'pdrlcommonb'. (That post block call is a "jump" to where values are normally calculated before output.)

 

In that line, just add a formula that looks like this:  feed = fr$

 

That will reset the value of 'feed' to the current value of the Feedrate from the Tool Page in the Operation. The variable 'fr$' is the 'predefined' variable that gets its value from the NCI file. That is the easiest way to "capture" the value from the operation, and just use it where you want it.

 

You have to be careful because the 'fr$' value gets changed a lot inside the NCI file. For example, when Rapid is active, the value of 'fr$' will be '-2', and NOT the actual Feedrate entered in the operation. The 'fr$' value can also be "-1" when the value is "unchanged", or when the value output is output in "feed per revolution", instead of just a linear feed rate.

 

If 'fr$' doesn't work, try 'frplunge$'. (Just change the equation to 'feed = frplunge$'.)

PG1Drill
      pdrlcommonb
      feed = fr$ #Take feed from NCI file
      #feed = frplunge$ #If the above doesn't work, delete it, and try this...
      HalfSectionLength = peck1$
      HalfSectionRPM = peck2$
      HalfSectionFeedRate = peckclr$
      UpwardRPM = retr$
      UpwardFeedRate = dwell$
      HalfSectionUpwardLength = depth$ + shftdrl$
      HalfSectionLengthCalculation = depth$ + peck1$
      gcode$ = zero #Rapid mode
      pbld, no_spc$, sgcode, pxout, pyout, e$
	  gcode$ = one #Feed mode
	  pcan1, pbld, no_spc$, sgcode, [if HalfSectionLengthCalculation <> 0, *HalfSectionLengthCalculation, else, pfzout], 
	  [if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], strcantext, no_spc$, "(Half Section Downward)", e$

      if HalfSectionRPM > 1500 & mi10$ > zero & speed < 1500,
        [
         *mi10$, e$
         sav_mi10 = zero
        ]

      if (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & mi9$ > zero & speed >= 1500,
       [
        *mi9$, e$
        sav_mi9 = zero
       ]
	  
      pfzout, [if peck2$ > 0 & peck2$ <> rpm, *HalfSectionRPM],[if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], no_spc$, "(Final Depth)", e$
	  
      if (UpwardRPM > 0 & UpwardRPM > 1500) & mi10$> zero & (HalfSectionRPM >0 & HalfSectionRPM < 1500),
       [      
	    *mi10$, e$
        sav_mi10 = zero
       ]

     if (UpwardRPM > 0 & UpwardRPM < 1500) & mi9$> zero & (HalfSectionRPM > 0 & HalfSectionRPM <1500),
      [
       *mi9$, e$
       sav_mi9 = zero
      ]

	  *HalfSectionUpwardLength, [if retr$ > 0, *UpwardRPM], [if UpwardFeedRate > 0, *UpwardFeedRate], no_spc$, "(Upward)", e$	  

      gcode$ = zero #Back to rapid positioning
      #z_clear = (zdrill + z_clear_val)
      #pbld, no_spc$, sg00, z_clear,
      #pbld, no_spc$, sg01, pfzout, feed, e$
      pbld, no_spc$, sgcode, *refht$, no_spc$, "(Next hole)", e$
	  if speed <= 1500 & (HalfSectionRPM > 1500 & UpwardRPM > 1500),
	    [
		*mi9$, e$
        sav_mi9 = zero
		pfspindleout, e$
		]
	  if speed >= 1500 & (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & (UpwardRPM > 0 & UpwardRPM < 1500),
	    [
		*mi10$, e$
        sav_mi10 = zero
		pfspindleout, e$
		]
	  
      pcom_movea
  • Like 1
Link to comment
Share on other sites

 

Steven,

 

I'm sure somewhere in your current post, the 'feed' variable is being manipulated. It could be in the "common tool change" section, it could be in the "feed calculation" section, or any one of a dozen different places that get called before the Drilling NCI Gcode is being called. You have very extensive modifications in your post. So chasing those changes down could be very tedious. The "out-of-the-box" MPMaster post is about 4,300 lines of code. Your post is almost 11,000 lines. That's a lot of extra stuff that has been added...

 

 

 

 

11K lines. Almost triple the size. Wow. If anyone ever follows in your steps they are going to be doing this.... :wallbash: :wallbash: :wallbash: :wallbash: :wallbash:

  • Like 3
Link to comment
Share on other sites

 

Steven,

 

I'm sure somewhere in your current post, the 'feed' variable is being manipulated. It could be in the "common tool change" section, it could be in the "feed calculation" section, or any one of a dozen different places that get called before the Drilling NCI Gcode is being called. You have very extensive modifications in your post. So chasing those changes down could be very tedious. The "out-of-the-box" MPMaster post is about 4,300 lines of code. Your post is almost 11,000 lines. That's a lot of extra stuff that has been added...

 

Fortunately, there is usually a good way to get around almost any problem.

 

In both your 'pG1drill' and 'pdrlcst13' post blocks, add a line just underneath the call to 'pdrlcommonb'. (That post block call is a "jump" to where values are normally calculated before output.)

 

In that line, just add a formula that looks like this:  feed = fr$

 

That will reset the value of 'feed' to the current value of the Feedrate from the Tool Page in the Operation. The variable 'fr$' is the 'predefined' variable that gets its value from the NCI file. That is the easiest way to "capture" the value from the operation, and just use it where you want it.

 

You have to be careful because the 'fr$' value gets changed a lot inside the NCI file. For example, when Rapid is active, the value of 'fr$' will be '-2', and NOT the actual Feedrate entered in the operation. The 'fr$' value can also be "-1" when the value is "unchanged", or when the value output is output in "feed per revolution", instead of just a linear feed rate.

 

If 'fr$' doesn't work, try 'frplunge$'. (Just change the equation to 'feed = frplunge$'.)

PG1Drill
      pdrlcommonb
      feed = fr$ #Take feed from NCI file
      #feed = frplunge$ #If the above doesn't work, delete it, and try this...
      HalfSectionLength = peck1$
      HalfSectionRPM = peck2$
      HalfSectionFeedRate = peckclr$
      UpwardRPM = retr$
      UpwardFeedRate = dwell$
      HalfSectionUpwardLength = depth$ + shftdrl$
      HalfSectionLengthCalculation = depth$ + peck1$
      gcode$ = zero #Rapid mode
      pbld, no_spc$, sgcode, pxout, pyout, e$
	  gcode$ = one #Feed mode
	  pcan1, pbld, no_spc$, sgcode, [if HalfSectionLengthCalculation <> 0, *HalfSectionLengthCalculation, else, pfzout], 
	  [if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], strcantext, no_spc$, "(Half Section Downward)", e$

      if HalfSectionRPM > 1500 & mi10$ > zero & speed < 1500,
        [
         *mi10$, e$
         sav_mi10 = zero
        ]

      if (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & mi9$ > zero & speed >= 1500,
       [
        *mi9$, e$
        sav_mi9 = zero
       ]
	  
      pfzout, [if peck2$ > 0 & peck2$ <> rpm, *HalfSectionRPM],[if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], no_spc$, "(Final Depth)", e$
	  
      if (UpwardRPM > 0 & UpwardRPM > 1500) & mi10$> zero & (HalfSectionRPM >0 & HalfSectionRPM < 1500),
       [      
	    *mi10$, e$
        sav_mi10 = zero
       ]

     if (UpwardRPM > 0 & UpwardRPM < 1500) & mi9$> zero & (HalfSectionRPM > 0 & HalfSectionRPM <1500),
      [
       *mi9$, e$
       sav_mi9 = zero
      ]

	  *HalfSectionUpwardLength, [if retr$ > 0, *UpwardRPM], [if UpwardFeedRate > 0, *UpwardFeedRate], no_spc$, "(Upward)", e$	  

      gcode$ = zero #Back to rapid positioning
      #z_clear = (zdrill + z_clear_val)
      #pbld, no_spc$, sg00, z_clear,
      #pbld, no_spc$, sg01, pfzout, feed, e$
      pbld, no_spc$, sgcode, *refht$, no_spc$, "(Next hole)", e$
	  if speed <= 1500 & (HalfSectionRPM > 1500 & UpwardRPM > 1500),
	    [
		*mi9$, e$
        sav_mi9 = zero
		pfspindleout, e$
		]
	  if speed >= 1500 & (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & (UpwardRPM > 0 & UpwardRPM < 1500),
	    [
		*mi10$, e$
        sav_mi10 = zero
		pfspindleout, e$
		]
	  
      pcom_movea

 

Colin,

  Thank you for taking time to reply my question. I tried as you instructed and that didn't work.  I guess it's something more than the "FEED" value.

Link to comment
Share on other sites

For those who want to do something similar like what I have, I found what I've done wrong.  Here are the codes:

 

 

 

 

      if HalfSectionRPM > 1500 & mi10$ > zero & speed < 1500,
        [
         *mi10$, e$
         sav_mi10 = zero
        ]
 
      if (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & mi9$ > zero & speed >= 1500,
       [
        *mi9$, e$
        sav_mi9 = zero
       ]
 
      pfzout, [if peck2$ > 0 & peck2$ <> rpm, *HalfSectionRPM],[if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], no_spc$, "(Final Depth)", e$
 
      if (UpwardRPM > 0 & UpwardRPM > 1500) & mi10$> zero & (HalfSectionRPM >0 & HalfSectionRPM < 1500),
       [      
   *mi10$, e$
        sav_mi10 = zero
       ]
 
     if (UpwardRPM > 0 & UpwardRPM < 1500) & mi9$> zero & (HalfSectionRPM > 0 & HalfSectionRPM <1500),
      [
       *mi9$, e$
       sav_mi9 = zero
      ]
Link to comment
Share on other sites

hi,

 

I mean you should do something like that in your pG1drill/pdrlcst13 postblocks (i didn't test but this is the idea):

pcan1, pbld, no_spc$, sgcode, [if HalfSectionLengthCalculation <> 0, *HalfSectionLengthCalculation, 
*HalfSectionFeedRate, else, pfzout, *feed], strcantext, no_spc$, "(Half Section Downward)", e$

Hi David,

  This is what I changed and it worked, thank you for your input.

 

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

      if HalfSectionRPM > 1500 & mi10$ > zero & speed < 1500,
        [
         *mi10$, e$
         sav_mi10 = zero
        ]
 
      if (HalfSectionRPM > 0 & HalfSectionRPM < 1500) & mi9$ > zero & speed >= 1500,
       [
        *mi9$, e$
        sav_mi9 = zero
       ]
 
      pfzout, [if peck2$ > 0 & peck2$ <> rpm, *HalfSectionRPM],[if HalfSectionFeedRate > 0, *HalfSectionFeedRate, else, *feed], no_spc$, "(Final Depth)", e$
 
      if (UpwardRPM > 0 & UpwardRPM > 1500) & mi10$> zero & (HalfSectionRPM >0 & HalfSectionRPM < 1500),
       [      
   *mi10$, e$
        sav_mi10 = zero
       ]
 
     if (UpwardRPM > 0 & UpwardRPM < 1500) & mi9$> zero & (HalfSectionRPM > 0 & HalfSectionRPM <1500),
      [
       *mi9$, e$
       sav_mi9 = zero
      ]
Link to comment
Share on other sites
  • 3 weeks later...

What are you trying to achieve might I ask?

I remember reading WAAAAAAAY back when in a really nice speed and feed book, when drilling holes, after a certain depth / diam ratio, the speed and feed should be decreased by a certain amount.

 

Is "this" what your a tempting to do?

Looking at your output though, I dont understand why you would feed part way out of hole, then rapid all the way out.....is this to give time for chips to evacuate before rapiding out(possibly causing drill to bind up in hole)?

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