What's new
What's new

Doosan SMX 2100ST Tool Offset Variables for Macro Use

I agree that it wouldn't be wise to use this to set tools, or change offsets. I'm only trying to check whether the tool is chipped, and then setting the offsets back to their original settings. Is there a different code, or setting that you would recommend?
By the way, "not recommended" was a part of the previous sentence, in some other context.

G31 is more versatile, hence better suited for most applications.
G36/G37 are, of course, simple to use, and do not require knowledge of macro programming.
 
So I've achieved my goal of having a program to check the tool for chipping, and excessive wear. I'd like to thank everyone for your help, I appreciate your time and patience with me.

I plan on using this in-process to inspect a threading bar, and stop if the insert has failed. This program assumes that the tool you need to inspect is already in the spindle. I never intend on using this program without having set the tool properly first. I'm sure it isn't perfect, and I will be tweaking if from here, but working is a great place to start!

%
O0001(UPPER TOOL OFFSET MEASURE)
(FOR BORING BAR TOOL B-90. J1.)
(MACRO #'s USED)
(#747 - Z ALLOWABLE DEVIATION - EDITABLE)
(#748 - X ALLOWABLE DEVIATION - EDITABLE)
(#749 - TOOL CURRENTLY IN SPINDLE)
(#750 - MATH TO ISOLATE TOOL NUMBER)
(#751 - CURRENT TOOL OFFSET X)
(#752 - CURRENT TOOL OFFSET Z)
(#753 - MEASURED TOOL WEAR X)
(#754 - MEASURED TOOL WEAR Z)
(#755 - CURRENT WEAR OFFSET X)
(#756 - CURRENT WEAR OFFSET Z)

#748=0.0010(X ALLOWABLE DEVIATION - EDIT AS NEEDED)
#747=0.0007(Z ALLOWABLE DEVIATION - EDIT AS NEEDED)
#749=#4120(TOOL CURRENTLY IN SPINDLE)
#750=FIX[#749/1000](MATH TO ISOLATE TOOL NUMBER)
#751=[#_OFSXG[#750]](CURRENT TOOL OFFSET X)
#752=[#_OFSZG[#750]](CURRENT TOOL OFFSET Z)
#755=[#_OFSXW[#750]](CURRENT WEAR OFFSET X)
#756=[#_OFSZW[#750]](CURRENT WEAR OFFSET Z)
#758=8.57324(FIXED G53 Z POSITION)
#759=22.82671(FIXED G53 X POSITION)

G0G18G20G40G54G80G98
M34
M134
M139

G0G28U0.V0.W0.
T[#750*1000+#750]( TOOL WITH OFFSET )

G400B-90.J1.

T[#750*1000+#750]( TOOL WITH OFFSET )
M77 (Q-SETTER ARM ADVANCE)

G53G01Z[#758+#752]X[#759+#751]F250. (MOVE TO SAFE POSITION)

W-0.298 (POSITION Z TO MEASURE FOR X)
F0.9
G36 U0.203 (MEASURE X)
G4P500
G53
F250.
U-0.2 (RETRACT FROM MEASURE)

G53G01Z[#758+#752]X[#759+#751]F250. (MOVE TO SAFE POSITION)

U0.596 (POSITION X TO MEASURE FOR Z)
F0.9
G37 W-0.103 (MEASURE Z)
G4P500
G53
F250.
G0 W0.2 (RETRACT FROM MEASURE)

M76 (Q-SETTER ARM RETRACT)
#753=[#_OFSXW[#750]](MEASURED TOOL WEAR X)
#754=[#_OFSZW[#750]](MEASURED TOOL WEAR Z)
G53
[#_OFSXG[#750]]=#751(SET X TO ORIGINAL VALUE)
[#_OFSZG[#750]]=#752(SET Z TO ORIGINAL VALUE)
[#_OFSXW[#750]]=#755(SET WEAR OFFSET X TO ORIGINAL VALUE)
[#_OFSZW[#750]]=#756(SET WEAR OFFSET Z TO ORIGINAL VALUE)
G53
IF[[#755-#753]GE#748]THEN #3000=1 (X DEVIATION TOO GREAT)
IF[[#753-#755]GE#748]THEN #3000=1 (X DEVIATION TOO GREAT)
IF[[#756-#754]GE#747]THEN #3000=2 (Z DEVIATION TOO GREAT)
IF[[#754-#756]GE#747]THEN #3000=2 (Z DEVIATION TOO GREAT)

G28U0.V0.W0.M34

M30
%
 








 
Back
Top