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:

Haas sub program looping mill


Recommended Posts

I am trying to use sub programs and have it loop a given number of times:

I want this

code:

(1.250  CARBIDE INSERT ENDMILL)

T2 M6

G0 G54 G90 X12.139 Y-7.56 S1500 M3

T3

G43 H2 Z2. M8

Z0.

M97 P100 L22

G0 G90 Z2.0

X-2.75 Y8.81

Z0.

M97 P200 L22

G0 Z2.

M9

M5

G0 G91 G28 Z0

M01

The post will post the sub programs at the bottom then at the top it post each individual depth creating pages of code.

 

code:

 G00 G17 G20 G40 G49 G80 G90

T2 M06

M01

S1500 M03

M08

G00 G90 G154 P1 X12.139 Y-7.56

G43 H2 Z2.

Z.1

G01 Z-.1 F10.

M98 P11001

G00 G90 Z.25

X12.139

Z.1

G01 Z-.2 F10.

M98 P11001

G00 G90 Z.25

X12.139

Z.1

G01 Z-.3 F10.

M98 P11001

G00 G90 Z.25

X12.139

Z.1

G01 Z-.4 F10.

M98 P11001

G00 G90 Z.25

X12.139

And on and on like this.

Link to comment
Share on other sites

The post puts the sub program at the bottom and all is good there its the line: M98 P101 L2

that repeats over and over with each new depth, I want just one line: M97 P101 L2

With the L telling how many times to loop according to the depth of cut per pass versus the total depth. I know the other M98 will work , I am trying to get fancy and really clean up the code. I will keep going with this, I was just wondering if anybody has tried doing this?

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