Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

First tool pre-selection (G-Post)

marker4x4

New member
Ladies and Gentlemen (do we have any ladies here?)
smiley2.gif
smiley2.gif


I wonder if someone could enlighten me on the following.
Here's a piece of an example code. The part I'm asking about is at the very end (red). Anyway, as you can see, there's number of tools used for this OP and my goal is to automatically pre-select the first tool at the end as well as output the next tool (T35) so it sits in the toolchanger arm, waiting its turn.
Basically it is Copy/Paste of the two blue lines. The reason is to save few second p/cycle.

%
O01
G90 G94 G17 G54 G40 G49
G28 G91 Z0.
G90 A0.
(** TOOL CHANGE # 1 = TOOL NUMBER T 1)
(** TOOL CHANGE # 2 = TOOL NUMBER T 35)
(** TOOL CHANGE # 3 = TOOL NUMBER T 36)
(** TOOL CHANGE # 4 = TOOL NUMBER T 27)
(** TOOL CHANGE # 5 = TOOL NUMBER T 32)
(** TOOL CHANGE # 6 = TOOL NUMBER T 41)
(** TOOL CHANGE # 7 = TOOL NUMBER T 34)
(** TOOL CHANGE # 8 = TOOL NUMBER T 1)
(05/23/06-08:42:06)
(4" SANDVIK FACEMILL)
N0010 T1 M06<br style="color: rgb(0, 0, 255);">N0020 T35
S2500 M03
G0 G94 X-4.385 Y.257 M08
G43 Z8.11 H01
Z7.84
.
.
.
.
.
X1.406 Y.508
Z8.11 F200.
N0150 T1 M06<br style="color: rgb(255, 0, 0);">N0160 T35<br style="color: rgb(255, 0, 0);">M30
%

Thanks for looking,
 
You will need to have two FIL macros. One for LOADTL and one for FINI. The LOADTL macro will keep track of the number of tool changes and if it is the first or second tool change, set the proper variable. The FINI macro will output the first tool with the tool change, and call up the second tool.


View attachment 2305


Enjoy;
 
appinmi said:
You will need to have two FIL macros. One for LOADTL and one for FINI. The LOADTL macro will keep track of the number of tool changes and if it is the first or second tool change, set the proper variable. The FINI macro will output the first tool with the tool change, and call up the second tool.

Enjoy;





Thanks Allan, it all makes perfect sense except I've got T_zero at the end - I need to trace the LOADTL lines in my APT files to see what they look like. I'll get to it tomorrow.

......

G1 G40 X-.872 Y.5
Z.1 F200.
T0 M6
T0
M30
%
Cheers,
-mark
 
marker4x4 said:
Thanks Allan, it all makes perfect sense except I've got T_zero at the end - I need to trace the LOADTL lines in my APT files to see what they look like. I'll get to it tomorrow.

......

G1 G40 X-.872 Y.5
Z.1 F200.
T0 M6
T0
M30
%
Cheers,
-mark

I know it's been a while, but I'm kind of stomped on this one. I tried and tried different things and still can't get this macro to work... I get zeros at the end (as shown above) no matter what I do....
Clearly I'm doing something wrong, but I can't figure it out.
Well, Allan (ahem, cough, cough :) - if you could think of anything to help me out I'd me most obliged. Thanks!!!

Edited by: marker4x4
 
Make sure that the "REDEF/ON" command is in your FIL file and must come before any FIL macros. This allows "TOOL1" and "TOOL2" to change.
 

Sponsor

Articles From 3DCAD World

Back
Top