587,157 active members*
3,074 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1

    Angry Grinder macro help please!!!

    Hello all,

    I am attempting to save a friends company a ton of time by modifying this macro for his grinding machine. g-code is no problem for me and i think i have this macro figured out for the most part. let me back up a second... This is to cut a square carbide insert, they run this program then turn the tray of parts 180 and run again, problem is, it cuts the outside of the insert, then turns to -80deg to cut a 10deg land on the edges. So, when they turn 180 and re-run all they need to do is the 10deg angle, not the outside again so they are wasting about 5min per insert cutting air on the second op. So heres my question, how can i remove the section that cuts the outer edge and then they can just change the program when they turn 180 and have it only cut the 10deg angle.... seems like it has to be very simple but not being fluent in macro i wanted to see what the great community of cnczone thought. any help/suggestions are greatly appreciated. here we go

    %
    :0001(SNG843S)
    #900=1
    #902=1
    #904=0
    #903=0.0000
    #534=1.0000
    G28 B0
    G90 G92 B0
    G200
    #10=0.0000
    IF[#1009EQ1]THEN#10=0.0
    G90 G00 C#10
    #915=0.0000

    ****this part cuts the outside, this is the part i need to remove/jump*********
    I believe this is where i need to jump from, or start deleting, just want to make sure to have all
    necesary info and all axis in correct position as compared to where the angle cutting starts.

    M80 A0 B0.0000 C0.0000 I0.0000 J0.0000 K0.0000 D0.0000 S0.0 U0.0000
    V0.0000 Z0 Y0 W-0.9500 Q0.3500 R0.1750 F35.0000 T1500 H0 M0 X0
    IF[#104EQ3]GOTO2000
    M03 S1500
    M08
    M801 Y-0.9500 Q0.3500 R0.1750 F35.0000 B45.0000
    G00 B45.0000 C0.0000



    N2000
    G91 G00 B[#804]
    G90
    G65 P9100 A1. U0.5150 X0.5000 F0.0400 B1 C4
    G04X1.0
    G100 I0.5000 J[0.5150+#800] K90. A0.0000 F#821 W1. R0. Y0.
    G300
    G65 P9100 A1. U0.5150 X0.5000 F0.0400 B2 C1
    G04X1.0
    G100 I0.5000 J[0.5150+#800] K90. A0.0000 F#821 W1. R0. Y0.
    G300
    G65 P9100 A1. U0.5150 X0.5000 F0.0400 B3 C2
    G04X1.0
    G100 I0.5000 J[0.5150+#800] K90. A0.0000 F#821 W1. R0. Y0.
    G300
    G65 P9100 A1. U0.5150 X0.5000 F0.0400 B4 C3
    G04X1.0
    G91 G00 X[#802]
    M800

    *********************maybe here?***************************************

    G102 D1.0000 R[0.0470+#805] F2.0000 A0.0000
    G65 P9108 A1
    G90 G00 X#801 M07
    /2 G90 G00 B45.0000
    /2 M200

    Im thinking it needs to start here

    G90 G00 B360. C0.0000
    G92 B0
    G28 B0
    M31
    M11

    *******this is where it does the 10 degree below***********
    just not sure exactly where it needs to start

    M03 S1500
    M08
    G92 B0
    G00 B45.0 C0.0000
    G91 G00 B[#924+#804]
    G90
    G100 I#801 J[0.0868+#811] K-80.0000 A0.F#822 R0. Y[-0.2400-#5022] U1. W1.
    G300
    M801 Y-0.2400 Q0.0600 R0.0300 F10.0000
    G65 P9100 A0. X[0.0834-#536] F0.4000
    G04 X1.0
    G100 I0.4800 J[0.5000+#810-#536] K90. A-80.0000 F#821 W1. R0. Y0.
    G300
    G65 P9100 A0. X[0.0834-#536] F0.4000
    G04 X1.0
    G100 I0.4800 J[0.5000+#810-#536] K90. A-80.0000 F#821 W1. R0. Y0.
    G300
    G65 P9100 A0. X[0.0834-#536] F0.4000
    G04 X1.0
    G100 I0.4800 J[0.5000+#810-#536] K90. A-80.0000 F#821 W1. R0. Y0.
    G300
    G65 P9100 A0. X[0.0834-#536] F0.4000
    G04 X1.0
    M800
    #20=[0.4800-[#536/SIN[10.0000]]]
    #21=[0.4800-[#536/SIN[10.0000]]]
    #22=[90.]
    #23=[10.0000-90.]
    #24=[0.0470+#812]
    #24=#24-0.0200-[#536/SIN[10.0000]]
    #25=#22/2.
    #15=#20-#24
    #16=[#21/SIN[#22]]-[#20/TAN[#22]]-[#24*TAN[#25]]
    #17=SQRT[#15*#15+#16*#16]
    #18=ATAN[#16]/[#15]
    #26=[#17*COS[#18-#25]]+#24
    G100 C1 I#20 J#26 K#25 A#23 F10.0000 R#24 Y[0.0400]
    G300 C1
    G100 C2 I#26 J#21 K#25 A#23 F10.0000 R#24 Y-[0.0400]
    G300 C2
    G300 C1
    G300 C2
    G300 C1
    G300 C2
    G300 C1
    G300 C2
    G65 P9108 A0.
    G90 G00 Y[1.181+#814]
    G28 X#801 C-45.0 M07
    G28 Y0
    G90 G00 B360
    G92 B0
    G28 B0
    M13
    /3 M201
    #10=0.0000
    IF[#1009EQ1]THEN#10=0.0
    G90 G00 C#10
    G65 P8013
    M26
    M30
    %



    :violin: please save the colorful comments, im new to macros and my friend is clueless

  2. #2
    thought this might help...
    as far as the machine all i know is what the book says which is ap-50 fanuc robot

    this is the part

    Click image for larger version. 

Name:	Untitled.png 
Views:	20 
Size:	327.0 KB 
ID:	169610

  3. #3
    Join Date
    Aug 2011
    Posts
    2517
    its difficult to see exactly what the macro is doing because it's using some non-standard G-codes (G100, G102) and non-standard M-codes calling MTB macros (M80, M800, M801). They are most likely either built into the control flashROM and run via the macro executor or called from 9000-series programs.
    You will need to check your parameters to see if the M-code is set to run 9000-series programs or non-viewable macro-executor programs. You don't say which control you have so can't advise on parameter numbers but if you check your manual in the macro section it should tell you which parameters control calling custom M-codes. If you can view the macros called from the M-codes then it should be possible to figure it out.

    also, there is a parameter that allows a macro to run in single block mode. if you set that you can just watch the macro and see where it starts the section you don't want then just put a GOTO to another line and it'll skip it. No need to delete anything.
    So you add (for example) N999 where you want it to jump-to, then at the jump-from point put in the program GOTO 999
    It's best not to delete complicated custom macro stuff unless you really know what it does.

Similar Threads

  1. building manuel surface grinder and a od grinder
    By toolsrule in forum Benchtop Machines
    Replies: 8
    Last Post: 12-02-2015, 11:20 AM
  2. Replies: 2
    Last Post: 12-19-2012, 01:28 PM
  3. Replies: 3
    Last Post: 02-13-2012, 07:20 PM
  4. sunnen grinder lathe attachment or in block grinder?
    By Goldhunter_2 in forum Uncategorised MetalWorking Machines
    Replies: 4
    Last Post: 06-28-2011, 01:42 PM
  5. ID/OD GRINDER MACRO
    By trangt143 in forum Parametric Programing
    Replies: 1
    Last Post: 09-10-2009, 02:35 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
  •