Manufacturing Information Solutions Forum Index Manufacturing Information Solutions
Your Place for Support and Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How To Prepare Bar Stock Using An Okuma Macro

 
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> G-Code Programming
View previous topic :: View next topic  
Author Message
franke
Master Poster


Joined: 26 Jun 2004
Posts: 161
Location: Indiana, USA

PostPosted: Fri Jul 02, 2004 12:45 pm    Post subject: How To Prepare Bar Stock Using An Okuma Macro Reply with quote

This macro program is used to prepare bar stock. By prepare I mean face and turn a true diameter on the end of the stock and possibly drill a hole in the center. This is useful if you are using hot rolled, spun cast or other material that isn't very round to begin with. This program allows the operator to enter a few variables and then prepare the stock.

The program uses a variable as a Flag or switch to determine if the part should be drilled or not. In this case V32 is used as the flag. When set to zero the program ends without drilling, when set to one the program drills a hole to the required depth. The following variables are used:

V10 is the diameter of the bar stock. .25 is added to this diameter when positioning for facing in case the part is running out.
V11 is the tool number for facing/turning the part.
V12 is the finish diameter for the prepping operation. Since a roughing cycle is used the part can be considerably oversize. This is very convenient if the correct bar stock size isn't available.
V13 is the depth to turn the part. Z0 is the face of the part.
V29 is the tool number for the drilling operation.
V30 is the RPM for the drilling operation.
V31 is the to drill. Don't forget to account for the drill point length.
V32 is the flag for drill. Setting V32 to zero skips the drilling operation, set to one drills.

Code:
$BAR_PREP.MIN%
(PROGRAM TO PREP BAR STOCK)
(V10 IS DIAMETER OF BAR STOCK)
(V11 IS THE TOOL NUMBER)
(V12 IS DIAMETER TO TURN STOCK)
(V13 IS DEPTH TO TURN)
(V29 IS TOOL # OF DRILL)
(V30 IS SPEED TO DRILL)
(V31 IS DEPTH TO DRILL)
(V32=FLAG FOR DRILLING)
(0 IS NO DRILL 1 IS DRILL)
G50S1600
G0X20Z20M44
X=V10+.25Z1.T=V11G97S500M3
G0Z0G96S600M8
G1X-.04F.004
G1Z.05
G0X=V10
NTURN G81
G0X=V12-.15
G1Z0F.006
G76X=V12L-.06
G1Z=-V13
G1X=V10F.006
G40
G80
/G85 NTURN U.02 W.003 D.15 F.006
G87 NTURN
G0G97S500M9Z1.
G0X20Z20
M01
IF[V32 EQ 0]GOTO NEND
(DRILL)
N2G0X20Z30
G110
G0X0T=V29G97S500M3
G0Z1.0S=V30(500SFM 1.5)
G0Z.1M8
G74X0Z=-V31D1.L3.0F.004
G0Z1.M9S500
G0X20Z30
NEND
M02
G14
NEND
M02
%


Post your thoughts here.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> G-Code Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group