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:

Heidenhain Gurus


MrFish
 Share

Recommended Posts

I'm looking for some help in developing a macro to speed up the tool setup procedure.

 

On our Haas machines there is a handy renshaw developed macro for setting your tools up off the tool setter. You basically tell it the first tool and last tool and it automatically indexs between the tools and runs the tool measeurement cycle.

 

I was hoping that some clever Heidenhain guru could help me to write one to do the same thing on our DMG with Heidenhain 540 controller ?

 

I understand the basics of the Heidenhain language but not enough to write a indexing style macro with adjustable start and end tools.

 

Any help is much appreciated.

Link to comment
Share on other sites

We use a program written to call each and measure it sequentially, including a choice of 583 or 584 measure cycle, for tools getting a radius measurement as well as length. Its just a simple hand-written prog that uses a label call for each measure cycle, then we run thru whatever section we want measured, or just let the machine measure everything while we do other stuff...

 

hope that helps

Link to comment
Share on other sites

0 BEGIN PGM KOD MM P

 

1 Q1 = 3 ; Start with tool 3

2 Q2 = 10 ; End with tool 10

3 Q3 = 1 : Radius measurement 1=yes 0=no

 

4 LBL 1

5 TOOL DEF Q1

6 TOOL CALL Q1 Z S1000

7 L M6

 

8 FN 9: IF +Q3 EQU +1 GOTO LBL 2

9 ;Put your length measeurement cycle here.

 

10 LBL 2

11 FN 9: IF +Q3 EQU +0 GOTO LBL 3

12 ;Put your Radius measeurement cycle here.

 

13 LBL 3

14 Q1 = Q1 + 1

15 FN 10: IF +Q1 NE +Q2 GOTO LBL 1

16 FN 9: IF +Q1 EQU +Q2 GOTO LBL 1

17 END PGM KOD MM P

 

 

Something like this I think...

 

/frostfritt

Link to comment
Share on other sites

Frostfritt - here is what I ended up with , didn't need the radius function so modified it a bit and had to add in the Greater Than Equation to get it to stop after the last tool.

 

 

 

0 BEGIN PGM MEARSURETOOLSEQ MM

1 L Z+0.1 C+0 B+0 R0 FMAX M91

2 L X+136 Y-0.1 Z+0.1 C+0 B+0 R0 FMAX M91

3 Q30 = 7 ;Start tool number

4 Q31 = 9 ;End tool number

5 LBL 1

6 TOOL DEF 0

7 TOOL CALL Q30 Z S500

8 L M6

9 TCH PROBE 481 CAL. TOOL LENGTH ~

Q340=+0 ;CHECK ~

Q260=+50 ;CLEARANCE HEIGHT ~

Q341=+0 ;PROBING THE TEETH

10 Q30 = Q30 + 1

11 FN 11: IF +Q30 GT +Q31 GOTO LBL 2

12 FN 10: IF +Q30 NE +Q31 GOTO LBL 1

13 FN 9: IF +Q30 EQU +Q31 GOTO LBL 1

14 LBL 2

15 L Z+0.1 C+0 B+0 R0 FMAX M91

16 L X+136 Y-0.1 Z+0.1 C+0 B+0 R0 FMAX M91

17 M30

18 END PGM MEARSURETOOLSEQ MM

 

 

Works a treat and i now have time to make a coffee while the machine sets the tools for me (I WISH). Thanks for stairing me in the right direction.

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