586,096 active members*
3,758 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2008
    Posts
    1

    Macro Programming

    I've been programming with esprit cam software for 9 years and just recently
    have been trained to start using Master Cam X2 cam software.I like both
    very well but in the work I do, I need to be able to program
    using macros. I 've had a programming class on macros recently and
    having a hard time understanding how to write a macro program.
    Any tips on how I can pick this up within a reasonable amount of time.

  2. #2
    Join Date
    May 2007
    Posts
    1003
    John, sorry that you haven't received an answer yet. I can't help you either. You are already further along than I am since you have taken a class on it. I have been teaching myself, although I do want to take the online course. Haven't gotten the nerve to sign up yet.

    Have you visited the Parametric Programming section yet? It is under G-Code Programming. You might get some answers there. You will also find some examples of Parametric programming.

    Do you have any specific questions? We all like to help when we can. Best advice I can give is to just start doing it. I only program for lathes, so am limited in my use of parametric programming.

    I started off by writing a master program for each thread size (from 10-32 to 1/2-20) for a family of studs we make for a sister company. It required changing one variable to start machining another part. Diameters were all controlled by 500 series macros. No longer had to go out and modify a program because of taper or because one diameter was on size while another was a few tenths off. Also saved me a ton of programming.

    I then put my Barfeed and Cut-off operations into a subprogram. At first I used 500 series macros, but when we got a new family of studs, I started running out of unused variables, and so went to the 100 series variables. Then I learned how to use the G65 Macro call. Now both of these operations are not only called by one block, but all the variables are also set in that block. It eliminated several blocks from my programs. I picked letters that made it easy for the operators to understand which had to be changed when necessary. T for station number (Tool) being used. F for feedrate, X for X-starting position, etc. Course not every variable works out that way.

    I got tired of writing the same part program for the same lathe just because a different size stock was being used. First I switched to a G71 canned cycle to make my life easier. Then I added a variable for the stock size. Problem was that I still needed to change the DOC manually for best results. Then I asked myself why a WHILE statement couldn't be written to handle that. So I did. It will also change the feedrate based on the DOC.

    Guess what I am saying (in a rather long way ) is that you will learn more ways of using variable/parametric programming as you use it. You will also come to understand it better as you use it.

    I have a parametric program (sent to me by a person posting here, and never used yet) that will do grooves based on the assigned variables. My next project is to write my own. His puts 45 degree chamfers on it, but I always swing radii to avoid any burrs being pushed back. Talking about on the 45 degree chamfer moves. Sometimes I only need a radius at the OD/ID, no 45 degree. This will require a little more complicated routine.

    Most of the guys posting here are so far ahead of me that it isn't funny. I blame a lot of it on only having worked for this company, and not being able to program for mills. Working at different companies will give you the opportunity to learn more things, but I have never been one to jump from company to company. Fear, I guess.

  3. #3
    Join Date
    Apr 2007
    Posts
    42
    I have done some macro programming. I learn it after reviewing the following book:

    Fanuc CNC Custom Macros: Programming Resources For Fanuc Custom Macros B Users

    By: Peter Smid

    I found it easy to follow, unlike the Fanuc manual.

  4. #4
    Join Date
    May 2007
    Posts
    1003
    Quote Originally Posted by Chipload View Post
    I have done some macro programming. I learn it after reviewing the following book:

    Fanuc CNC Custom Macros: Programming Resources For Fanuc Custom Macros B Users

    By: Peter Smid

    I found it easy to follow, unlike the Fanuc manual.
    I've heard of that book before. Guess I will need to order a copy for myself. Thanks for giving me the title of the book and the author. Appreciate it.

    EDIT: Book is ordered.

Similar Threads

  1. Macro Programming
    By danhaskell in forum Fanuc
    Replies: 1
    Last Post: 05-07-2008, 08:04 PM
  2. Macro Programming Intro?
    By I_flungdung in forum G-Code Programing
    Replies: 2
    Last Post: 04-14-2008, 11:16 PM
  3. Macro Programming
    By dapoling in forum G-Code Programing
    Replies: 4
    Last Post: 01-18-2008, 06:33 PM
  4. Do I need macro programming in future
    By koppis in forum Uncategorised CAM Discussion
    Replies: 3
    Last Post: 09-19-2006, 07:44 PM
  5. Macro/Parametric Programming
    By screensnot in forum Fadal
    Replies: 4
    Last Post: 03-29-2005, 03:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •