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:

Using macros


BijuGeorge
 Share

Recommended Posts

You're talking about generating parametric macros off of programmed geometry, ughhhh.

 

Not sure how successful that's going to be.

 

A macro is a program that takes the variables entered into it and cuts the programmed path.

 

I know how to write a macro but I have never done anything, seen anything or even know if it could be done.

 

Macros are usually generated by hand.

 

Not much help, sorry

Link to comment
Share on other sites

I used macros back in Version 9. They record commands for doing repatative tasks. If you are using the same commands over and over again to create geometry the are well worth it. All you have to do is click record. Run through your commands to create the geometry, turn off record and name the macro. Then just select play every time you need to use it. Since X came out I don't use them anymore. I find a custom toolbar just as fast.

Link to comment
Share on other sites

Apples and oranges. Two different kinds of macros. Macros in Mastercam I've never used as far as I recall, but as I understand it you turn on the macro recorder, do some stuff, and turn off the recorder. Then you can play back the macro in lieu of doing the stuff by hand. Macro B programming is something that runs on the CNC machine along with the G-Code. It's a way of using variables, flow control (if/then/goto) and math and trig functions in the CNC program. Many but not all CNC machines support Macro B. I've used it for serial number engraving, and another good use is for a "family of parts" where you change a variable and a number of dimensions are automatically adjusted to match.

Link to comment
Share on other sites

Yes I am talking about Macros in CNC machines not the ones used in Mastercam itself to automate tasks. I want to know what settings you change in Mastercam so that when you create the NC code there are Macro statements in it. Somewhere on the forums I read that you can use custom drill cycles for that, is that true? I am a novice, so my talk may sound crap to you but thank you guys for responding. Please lead me in the right direction.

Link to comment
Share on other sites

There are many many ways you can incorporate macros into CNC programming. How you do it is dependent upon what the macros (all custom built and stored away as subprograms) are going to do.

 

for example here is a return for tool change macro.

 

O9950(TOOL CHANGE)

G91G28Z0.

M09

M05

T#20

M06

G90

M99

 

and its call from the main program (or another sub)

 

G65P9950T22

 

Hardcode the 'G65P9950' and have Mcam output the appropriate tool number from the ops and then use that code in the ptlchg postblock.

 

To get the pound sign '#' output from the post you need to code the post like this , 35, (35 is the ascii code for the pound sign).

 

You can set up helical bore cycles, custom deep hole drill cycle, etc , and have the Mcam post variables output as arguments for your macros.

 

BUT, first you have to know the macro's design , purpose and required arguments.

 

Without that knowledge, it's kinda hard to be of much help from here.

 

cheers.gif

 

cp

Link to comment
Share on other sites

BGeorge

 

Here's a link to some information that might be of help.

 

Linky

 

Yesterday I though you were talking about something different but this should get you some of the info you need.

 

Charlie, Are you doing Eastec this year?

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