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:

subroutine code


perseid88
 Share

Recommended Posts

I've got this program that I created years ago. Worked great for us. I'm not sure how to recreate it with new coordinates. It contains a subroutine. That part is not my problem. My problem is how to I force the M98 P6 at the end of every coordinate? (there are A LOT more not shown) I don't even mind hand writing the program starting with my standard drill cycle but I need some comment or (?) to "find-replace"

 

This is one tool that does 2 operations at different depths/speed/feed at 7000+ locations with one offset.

 

%

:001111

N10( NAME - 180)

N20( DATE - 06-24-05)

N30 ( START TOOL LIST )

N40 ( T175 1-1/2 DRILL )

N50 ( T175 MAX DEPTH -1.3006 )

N60 ( END TOOL LIST )

 

N70 ( 180 TUBSHEET )

N80 G20

N90 G80

N100 G90

N110 G28 X0 Y0 Z0 H0

N120 G00 Z.2

N150 G54 P6

N160 G00 X87. Y1.1875 M98 P6

N210 X87. Y4.6516 M98 P6

N220 X87. Y8.1157 M98 P6

N230 X87. Y11.5798 M98 P6

N240 X86. Y16.776 M98 P6

 

N33800 X-85. Y15.0439 M98 P6

N33810 X-85.75 Y8.1157 M98 P6

N33820 X-85.75 Y1.1875 M98 P6

N33830 X-86. Y13.3119 M98 P6

N33840 X-86. Y16.776 M98 P6

N33850 X-86.75 Y9.8478 M98 P6

N33860 X-86.75 Y2.9196 M98 P6

N33870 X-87.75 Y1.1875 M98 P6

N33880 X-87.75 Y4.6516 M98 P6

N33890 X-87.75 Y8.1157 M98 P6

N33900 G80

N33910 M09 M13

N33920 M05 M16

N33930 G28 Z0 H0

N33940 G28 X0 Y0

N33950 G00 Z.2

N33960 M02

:6

N4300 T261 H261

N4310 M08 M12 M15

N4320 S1180 F5.25 M03

N4330 G00 Z.1

N4340 G99 G73 Z-1.170 Q.050 J0.015 D0 R.060

N4350 G80

N4360 T262 H262

N4370 G96 F6.6

N7380 G99 G73 Z-1.200 Q0.350 J0 D0.3 R1.600

N7390 G80 G97 M16

N7400 M99

%

Link to comment
Share on other sites

I had my retailer help me years ago to write it into my post (so I thought). That was back in MC9. (or 8 or 7, what was 2005?) Either I don't remember how to "activate" it or MCX is seeing things differently.

What would be the normal "trigger" to output this code (the M98 P6) at the end of each line of XY coords?

Link to comment
Share on other sites
Guest CNC Apps Guy 1

If it's only to be active during drilling cycles, you'll need to add what you need in the pdrill_2$ postblock and in each cycle you need as well.

Link to comment
Share on other sites

For the time being, I wrote a macro within the Mastercam editor that facilitated adding the 7000+ instances of "M98 P6" at the end of each block to my code. It does seem like a simple custom drill cycle could also call out my subroutine at each XY location.

I don't know what "pdrill_2$ postblock" is.

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