Looking for help on using the Mazak Bolt Circle Macro for G-code. For reference, this is for a Mazak Vertical Mill Mazatrol Cam-M2.
The macro and its execution runs great...but say for a simple three step process of center spot drill, peck drilling, and tapping on a bolt circle; and half way through your peck drilling operation your drill breaks and you need to restart the program on the peck drilling part, bypassing the first step of spot center drill. It seems as if the Macro sub program never terminates and it resumes by not working off the original center position of X0.Y0., but instead where it supposedly last left off on the bolt circle.
Below is my macro (copied directly from old Mazak manual):
(sub program 9999);
G101A#70B#4001;
G101A#71B#4003;
N10 G204A15B#8C0;
G101A#4200B902;
N15;
N20 G118A#12B#8;
G103A#12B#8C#12;
G201A25B#12C0;
G101A#42F3;
1001007800B903;
N25 G204A30B#18C0;
G101#4200B904;
N30 G202A35B0C#18;
G101A#4200B905;
N35 G90;
N45 G101A#75B0.;
G111A#12B#8;
G101A#32B0.;
N50 G203A70B#12C#75;
G105 A#30B360.C#8;
G102 A#76B#1C#32;
G102 A#31B#75C1.0;
G104 A#32B#30C#31;
G107 A#77B#18C#76;
G102 A#77B#B5;
1003007877C#24;
G106 A#78B#18C#76;
G102 A#78B#78C#25;
X#77Y#78;
G102 A#75B#75C1.;
G111 A#12B#8;
G203A70B#12C#75;
G98;
G200A50;
N70 G00X#2F4;
100400144Y#25;
G#70G#71;
M99;
Now here is our program calling the use of the above bolt circle macro:
G00G91G28Y0.Z0.;
N10 T001(CD);
M06;
G00G90G43G54H1X0.Y0.Z3.M03S1250F10.;
G81R.1Z-.1L0;
G65P9999R10.3125A0.H12.X0.Y0.;
G28G91G80Y0.Z0.;
N20 T002(DR17/32);
M06;
G00G90G43G54H2X0.Y0.Z3.M03S450F5.;
G83Z-.8R.1Q.2L0;
G65P9999R10.3125A0.H12.X0.Y0.;
G28G91G80Y0.Z0.;
N30 T003(C/SINK);
M06;
G00G90G43G54H3X0.Y0.Z2.M03S200F5.;
G82Z-.232R-.18P.2;
G65P9999R10.3125A0.H12.X0.Y0.;
G28G91G80Y0.Z0.;
M30;
So if we want to start the program at N20, it will still be in subprogram 9999 and not work off the correct X0.Y0.Z3. center, almost as if it doesnt even read that first G00 line. If we go back and put the G65 line from the first operation 'CD' in parenthesis ( ) , then it all works correctly.
Any thoughts?
Thank you in advance.
The macro and its execution runs great...but say for a simple three step process of center spot drill, peck drilling, and tapping on a bolt circle; and half way through your peck drilling operation your drill breaks and you need to restart the program on the peck drilling part, bypassing the first step of spot center drill. It seems as if the Macro sub program never terminates and it resumes by not working off the original center position of X0.Y0., but instead where it supposedly last left off on the bolt circle.
Below is my macro (copied directly from old Mazak manual):
(sub program 9999);
G101A#70B#4001;
G101A#71B#4003;
N10 G204A15B#8C0;
G101A#4200B902;
N15;
N20 G118A#12B#8;
G103A#12B#8C#12;
G201A25B#12C0;
G101A#42F3;
1001007800B903;
N25 G204A30B#18C0;
G101#4200B904;
N30 G202A35B0C#18;
G101A#4200B905;
N35 G90;
N45 G101A#75B0.;
G111A#12B#8;
G101A#32B0.;
N50 G203A70B#12C#75;
G105 A#30B360.C#8;
G102 A#76B#1C#32;
G102 A#31B#75C1.0;
G104 A#32B#30C#31;
G107 A#77B#18C#76;
G102 A#77B#B5;
1003007877C#24;
G106 A#78B#18C#76;
G102 A#78B#78C#25;
X#77Y#78;
G102 A#75B#75C1.;
G111 A#12B#8;
G203A70B#12C#75;
G98;
G200A50;
N70 G00X#2F4;
100400144Y#25;
G#70G#71;
M99;
Now here is our program calling the use of the above bolt circle macro:
G00G91G28Y0.Z0.;
N10 T001(CD);
M06;
G00G90G43G54H1X0.Y0.Z3.M03S1250F10.;
G81R.1Z-.1L0;
G65P9999R10.3125A0.H12.X0.Y0.;
G28G91G80Y0.Z0.;
N20 T002(DR17/32);
M06;
G00G90G43G54H2X0.Y0.Z3.M03S450F5.;
G83Z-.8R.1Q.2L0;
G65P9999R10.3125A0.H12.X0.Y0.;
G28G91G80Y0.Z0.;
N30 T003(C/SINK);
M06;
G00G90G43G54H3X0.Y0.Z2.M03S200F5.;
G82Z-.232R-.18P.2;
G65P9999R10.3125A0.H12.X0.Y0.;
G28G91G80Y0.Z0.;
M30;
So if we want to start the program at N20, it will still be in subprogram 9999 and not work off the correct X0.Y0.Z3. center, almost as if it doesnt even read that first G00 line. If we go back and put the G65 line from the first operation 'CD' in parenthesis ( ) , then it all works correctly.
Any thoughts?
Thank you in advance.