586,094 active members*
3,900 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > Mastercam > Saving code for easy reuse somehow?
Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2007
    Posts
    47

    Saving code for easy reuse somehow?

    Hello,
    So I've got some common code I want to be able to re-use (specifically, I want to be able to pull out our probe and run some macros with certain parameters), and I was wondering if there is a way to store that text somewhere for easy re-use in mastercam.

    I basically want to have some pre-defined manual entry commands, which I can adjust after picking them for whatever specific parameters I need.

    That is, unless mastercam can do it more intelligently. Is there any way to define a probe and have mastercam treat it differently? Moving the probe safely requires running a macro that turns it on, and will stop it if it hits something, and then once I position the probe, I am going to want to run some zeroing macro.

    There are also some macros for using the table probe to check a tool, or sero a range of tools. I would love to be able to click around a bit and insert some basic code for one of those things easily.
    Ideas?
    Thanks!
    -Taylor

  2. #2
    Join Date
    Jun 2006
    Posts
    440
    I use a macro call to check tool lengths against breakage and wear on a couple of programs we run. The actual macro is in the control but I have a text file for MC that is the call for it. What I do is insert a Manual Toolpath (Menu bar Toolpaths-->Manual Entry or user defined toolbar button) click Use Text File, Select and As Code after the operation for the tool I want to check. I can then select the Edit Now button which will pull it up in my editor, insert the variables I need and then save it as a txt file with the same name as the nc file. I then reselect the txt file and pick the one I edited. It will post like any other toolpath then.

    There may be a better method but this works well for me.

    Quote Originally Posted by facegarden View Post
    Hello,
    So I've got some common code I want to be able to re-use (specifically, I want to be able to pull out our probe and run some macros with certain parameters), and I was wondering if there is a way to store that text somewhere for easy re-use in mastercam.

    I basically want to have some pre-defined manual entry commands, which I can adjust after picking them for whatever specific parameters I need.

    That is, unless mastercam can do it more intelligently. Is there any way to define a probe and have mastercam treat it differently? Moving the probe safely requires running a macro that turns it on, and will stop it if it hits something, and then once I position the probe, I am going to want to run some zeroing macro.

    There are also some macros for using the table probe to check a tool, or sero a range of tools. I would love to be able to click around a bit and insert some basic code for one of those things easily.
    Ideas?
    Thanks!
    -Taylor
    Suppose you were an idiot and suppose you were a member of Congress. But I repeat myself.
    Mark Twain

  3. #3
    Join Date
    Dec 2008
    Posts
    3109

    Manual Entry's the way to go

    [QUOTE=Shotout;601185]What I do is insert a Manual Toolpath (Menu bar Toolpaths-->Manual Entry or user defined toolbar button) click Use Text File, Select and As Code after the operation for the tool I want to check. I can then select the Edit Now button which will pull it up in my editor, insert the variables I need and then save it as a txt file with the same name as the nc file. I then reselect the txt file and pick the one I edited. It will post like any other toolpath then. QUOTE]


    I agree, "Manual Entry" is the way to go
    - have a generic text file on your PC for each gauging situation, and do as Shotout suggests, and then customise the
    - or copy & paste into the "Manual Entry" window, then to modify the actual code to suit this particular part, it then is permanent with no modifications required after each posting

  4. #4
    Join Date
    Aug 2007
    Posts
    47
    Hmmm... Sad, that still isn't as easy as just picking it as a pre-defined entry from a menu.

    What about with visual basic? Could I add a menu option that way?

    Thanks,
    -Taylor

  5. #5
    Join Date
    Apr 2003
    Posts
    3578
    What about with visual basic? Could I add a menu option that way?
    Yes
    Go to the Mastercam forum and there is a section on just doing these types of things,
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
    Cadcam
    Software and hardware sales, contract Programming and Consultant , Cad-Cam Instructor .

  6. #6
    Join Date
    Aug 2007
    Posts
    47
    Quote Originally Posted by cadcam View Post
    Yes
    Go to the Mastercam forum and there is a section on just doing these types of things,
    ? This is the mastercam forum. Unless you mean a forum on a different site?
    -Taylor

  7. #7
    Join Date
    Apr 2003
    Posts
    3578
    The Developers forum on the Main Mastercam forum on Emastercam.com the main Mastercam forum for all Mastercam users.
    I am not trying to get away from here but what you are looking for is there.
    But that forum is not like here with all kinds of diffrent options . it is based on Mastercam only.
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
    Cadcam
    Software and hardware sales, contract Programming and Consultant , Cad-Cam Instructor .

  8. #8
    Join Date
    Aug 2007
    Posts
    47
    Quote Originally Posted by cadcam View Post
    The Developers forum on the Main Mastercam forum on Emastercam.com the main Mastercam forum for all Mastercam users.
    I am not trying to get away from here but what you are looking for is there.
    But that forum is not like here with all kinds of diffrent options . it is based on Mastercam only.
    Oh cool thanks, I'll have a look!
    -Taylor

  9. #9
    Join Date
    Mar 2006
    Posts
    1013
    You can also customize a Canned drilling cycle to output your probing macro.

    Mike Mattera
    Tips For Manufacturing Training CD's, DVD's for Mastercam, SolidWorks, Inventor, G-Code Training & More
    http://www.tipsforcadcam.com

  10. #10
    Join Date
    Aug 2007
    Posts
    47
    Quote Originally Posted by Mike Mattera View Post
    You can also customize a Canned drilling cycle to output your probing macro.

    Mike Mattera
    Oooh sounds like a good idea, I will try that!
    Thanks,
    -Taylor

Similar Threads

  1. Reuse the waste oil
    By beruren in forum Environmental / Alternate Energy
    Replies: 0
    Last Post: 03-04-2009, 03:58 AM
  2. MastercamX not so easy with easy projects
    By X7racer in forum Mastercam
    Replies: 7
    Last Post: 05-22-2008, 03:28 AM
  3. Easy CNC and Easy Stepp'n
    By kylecroft in forum Community Club House
    Replies: 5
    Last Post: 02-18-2007, 06:54 PM
  4. Saving the Changes,
    By CharlieM in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 01-11-2006, 08:24 PM
  5. saving code
    By trevorhinze in forum BobCad-Cam
    Replies: 1
    Last Post: 08-05-2005, 02:42 PM

Posting Permissions

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