Hello Guest it is March 28, 2024, 07:38:28 PM

Author Topic: Multi pass facing program  (Read 14187 times)

0 Members and 1 Guest are viewing this topic.

Re: Multi pass facing program
« Reply #10 on: April 03, 2012, 08:43:35 PM »
My apologies, I could learn a lot from you.......   I usually just blunder my way through till it works....   
Re: Multi pass facing program
« Reply #11 on: April 03, 2012, 10:42:55 PM »
No apologies necessary, when we share, we all learn something new. I just love the many challenges.

There is a lot of talented people sharing on this site.

Thank You and keep blundering. I just wish the Mach3 programming language was even more like Fanuc Macro B because I do like parametric programming. I work with large family of parts and use lookup blocks of code to fill variables. Operator changes one macro variable #500 and when the program starts and reads the #500 variable it jumps to a section that fills all the variables for that part.

Little example of what one of my old turning center main program looks like, including the variable loader program. not all there of course but gives you the idea. Does a several dozen different parts and shapes just uses the same blank shape. The robot side has the same basic program routine but it sets the robot for different blank lengths. So the load, unload and turn around positions can be set with variables, again all by using one input #500 variable by the operator.

Code: [Select]
O0001(LATHE SIDE)
(MAIN PROGRAM)
M98P999(SET/GET VARIABLES)
 
N10(READY TO RUN)
M19(ORIENT CHUCK)
M70(SYNC ROBOT LOAD 1ST PART)
M71(SYNC ROBOT UNLOAD/LOAD)
 
M98P50(CALL 1ST PART 1ST SIDE)
M98P8054(TABLE BLOW LOOP)
M19(ORIENT CHUCK)
M70(SYNC ROBOT LOAD 2ND PART)
M71(SYNC ROBOT UNLOAD/LOAD)
 
M98P50(CALL 2ND PART 1ST SIDE)
M98P8054(TABLE BLOW LOOP)
M19(ORIENT CHUCK)
M70(SYNC ROBOT FLIP STATION)
M71(SYNC ROBOT UNLOAD/LOAD)
 
M98P51(CALL 1ST PART 2ND SIDE)
M60(COUNT PART 1)
M98P8054(TABLE BLOW LOOP)
M19(ORIENT CHUCK)
M70(SYNC ROBOT FLIP STATION)
M71(SYNC ROBOT UNLOAD/LOAD)
 
/M99P20(JUMP FINISH ROUTINE)
M98P51(CALL 2ND PART 2ND SIDE)
M60(COUNT PART 2)
M99P10(LOOP ROUTINE)
 
N20(FINISH ROUTINE)
M98P51(2ND PART 2ND SIDE)
G28U0W0(HOME BOTH X Z AXIS)
M98P8054(TABLE BLOW LOOP)
M19(ORIENT CHUCK)
M70(SYNC ROBOT FLIP STATION)
M71(SYNC ROBOT UNLOAD/LOAD)

M98P8054(TABLE BLOW LOOP)
M19(ORIENT CHUCK)
M70(SYNC ROBOT LOAD 2ND PART)
M72(SYNC ROBOT CODE 2 UNLOAD)
M30

O0050(FIRST SIDE)
G28U0.W0.
G#506

N10
G0T05M347
G97S3200M04
M98P41(DRILL HOLE)
M54(TABLE BLOW ON)
 
N20
G0T03
G97S1079M04
G0X[#502+0.2]M8
Z0.1
G50S3800
G96S1100
M98P42(FACE FRONT)

N30
G0T06
G97S3500M04
M98P43(BORE ID)

N40
G0T07
G97S3800M04
M98P44(BACKBORE FACE)

G0G28W0.T0
G0G28U0.
M99
 
O0051(SECOND SIDE)
G#506
N500
G0T04
G97S1079M04
G0X[#502+0.2]M8
Z[0.1+#504]
G50S3800
G96S1100
M98P#508
G0Z2.
G28W0T0
G0G28W0.M9
G28U0.
M99

O8054(BLOW TABLE LOOP)
M54(TABLE BLOW ON)
G4P1000(DWELL 1 SEC)
M55(TABLE BLOW OFF)
M99

O0999
N2(GET GROUP ID)
IF[#500EQ10]GOTO10(SB 1.35 W/HUB.847)
(several more if statements here)
(stays here till variable 500 is set to part)
GOTO2

N10(SB 1.35 W/HUB.847)
#502=3.45(X DIAMETER)
#501=0(SIDE 1 Z SETBACK)
#503=-0.260(SIDE 2 Z SETBACK)
#504=0(BACKFACE Z OFFSET)
#505=0(X HUB OFFSET)
#506=54(WORKOFFSET NUMBER)
#507=100(SIDE 1 PROGRAM)
#508=101(SIDE 2 PROGRAM)
#509=0(WORKOFFSET Z OFFSET)
M99
« Last Edit: July 28, 2014, 10:02:07 PM by Ya-Nvr-No »