586,062 active members*
4,884 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > Alphacam > Editing PP to work better with ATC macro
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2010
    Posts
    813

    Editing PP to work better with ATC macro

    Hello all, I been using Alphacam with Mach3 PP successively for some time . I use the 2010 screenset with Mach3 and 1 of the great features that comes with it is the ATC macro. I'm attempting to tweak/edit my PP so all works smoother together. I generated some Gcode from Alphacam using 3 different tools to help explain 2 things I'm trying to achieve.

    The first I THINK I already accomplished... I removed the last line "G91 G28 Y0 Z0" in all operations except the last and replaced it with M5. I'm no programmer so hoping some1 could tell me if this could be a problem. I ran the code successively but held hand on Estop button the whole time.

    The second thing is to remove the M6 in the first operation. It seems like anything I do in the PP doesn't stop the M6 from being written in any of the operations no less just 1. Is this possible to do without some complicated sub routine or at all?

    Any info would be extremely appreciated.


    N1 (FLAT 1-4 IN 2F EC SCB)
    G00 G90 G43 X7.569 Y6.326
    T1 M6<------------------------------------------Remove this M6
    Z1
    S4500 M3
    M9
    G00 Z0.5
    G01 Z-0.5 F144.
    G02 X9.405 Y3.146 R2.12 F288.
    X5.733 R2.12
    X7.569 Y6.326 R2.12
    G00 Z1.
    G91 G28 Y0 Z0<-------------------------This line replaced with M5

    N2 (FLAT 1-8 2F EC SCB)
    G00 G90 G43 X2.841 Y10.213
    T1 M6
    Z1.
    S4500 M3
    M9
    G00 Z0.5
    G01 Z-0.5 F177.6
    G02 X4.164 Y7.923 R1.527 F355.2
    X1.519 R1.527
    X2.841 Y10.213 R1.527
    G00 Z1.
    G91 G28 Y0 Z0<-------------------------This line replaced with M5

    N3 (FLAT 0.5IN 2F EC SCB)
    G00 G90 G43 X-0.25 Y-0.25
    T1 M6
    Z1.
    S4500 M3
    M9
    G00 Z0.5
    G01 Z-0.5 F139.14
    X12.25 F278.28
    Y12.25
    X-0.25
    Y-0.25
    G00 Z1.
    G91 G28 Y0 Z0

    M30

  2. #2
    Join Date
    Apr 2015
    Posts
    327

    Re: Editing PP to work better with ATC macro

    Send me your post.
    [email protected]
    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  3. #3
    Join Date
    Mar 2010
    Posts
    813

    Re: Editing PP to work better with ATC macro

    Thank you, Email sent. I sent you the original unedited by me. Below are the sections I edited and seem ok. The M6 is being called in the Rapid Moves section "$20", what I cant figure out is how to write to remove it only in first operation.

    Really appreciate your help,
    Dan


    $15 Main Program TRAILING lines
    $MODAL OFF
    $IF INDEX_USED = 1
    ''G00 Z[SAFE_Z_INDEX]
    ''M68
    ''G00 A0
    ''M69
    $ENDIF
    G91 G28 Y0 Z0<---------------------------------------Added "G91 G28 Y0 Z0"
    M30


    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    $------------------------ TOOL CHANGES --------------------------------------
    $70 Cancel current tool. Use [T] for current tool number if required.
    $MODAL OFF
    $IF NT > 0
    M5<---------------------------------------This line I edited to replace G91 G28 Y0 Z0 with M5
    M1

    $ELSE
    M5<-----------------------------------------------------------This line I edited to replace G91 G28 Y0 Z0 with M5


    $ENDIF

  4. #4
    Join Date
    Mar 2010
    Posts
    813

    Re: Editing PP to work better with ATC macro

    Hello Marek, once again I apologize for not being more clear in first post of thread.

    Below is Gcode generated from Alhpacam using your edited PP and the same sample geometry I used in first post. Its a square with 2 circles inside and I used 3 different tools to cut. Just removing the M6 from PP removes all M6 written for each operation. I need it removed just in the first operation, and need them in any additional operations. Its the M6 that starts the ATC auto zero macro. Programing skills and knowledge is needed to accomplish this and I don't have it.

    Thanks very much for your help its extremely appreciated,
    Dan




    N1 (FLAT 1-4 IN 2F EC SCB)
    G00 G90 G43 X7.569 Y6.326
    T1 <-----------------------------------------------------------------M6 removed here is what's needed
    Z1.
    S4500 M3
    M9
    G00 Z0.5
    G01 Z-0.5 F144.
    G02 X9.405 Y3.146 R2.12 F288.
    X5.733 R2.12
    X7.569 Y6.326 R2.12
    G00 Z1.
    M5

    N2 (FLAT 1-8 2F EC SCB)
    G00 G90 G43 X2.841 Y10.213
    T1 <-----------------------------------------------------------------need M6 here
    Z1.
    S4500 M3
    M9
    G00 Z0.5
    G01 Z-0.5 F177.6
    G02 X4.164 Y7.923 R1.527 F355.2
    X1.519 R1.527
    X2.841 Y10.213 R1.527
    G00 Z1.
    M5

    N3 (FLAT 0.5IN 2F EC SCB)
    G00 G90 G43 X-0.25 Y-0.25
    T1 <-----------------------------------------------------------------need M6 here
    Z1.
    S4500 M3
    M9
    G00 Z0.5
    G01 Z-0.5 F139.14
    X12.25 F278.28
    Y12.25
    X-0.25
    Y-0.25
    G00 Z1.
    M5

    M30

  5. #5
    Join Date
    Apr 2010
    Posts
    89

    Re: Editing PP to work better with ATC macro

    Hi,

    In the $1000 section of the Post create a variable

    FLAG_1 (6,0,0) '' Flag to enable/disable M6

    In the $10 section at the beginning of the Post set FLAG_1 to 1

    $LET FLAG_1 = 1

    in the $80 section of the post do this

    $IF FLAG_1 = 1
    T[T]
    $LET FLAG_1 = 0
    $ELSE
    T[T] M6
    $ENDIF

    or this

    $IF FLAG_1 = 1
    T[T]
    $LET FLAG_1 = 0
    $ELSEIF FLAG_1 = 0
    T[T] M6
    $ENDIF

    With this FLAG_1 is set to 1 at the beginning of the Post so on the first tool call the output will be just T then Flag_1 is set to zero so on subsequent tool calls the output will be T1 M6

    Hope this helps

  6. #6
    Join Date
    Mar 2010
    Posts
    813

    Re: Editing PP to work better with ATC macro

    Thanks so much Frank. Will post back results.

  7. #7
    Join Date
    Mar 2010
    Posts
    813

    Re: Editing PP to work better with ATC macro

    Works Great!!! Thanks again Frank.

Similar Threads

  1. Macro b work offset
    By Cannon in forum Fanuc
    Replies: 18
    Last Post: 05-20-2012, 10:52 AM
  2. Xilog macro editing problem
    By Ashsav in forum Commercial CNC Wood Routers
    Replies: 3
    Last Post: 02-28-2012, 09:25 AM
  3. Editing G81 macro
    By flannman in forum Mach Wizards, Macros, & Addons
    Replies: 0
    Last Post: 02-12-2011, 08:20 PM
  4. Editing a named spline using a macro?
    By spacely in forum UG NX
    Replies: 0
    Last Post: 04-26-2010, 10:06 PM
  5. my 1st macro, ya think it'll work?
    By kendo in forum Haas Mills
    Replies: 13
    Last Post: 08-15-2008, 03:15 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
  •