Welcome, Guest. Please login or register.
Did you miss your activation email?
October 21, 2014, 02:55:30 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  General CNC Chat
| |-+  Share Your GCode
| | |-+  Multi pass facing program
Pages: « 1 2   Go Down
Print
Author Topic: Multi pass facing program  (Read 6021 times)
0 Members and 1 Guest are viewing this topic.
jwhalin
Active Member

Offline Offline

Posts: 13


View Profile
« Reply #10 on: April 03, 2012, 07:43:35 PM »

My apologies, I could learn a lot from you.......   I usually just blunder my way through till it works....   
Logged
Ya-Nvr-No
Global Moderator
*
Offline Offline

Posts: 772


View Profile WWW
« Reply #11 on: April 03, 2012, 09: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:
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, 09:02:07 PM by Ya-Nvr-No » Logged

Pages: « 1 2   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!