Hello,
I'm working on a program for Doosan lathes, with different series Fanuc controllers. This is a macro program. The program will run fine one the Doosan 480 lathes, i series controllers, but not on the Doosan 700 lathes, with 32i controllers. The issue arises before it even starts cutting. The first thing that the machine does is use the Renishaw probe the part for length and diameter values. I have not edited the probing part of the program. These values are then used in calculations to determine the depths of cuts and all that. The first time that I run the program on the Doosan 700, it does just fine. The macro variables are calculated correctly and there are no issues. The second time that the program runs it does not return the correct length of the part. It is consistently several inches short. If I reprobe, it gives the same incorrect Z value. The X values are correct though. If I run the probe re-calibration programs it will then get the program to work correctly, one time.
All I did in my program revision is change how it calculates depths of cuts. I don't see how I'm screwing up the Z value.
I am trying to attach the code here, hopefully it will work. The original and new should be included. This is just the intros to the programs, the rest seems irrelevant as it is screwing up in this section.
Please ask any questions you have if this doesn't make sense. Any advice is appreciated.
Original:
New:
I'm working on a program for Doosan lathes, with different series Fanuc controllers. This is a macro program. The program will run fine one the Doosan 480 lathes, i series controllers, but not on the Doosan 700 lathes, with 32i controllers. The issue arises before it even starts cutting. The first thing that the machine does is use the Renishaw probe the part for length and diameter values. I have not edited the probing part of the program. These values are then used in calculations to determine the depths of cuts and all that. The first time that I run the program on the Doosan 700, it does just fine. The macro variables are calculated correctly and there are no issues. The second time that the program runs it does not return the correct length of the part. It is consistently several inches short. If I reprobe, it gives the same incorrect Z value. The X values are correct though. If I run the probe re-calibration programs it will then get the program to work correctly, one time.
All I did in my program revision is change how it calculates depths of cuts. I don't see how I'm screwing up the Z value.
I am trying to attach the code here, hopefully it will work. The original and new should be included. This is just the intros to the programs, the rest seems irrelevant as it is screwing up in this section.
Please ask any questions you have if this doesn't make sense. Any advice is appreciated.
Original:
Code:
%
O7001(MULT FINISH 700)
(T0101 Left - CMRGNL-204)
(T0202 Right- CMRGNR-204)
(T0303 Left - CMRGNL-204)
(T0404 Nuetral - GMSDNN-204D)
(T0505 Left - CMRGNL-204)
(T0606 Right - CMRGNR-204)
(T0707 Left - CMRGNL-204)
(T1010 RENISHAW PROBE)
(USE MACR0 #500 F0R Z SETTING)
(#500 = Exact Mult Length - Operator Input)
(#501 = Finish Diameter - Operator Input)
(#504 = Edge Prep - Operator Input)
(1.0 = Break Edge)
(2.0 = Core Mult Radius)
(3.0 = .437 Radius)
(4.0 = .625 Radius)
(Z 0 at Face Driver Pad)
(#507 = Operator Input - PART CLEARANCE IN Z)
(#508 = Operator Input - PART CLEARANCE IN X DIA)
(#509 = Set in Program - PART LENGTH MEASURED)
(#510 = Set in Program - PART TAILSTOCK END DIAMETER MEASURED)
(#511 = Set in Program - PART HEADSTOCK END DIAMETER MEASURED)
(#512 = Set in Program - USED IN CALCULATION)
(#513 = Set in Program - USED IN CALCULATION)
(#514 = Set in Program - USED IN CALCULATION)
(#520 = Set in Program - USED IN CALCULATION)
(#521 = Set in Program - ROUGH DIAMETER 1)
(#522 = Set in Program - ROUGH DIAMETER 2)
(#523 = Set in Program - ROUGH DIAMETER 3)
(#524 = Set in Program - ROUGH DIAMETER 4)
(#525 = Set in Program - PRE FINSIHED DIAMETER)
(#526 = Set in Program - FINSIH DIAMETER)
G65P9800(PROBE HEALTH CHECK)
G0X25.0
Z[#500+1.0]
T1010
G65P9832(FLASH ON)
G65P9610F100.Z[#500-1.0]
G65P9611X4.0
#510=#135+#508
G65P9610F100.Z1.0
G65P9611X4.0
#511=#135+#508
G0X20.0
Z[#500+1.0]
G65P9610F100.X[#510-1.0]
G65P9611Z3.25
#509=#137+#507
G65P9833(FLASH OFF)
G99
G0X20.0
Z[#500+1.0]
#512=[#511-#508-#501]
#520=[#510-#511]
#513=[#512-.062]
#514=[#513/3]
#521=[#511-#508-#514]
#522=[#511-#508-[#514*2]]
#523=[#511-#508-[#514*3]]
#524=[#523-.05]
#525=[#524-.002]
#526=[#525-.01]
New:
Code:
%
O7001B(MULT FINISH 700)
(T0101 Left - CMRGNL-204)
(T0202 Right- CMRGNR-204)
(T0303 Left - CMRGNL-204)
(T0404 Nuetral - GMSDNN-204D)
(T0505 Left - CMRGNL-204)
(T0606 Right - CMRGNR-204)
(T0707 Left - CMRGNL-204)
(T1010 RENISHAW PROBE)
(T1212 CMRGNR-204)
(USE MACR0 #500 F0R Z SETTING)
(#500 = Exact Mult Length - Operator Input)
(#501 = Finish Diameter - Operator Input)
(#504 = Edge Prep - Operator Input)
(1.0 = Break Edge)
(2.0 = Core Mult Radius)
(3.0 = .437 Radius)
(4.0 = .625 Radius)
(Z 0 at Face Driver Pad)
(#507 = Operator Input - PART CLEARANCE IN Z)
(#508 = Operator Input - PART CLEARANCE IN X DIA)
(#509 = Set in Program - PART LENGTH MEASURED)
(#510 = Set in Program - PART TAILSTOCK END DIAMETER MEASURED)
(#511 = Set in Program - PART HEADSTOCK END DIAMETER MEASURED)
(#512 = Set in Program - USED IN CALCULATION)
(#513 = Set in Program - USED IN CALCULATION)
(#514 = Set in Program - USED IN CALCULATION)
(#527 = Set in Program - USED IN CALCULATION)
(#520 = USED IN CALCULATION)
(#521 = ROUGH DIAMETER 1, SET IN PROGRAM)
(#522 = ROUGH DIAMETER 2, SET IN PROGRAM)
(#523 = ROUGH DIAMETER 3, SET IN PROGRAM)
(#524 = ROUGH DIAMETER 4, SET IN PROGRAM)
(#525 = ROUGH DIAMETER 5, SET IN PROGRAM)
(#526 = PRE FINSIHED DIAMETER, SET IN PROGRAM)
(#527 = FINISH DIAMETER, SET IN PROGRAM)
(#528 = STEEL CLEAR REQUIREMENT, OPERATOR INPUT, 0-NO, 1-YES)
(#529 = NUMBER OF CUTS REQUIRED, SET IN PROGRAM)
(#530 = DIAMETER BEFORE DEBURR, SET IN PROGRAM)
(USE MACRO #528 TO SPECIFY IF STEEL CLEAR CUT REQUIRED)
(0 - NO)
(1 - YES)
G65P9800(PROBE HEALTH CHECK)
G0X25.0
Z[#500+1.0]
T1010
G65P9832(FLASH ON)
G65P9610F100.Z[#500-1.0]
G65P9611X4.0
#510=#135+#508
G65P9610F100.Z1.0
G65P9611X4.0
#511=#135+#508
G0X20.0
Z[#500+1.0]
G65P9610F100.X[#510-1.0]
G65P9611Z3.25
#509=#137+#507
G65P9833(FLASH OFF)
G99
G0X20.0
Z[#500+1.0]
#512=[#511-#508-#501]
#520=[#510-#511]
#513=[#512-.062]
IF[#512GE.362]GOTO10
IF[[#512 LT .362] AND [#512 GE .262]]GOTO11
IF[[#512 LT .262] AND [#512 GE .162]]GOTO12
IF[#512 LT .162]GOTO13
N10 #529=4
GOTO20
N11 #529=3
GOTO20
N12 #529=2
GOTO20
N13 #529=1
GOTO20
N20
#514=[#513/#529]
#521=[#511-#508-#514]
#522=[#511-#508-[#514*2]]
#523=[#511-#508-[#514*3]]
#524=[#511-#508-[#514*4]]
IF[#529EQ1]GOTO30
IF[#529EQ2]GOTO31
IF[#529EQ3]GOTO32
IF[#529EQ4]GOTO33
N30 #530 = #521
GOTO40
N31 #530 = #522
GOTO40
N32 #530 = #523
GOTO40
N33 #530 = #524
GOTO40
N40
#525=[#530-.05]
#526=[#525-.002]
#527=[#526-.01]