586,974 active members*
3,493 visitors online*
Register for free
Login
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    May 2010
    Posts
    0

    Passing profile to a macro

    Hello,
    I'm a mechanical engineer, and I'm developing a set of macros to ease the work of similar parts on our lathes.

    What I need now is to use the G71 built in macro inside a custom macro.
    The use of G71 is clear to me: in the second line of the G71 calling I have to put e.g. P100 Q200 (together with some other parameters) to tell the control that my profile is defined between lines N100 and N200.

    But how can I put the G71 command inside a CUSTOM MACRO having the profile defined in the MAIN PROGRAM?

    In other words, how can I realize something similar to what Fanuc programmed, when it created a macro (G71) that uses a block (of profile definition) in the main program?

    I need this for a lot of reasons that I can't explain now.

    Any idea?

  2. #2
    Join Date
    May 2010
    Posts
    0
    PS: I work on fanuc 0i, 18 and 21

  3. #3
    Join Date
    Jun 2008
    Posts
    1511
    What you can do is define the shape using variables in your main program and then use the subprogram to machine the part with G71.

    O0001(main program)
    #100=10.(od diameter)
    #101=1.(z distance to cut)
    #102=.01(finish stock on x)
    #103=.05(pick size)
    #104=.01(feed)
    #105=200(speed)
    M98P2
    M30

    O0002(sub program)

    G0X11.Z1.
    Z.1
    G96S#200M3
    G71P100Q200U#102W0D#103F#104
    N100G0X#100
    Z-#101
    N200X#101+.1
    G0Z1.
    M99

    I just slapped this together as a reference so I am sure that there are some errors in it but it gives you the general idea.

    Just as a side note I don’t like canned cycles. They usually have a lot of wasted time in them. If you are going to go this far I would just write a macro designed to do what you need instead of putting a canned cycle in it. But there is nothing wrong with doing it as above.

    Stevo

Similar Threads

  1. Passing Geometry back and forth between Cad and Cam
    By Mike RZMachine in forum Dolphin CAD/CAM
    Replies: 4
    Last Post: 10-13-2009, 02:31 PM
  2. Macro A or Macro B On fanuc o-md
    By macrosat in forum Fanuc
    Replies: 1
    Last Post: 07-29-2009, 12:49 PM
  3. Replies: 2
    Last Post: 03-27-2009, 09:15 PM
  4. Convert Fanuc Macro to Fadal Macro
    By bfoster59 in forum Fadal
    Replies: 1
    Last Post: 11-09-2007, 06:41 AM
  5. passing arguments to a sub program
    By kiprip in forum Mazak, Mitsubishi, Mazatrol
    Replies: 1
    Last Post: 07-13-2006, 05:11 PM

Tags for this Thread

Posting Permissions

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