Quantcast
Channel: CNCzone.com- Largest Forums for CNC Professional and Hobbyist alike!
Viewing all articles
Browse latest Browse all 72891

Grinder macro help please!!!

$
0
0
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

Viewing all articles
Browse latest Browse all 72891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>