What's new
What's new

G136 & G137 Logic? (Mazak Variaxis I-700T)

Todd...

Aluminum
Joined
Dec 30, 2011
Location
PA, Philly. Hartford
Currently setting up an I-700T but have run into some road blocks which mazak claims is impossible without buying more features, i am trying to make what i have work.

Currently the machine has a renishaw laser for rotating tools and an omron tool eye for lathe tools

I want to be able to automatically measure my lathe tools and update the tool data page using the omron unit while in cycle.

Have tried a g136 cycle, it will position the tool correctly, but instead of feeding in Y for touching a sensor it will feed in X. I do not see an argument which will change this either in the code (see sample code supplied by mazak).

Does anyone know what is going on when G136 is called, is a sub ran in the background, or is it PLC driven? if i can figure out the logic of what they did in that cycle i can create my own macro program to suit
 

Attachments

  • IMG_20200619_071811.jpg
    IMG_20200619_071811.jpg
    84.9 KB · Views: 85
  • IMG_20200619_071804.jpg
    IMG_20200619_071804.jpg
    83 KB · Views: 86
  • TOOL-BREAK.TXT
    1.5 KB · Views: 72
I have the same problem with my Integrex i500V. My idea is to check for tool breakage of end mill with omron tool eye.
 
I wrote that program but it seems that the omron d5f-2b34c is not activated correctly. It beeps through G31 line at contact, but it doesn't stop and continue to Z-3.

Code:
<TOOLBREAKCHECKBBOY>(TOOL BREAKAGE DETECTION)
(--==STOP LOOK AHEAD==--)
G5 P0


(--==INDEX OF MACRO VARIABLE==--)
(#701=#5003  End point coordinates of previous block OF Z AXIS)
(#702=#5163 Skip coordinate during 3-D coordinate conversion OF Z AXIS)
(#51999 -  tool number of the tool mounted in the spindle)

G0 G17 G21 G40 G49 G80 G90 G94

(--==PREPARATION FOR TOOL BREAKAGE DETECTION==--)

(T#51999 M06)(IF NECESSARY)
G91 G28 X0.
G91 G28 Y0. Z0.
G90
G10.9 X0
M200
(G64)(IF NECESSARY)

(--==TOOL BREAKAGE DETECTION==--)

G54.1 P297 (coordinates of TOOL EYE measurement unit)
M108
G0 G90 B90.
M107
G68 X0. Y0. Z0. I0. J1. K0. R90.
M283(TOOL EYE measurement arm extend)(REMOVE BRAKET AFTER PROGRAM TEST)
G43 H#51999 X0. Y0. Z25.
G17 G94
#3004 = 2 (Feedrate override disabled)

G01 Z1. F500.
G31 Z-3. F30.
G01 Z1. F500.


#701=#5043 (CHANGE IT FROM #5003) 
#702=#5163


#700=#702-#701
IF[ABS[#700]]GT3.5GOTO100
(IF[ABS[#700]GT1.5]AND[ABS[#700]GE3.]GOTO200)


#3004 = 0 (Feedrate override enabled)
M284 (TOOL EYE measurement arm retract)
G69

G91 G28 X0 
G91 G28 Y0 Z0
G90
M99

(-===ERROR REPORT===-)
N100
#3000=21(TOOL BROKEN!)
M0 (OR M120 for SHUT DOWN)

N200
#3000=22(SOMETING IS NOW WRIGHT)
M0
 
Solution

I found a solution to that problem. Thanks to CNC Hacker for info about G31.4, i change a parametar k72 bit6 to 1. This parameter is about SKIP-6 signal for G31.4 skip condition.

Code:
<TOOLBREAKCHECKBBOY>(TOOL BREAKAGE DETECTION)
(--==STOP LOOK AHEAD==--)
G5 P0


(--==INDEX OF MACRO VARIABLE==--)
(#701=#5043  Workpiece coordinates of previous block OF Z AXIS)
(#702=#5163 Skip coordinate during 3-D coordinate conversion OF Z AXIS)
(#51999 -  tool number of the tool mounted in the spindle)

G0 G17 G21 G40 G49 G80 G90 G94

M9 (ALL COOLANT STOP)
M5  (MILL SPINDLE STOP)
M19 (TOOL ORIENTATION)

(--==PREPARATION FOR TOOL BREAKAGE DETECTION==--)

G91 G28 X0.
G91 G28 Y0. Z0.
G90
G10.9 X0
M200
(G64)(IF NECESSARY)
#705=#51999
IF[#705EQ0.]GOTO200

(--==TOOL BREAKAGE DETECTION==--)

G54.1 P297 (coordinates of TOOL EYE measurement unit, Z0. IS 0.5MM OVER THE TOOL EYE)
M108
G0 G90 B90.
M107
G68 X0. Y0. Z0. I0. J1. K0. R90.
M283(TOOL EYE measurement arm extend)
G0 X0. Y0.
G43 H#51999 Z50.
G17 G94
#3004 = 2 (Feedrate override disabled)

G01 Z30. F1000.
G31.4 Z-2. F100.
G01 Z30. F1000.


#701=#5043 
#702=#5163


#700=#702-#701
IF[ABS[#700]]GT31.5GOTO100



#3004 = 0 (Feedrate override enabled)
M284 (TOOL EYE measurement arm retract)
G69

G91 G28 X0 
G91 G28 Y0 Z0
G90
M99

(-===ERROR REPORT===-)
N100
#[630000.+#51999]=1
(#3000=21(TOOL BROKEN!)
#3004 = 0 (Feedrate override enabled)
M284 (TOOL EYE measurement arm retract)
G69

G91 G28 X0 
G91 G28 Y0 Z0

T0 M6

G28 G91 Y0 Z0
M108 M212
G28 G91 B0. C0.
M107 M210

M120 (M0 OR M120 for SHUT DOWN)

N200
#3000=22(NO_TOOL_IN_THE_SPINDLE)
M0
%
 
Solution

Thanks to CNC Hacker I found a solution. Change G31 to G31.4 and Parameter for G31.4 skip condition, in my case a bit 6 from 0 to 1 (Skip-6). I also add a check if there is a tool in the spindle.
List of thing to be added to program
  1. Check a coordinates of tool eye in G54.1 P297, if someone change it
  2. Check parametar k72 bit 6 to be 1
  3. Change a state of a tool if it is broken.

I write change a state of a tool if it is broken, but it doesn't work. I think here it is needed to remember tool number, change to T0 and then change a status of it. If change of state is not possible for someone it can change tool length to 555mm.

Code:
<TOOLBREAKCHECKBBOY>(TOOL BREAKAGE DETECTION)
(--==STOP LOOK AHEAD==--)
G5 P0


(--==INDEX OF MACRO VARIABLE==--)
(#701=#5043  Workpiece coordinates of previous block OF Z AXIS)
(#702=#5163 Skip coordinate during 3-D coordinate conversion OF Z AXIS)
(#51999 -  tool number of the tool mounted in the spindle)

G0 G17 G21 G40 G49 G80 G90 G94

M9 (ALL COOLANT STOP)
M5  (MILL SPINDLE STOP)
M19 (TOOL ORIENTATION)

(--==PREPARATION FOR TOOL BREAKAGE DETECTION==--)

G91 G28 X0.
G91 G28 Y0. Z0.
G90
G10.9 X0
M200
(G64)(IF NECESSARY)
#705=#51999
IF[#705EQ0.]GOTO200

(--==TOOL BREAKAGE DETECTION==--)

G54.1 P297 (coordinates of TOOL EYE measurement unit, Z0. IS 0.5MM OVER THE TOOL EYE)
M108
G0 G90 B90.
M107
G68 X0. Y0. Z0. I0. J1. K0. R90.
M283(TOOL EYE measurement arm extend)
G0 X0. Y0.
G43 H#51999 Z50.
G17 G94
#3004 = 2 (Feedrate override disabled)

G01 Z30. F1000.
G31.4 Z-2. F100.
G01 Z30. F1000.


#701=#5043 
#702=#5163


#700=#702-#701
IF[ABS[#700]]GT31.5GOTO100



#3004 = 0 (Feedrate override enabled)
M284 (TOOL EYE measurement arm retract)
G69

G91 G28 X0 
G91 G28 Y0 Z0
G90
M99

(-===ERROR REPORT===-)
N100
#[630000.+#51999]=1
(#3000=21(TOOL BROKEN!)
#3004 = 0 (Feedrate override enabled)
M284 (TOOL EYE measurement arm retract)
G69

G91 G28 X0 
G91 G28 Y0 Z0

T0 M6

G28 G91 Y0 Z0
M108 M212
G28 G91 B0. C0.
M107 M210

M30 (M0 OR M120 for SHUT DOWN)

N200
#3000=22(NO_TOOL_IN_THE_SPINDLE)
M0
%
 
If you switch your #51999 variables to #3020 it should take care of some of your problems. #3020 is the system variable for the active tool index. On a machine with lathe capablities, the index number of tool may not match the basic tool number. This is because you can have T10B or T55E for instance. Then setting the tool damage flag should work.
 
Thanks to CNC Hacker once again for helping me to find a solution. I changed only #[630000.+#51999]=1 to #[630000.+#3020]=1 and changing of tool state to "broken" worked.
 








 
Back
Top