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:

Repeated Spindle output on long hand drill cycles /w dwell


Recommended Posts

I have disabled the "Use Canned Cycles" in my machine def drill cycles. I am trying to tweak the post to output correctly. There may be times I wish to not use a canned drill cycle. At any rate, with the MD disabled for them cycles, and I create a standard peck drill cycle, the post outputs the correct Z coordinates.

If I however put a value in for the dwell, it outputs a spindle start and speed command after each peck. I tracked it down to the "pnullspindle" which gets called from "pdwl_spd$".

#Toolchange setup, spindle output, pspindle must be called first
pnullspindle  #Null toolchange and dwell spindle change, g_speed is input
      if prv_css_actv$<>css_actv$ | prv_g_spdir<>g_spdir | prv_speed<>g_speed,
        [
        #(1/10/2003) - test for coolant OFF (with 'cool_w_spd' mode enabled)
        if posttype$ = two & cool_w_spd <> zero
          & coolant$ = zero & prv_coolant$ > zero, pbld, n$, pscool, e$

        #Switch G97/G96 or direction at null or dwell
        #Stop the spindle if direction changes
        if (prv_g_spdir <> g_spdir) & abs(prv_g_spdir - g_spdir) <> three,
            pbld, n$, pnullstop, e$
        if css_actv$,
          [
          speed = g_speed
          pnullg50
          if prv_speed <> speed | prv_g_spdir<>g_spdir | prv_css_actv$<>css_actv$, pcss #(09/05/01)
          ]
        else,
          [
          if (prv_speed<>g_speed | prv_g_spdir<>g_spdir | prv_css_actv$<>css_actv$)
             & g_speed, prpmnull #(09/05/01)
          ]
        ]
      else, pnullg50

I am not really sure what is going on here, or why its being called from inside the dwell, but i tracked it down to the second to last "ELSE" statement. A search the post doesn't find any "prv_speed" anywhere but in here. Perhaps left over from a older post? This is a mplmaster_x9 post.

 

If I suppress this, does anyone know what else I may be effecting that I might not be aware of?

 

Thanks.

  • Like 1
Link to comment
Share on other sites

You can output long hand drill cycles with "Use Canned Cycles" turned on. Here is a broaching cycle I'm using right now;

pdrlcst$         #Custom drill cycles 8 - 19 (user option)
      #Use this postblock to customize drilling cycles 8 - 19
      pdrlcommonb
      if drillcyc$ = 8, # broaching
        [
          temp2_1 = y$ # cutting "Y"
          temp2_2 = y$ - peckclr$ # retracting "Y"
          pdrlcommonb
          n$, pdrlxy, e$
          n$, "M19", e$
          while temp2_1 <> drl_prm2$,
            [
            n$, sg01, "Y", no_spc$, *temp2_1, feed, e$
            n$, *depth$, e$
            n$, sg00, "Y", no_spc$, *temp2_2, e$
            n$, *refht$, e$
            temp2_1 = temp2_1 + peck1$
            if temp2_1 > drl_prm2$, temp2_1 = drl_prm2$
            ]
        ]

      if drillcyc$ = 9, # Gun Drill -- Standard cycle

What it outputs;

O4062
 (1/4" BROACHING TOOL 0 DEGREE SIDE)
IF[#153EQ#0]GOTO1
N4960 G00 G90 X0. Y1.0511 (B0.)
N4970 G43 H10 Z1.1108 S0 M05
N4980 M19
N4990 G01 Y1.0511 F350.
N5000 Z.0608
N5010 G00 Y1.0211
N5020 Z1.1108
N5030 G01 Y1.0546
N5040 Z.0608
N5050 G00 Y1.0211
N5060 Z1.1108
N5070 G01 Y1.0581
N5080 Z.0608
N5090 G00 Y1.0211
N5100 Z1.1108
N5110 G01 Y1.0616
N5120 Z.0608
N5130 G00 Y1.0211
N5140 Z1.1108
.
.
.
N6630 G01 Y1.1946
N6640 Z.0608
N6650 G00 Y1.0211
N6660 Z1.1108
N6670 Z4.315
N1 M99
 
Link to comment
Share on other sites

Thats interesting. Thanks for the example. I was planing on doing something like that for deep hole drilling, but was going to tackle that after I figured this strangeness out.

I have narrowed it down to if CSS is enabled or not. If It is enabled it seems to duplicate the spindle output many times, if G97 is used, it works fine. Just have to track down the flawed logic now.

Link to comment
Share on other sites

Well I think I figured it out, if anyone might need it and or want to see if what I did was correct.

I added

 fmt  4  g_speed

in the format section because g_speed is being matched against prv_speed which is also formatted 4.

I added in the last line of "pspindle" a forced update of g_speed, forcing it to not be decimal point

 if css_actv$ = zero, g_speed = speedrpm, !g_speed

This seems "atm" to be working for me. I will need to test multiple tool paths and see if I broke something.

If anyone sees a glaring error I made, please inform me :)

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