Subscribe to Blog
Email Address
 
Articles and tutorials dedicated to G-Code Milling and Turning programming. Canned Cycles, G and M Codes
Pages:(2) 1 [2]

Renishaw OTS Tool Probe on Haas: Setting diameter wear offset value.

January 16, 2012, 7:31 pm by Eldar Gerfanov (Admin)

Renishaw OTS tool probe cycle for HAAS can set both length and diameter offsets.

Too bad there is no choice: it only puts absolute measured diameter of the tool into D- diameter offset and makes wear offset=0

But if your programming is done with the center of the cutter, then you actually only need the difference between actual and programmed diameters of the tool.


I.E.: When probing 5/8Dia end mill, we get D=0.6248. You would normally have to subtract 5/8 from it and leave the -0.0002 difference.

But there is an easier way

Warning:Make sure you know what you are doing.
Make sure you backup all files you are going to modify.
I simply WILL NOT care about any damage done to your machine in any case.

  • Go to settings and set  protect 9xxx programs from edit to OFF
  • Go MEM and edit program O09852 (RENISHAW DIA. SET)
  • Go to line N31 and replace
  • Code:OLD
    .....
    N31
    #[ 2400 + #7 ]=  #8 / #156
    .....

    with
    Code:NEW
    .....
    N31
    #[ 2400 + #7 ]= [ #8 - #19 ] / #156
    .....
  • Go to settings and set  protect 9xxx programs from edit to ON

Thats it.

Now when you probe tool for diameter, D offset will contain the difference between approximate Dia and actual dia of the tool.

Thread Turning on Okuma

March 7, 2011, 12:26 pm by Eldar Gerfanov (Admin)

G71 X Z A|I B D U H L E F J M Q

  • D=First Depth of Cut
  • U=Finish Depth of Cut
  • J=Number of threads at F
  • X=Target Depth (minor Dia of theread)
  • Z=Coord of end Point
  • A= Angle of thread
  • B= Tool Cut angle
  • H= Difference between major and minor dia of the thread
  • M= Cut pattern
  • M32= Longitudal
  • Q= Number of leads

Code
N24 (T5 OD 60DEG CW THREAD TOOL)
N00 G97 G95 S300 M3
N01 G0 X2.1 Z3.05
N02 M8
N03 G0 X1.2
N04 Z0.1538
N05 X0.7
N06 G1 X0.5 F0.076
N08 G71 X0.4 Z-0.8269 D0.01 U0.003  B29. H0.05 F0.077 M32
N09 G0 X1.2 Z-0.8269
N40 Z3.05
N41 X2.1

Note: Feed mode must be in G95(IPR)

Okuma Lathe G and M codes

January 8, 2011, 12:30 am by Eldar Gerfanov (Admin)

Here is a list of Okuma G and M codes i got from the manual

Note Some codes may not be supported by your machine, all information is given as is and i dont give a ... if you break something.

Information given here is correct to the best of my knowlege

  • G-Codes

G01 Linear Interpolation
G02 Circular Interpolation (CW)
G03 Circular Interpolation (CCW)
G04 Dwell
G20 Home Position Command
G21 ATC Home Position Command
G22 Torque skip command
G28 Torque Limit command cancel
G29 Torque Limit command
G30 Skip cycle
G31 Fixed thread cutting cycle: Longitudinal
G32 Fixed thread cutting cycle: End Phase
G33 Fixed thread cutting cycle
G34 Variable lead thread cutting cycle: Increasing lead
G35 Variable lead thread cutting cycle: Decreasing lead
G36 Machine spindle-feed rod synchronized feeding (forward)
G37 Machine spindle-feed rod synchronized feeding (reverse)
G40 Tool Nose Radius Compensation: CANCEL
G41 Tool Nose Radius Compensation: LEFT
G42 Tool Nose Radius Compensation: RIGHT
G50 Zero Offset. Maximum Spindle Speed Designation G62 Mirror image designation
G64 Mirror image control OFF
G65 Mirror image control ON
G72 Compound Fixed Thread Cutting Cycle: Longitudinal
G71 Compound Fixed Thread Cutting Cycle: Transverse
G73 Longitudinal Grooving Compound Fixed Cycle
G74 Transverse Grooving Compound Fixed Cycle
G75 Automatic Chamfering
G76 Automatic Rounding
G77 Tapping compound fixed cycle
G78 Tapping cycle reversed thread
G80 End of Shape Designation (LAP)
G81 Start of Longitudinal Shape Designation (LAP)
G82 Start of Transverse Shape designation (LAP)
G83 Start of Blank material shape definition (LAP)
G84 Change of cutting conditions in bar turning cycle (LAP)
G85 Call of Rough Bar Turning Cycle (LAP)
G86 Call of Rough copy Turning Cycle (LAP)
G87 Call Finish Turning Cycle (LAP)
G88 Call of continuous thread cutting cycle (LAP)
G90 Absolute Programming
G91 Incremental Programming
G94 Feed Per Minute Mode (MM.MIN)
G95 Feed Per Revolution Mode (MM/REV)
G96 Constant Cutting Speed "ON"
G97 Constant Cutting Speed "OFF"
G101 Linear Interpolation in Contour Generation
G102 Circular Interpolation in Contour Generation (FACE) (CW) M
G103 Circular Interpolation in Contour Generation (FACE) (CCW)
G110 Constant speed cutting on turret A
G112 Circular thread cutting CW
G113 Circular thread cutting CCW
G132 Circular Interpolation in Contour Generation (SIDE) (CW)
G133 Circular Interpolation in Contour Generation (SIDE) (CCW)
G136 End of Coordinate System Conversion or Y-Axis Mode OFF
G137 Start of Coordinate System Conversion or Y-Axis Mode OFF
G140 Designation of Machining Mode Using Main Spindle
G141 Designation of Machining Mode Using Sub Spindle
G161-G170 G-code macro function MODIN
G171 G-code macro function CALL
G178 Synchronized tapping cycle (forward)
G179 Synchronized tapping cycle (reverse)
G180 Machine Compound Fixed Cycle: CANCEL
G181 Machine Compound Fixed Cycle: DRILLING
G182 Machine Compound Fixed Cycle: BORING
G183 Machine Compound Fixed Cycle: DEEP HOLE DRILLING
G184 Machine Compound Fixed Cycle: TAPPING
G185 Machine Compound Fixed Cycle: LONGITUDINAL THREAD CUTTING
G186 Machine Compound Fixed Cycle: END FACE THREAD CUTTING
G187 Machine Compound Fixed Cycle: LONGITUDINAL STRAIGHT THREAD CUTTING
G188 Machine Compound Fixed Cycle: TRANSVERSE STRAIGHT THREAD CUTTING
G189 Machine Compound Fixed Cycle: REAMING/BORING
G190 Machine Compound Fixed Cycle: KEYWAY CUTTING CYCLE
G191 Machine Compound Fixed Cycle: LONGITUDINAL KEYWAY CUTTING CYCLE

  • M-codes

M00 Program Stop
M01 Optional Stop
M02 End of Program
M03 Spindle CW
M04 Spindle CCW
M05 Spindle Stop
M06 Tool Change
M08 Coolant ON
M09 Coolant OFF
M12 Machine Spindle STOP
M13 Machine Spindle CW
M14 Machine Spindle CCW
M15 C-Axis Positioning
M16 C-Axis Positioning (NEG)
M17 CEJ MATIC :Request of Data transfer
M18 Post-process Gauging RS232C: Request of Data transfer
M19 Oriented Spindle Stop
M20 Tailstock Barrier OFF or spindle interference monitoring OFF (opposed two-spindle models)
M21 Tailstock Barrier ON or spindle interference monitoring ON (opposed two-spindle models)
M22 Chamfer OFF
M23 Chamfer ON
M24 Chuck Barrier OFF, Tool interference OFF
M25 Chuck Barrier ON, Tool interference ON
M26 Thread Lead Along Z-Axis
M27 Thread Lead Along X-Axis
M28 Tool Interference Check Function OFF
M29 Tool Interference Check Function ON
M30 End of Program
M32 Straight In-feed along thread face mode (on left face)
M33 Zigzag in feed in Thread Cutting
M34 Straight In-feed along thread face mode (on right face)
M40 Spindle gear Range Neutral
M41 Spindle Gear Range 1
M42 Spindle Gear Range 2
M48 Spindle Speed Override Ignore Cancel
M49 Spindle Speed Override Ignore
M55 Tailstock Spindle Retract
M56 Tailstock Spindle Advanced
M58 Chucking Pressure Low
M59 Chucking Pressure High
M72 ATC Unit Position at Approach Position
M73 Thread Cutting Pattern 1
M74 Thread Cutting Pattern 2
M75 Thread Cutting Pattern 3
M76 Parts Catcher Retract
M77 Parts Catcher Advanced
M78 Steady Rest Unclamp
M79 Steady Rest Clamp
M80 over cut Advanced
M81 over cut Retract
M83 Chuck Clamp
M84 Chuck Unclamp
M85 No Return to the Cutting Starting Point after the completion of rough turning cycle (LAP)
M86 Turret Indexing direction: CW (reverse)
M87 Cancel of M86
M98 Tailstock Spindle Thrust Low
M99 Tailstock Spindle Thrust High
M109 Cancel of M110
M110 C-Axis Joint
M134 Z-Axis Thrust Monitoring OFF
M135 Z-Axis Thrust Monitoring ON
M136 Designation of Multiple fixed cycle configuration
M137 Touch setter interlock release ON
M138 Touch setter interlock release OFF
M139 Lead Machining Function - Learning Operation
M140 Tapping Cycle M-Tool Constant Rotation Answer Ignored
M141 C-Axis Clamp or not Selection
M142 Coolant Pressure Low
M143 Coolant Pressure High
M146 C-Axis Unclamp
M147 C-Axis Clamp
M152 M-Tools Spindle Interlock ON
M153 M-Tools Spindle Interlock OFF
M161 Feedrate Override Fix (100%)
M162 Cancel of M163
M163 M-Tools Spindle Speed Override Fix (100%)
M168 Ignoring M-Tool Spindle Constant Speed Answer
M169 C-Axis NoClamp
M191 M-Tool Spindle Orientation Direction Specified CW
M192 M-Tool Spindle Orientation Direction Specified CCW
M197 Thread Cutting Phasing Stroke Clear
M211 Keyway Cutting Style: Minus Direction
M212 Keyway Cutting Style: Zigzag
M213 Keyway Cutting Style: Designated Depth Infeed
M214 Keyway Cutting Style: Equal Depth Infeed

  • Other Codes used in okuma programming

A-Angle measurement
B-Angle measurement for threads
C-Angle of the C-Axis (spindle)
D-Lap
E-Secondary feed rate
F-Feed rate
H-Thread height (LAP)
I- Arc center offset
J-Lead value for threading
K-Arc center offset
L-Lap command
M-See list above
N-Sequence number
O-Program name
S-Spindle speed
SB-M-Tool speed
T- Tool #, Tool offset #,Tool nose radius
W-LAP command
X -Diameter dimension word
Z-Longitudinal dimension word

  • Other useful things

GOTOnnn - Jump to line number nnnn

  • User Values

ABC=0  (Before user value can be used anywhere it has to be defined using "=" sign, otherwise control will not assume ABC is zero dy default and give an error)
ABC=ABC+1 (Add 1 to itself)

We can use following math operators:( + - / * )

  • IF - Conditional statement

IF ABC GOTO 100 - Conditional statemnt if xxx value is not zero then go to line number 100.

IF [ VAL1 LT VAL2 ] GOTO100- Conditional statemnt if VAL1 smaller that VAL2 go to line number 100.
IF [ VAL1 LE VAL2 ] GOTO100- Conditional statemnt if VAL1 smaller or equals VAL2 go to line number 100.
IF [ VAL1 GT VAL2 ] GOTO100- Conditional statemnt if VAL1 greater that VAL2 go to line number 100.
IF [ VAL1 GE VAL2 ] GOTO100- Conditional statemnt if VAL1 greater or equals VAL2 go to line number 100.
IF [ VAL1 EQ VAL2 ] GOTO100- Conditional statemnt if VAL1 equals VAL2 go to line number 100.

Repeating OKUMA CNC Lathe program number of times

January 6, 2011, 1:00 pm by Eldar Gerfanov (Admin)

If you want OKUMA Lathe to repeat program several times you can use a subprogram or a conditional GOTO statement.

On Many Okumas subprograms is an option you have to buy, so we have to use GOTO statement.

Code
O1 
CN=7 (NUMBER OF CYCLES TO REPEAT) 
CC=0 (CURRENT CYCLE)
N0
......
(part program)
......
CC=CC+1 
IF [ CC LT CN ] N0 
M2

Thats it 

This little code helps alot when using bar feeder and stuff like that.

 

Avoiding Chatter in corners of a pocket

January 3, 2011, 1:02 am by Eldar Gerfanov (Admin)

If you are finishing a pocket with wall corners' radius close to the radius of a cutter. The tool tends to chatter, especially with longer tools and harder materials.

To avoid this you can do one of the following:

  • When programming. After roughing the pocket and before finishing. Create a simple drill cycle with finishing tool to remove extra material from the corner. This way when finisher goes to the tight corner, the chatter will virtually disappear.
  • Do the same with a drillbit. Before Roughing.
Pages:(2) 1 [2]
Sing In

© 2009-2022 Eldar Gerfanov. All Rights Reserved.
© 2009 Eldar Gerfanov. Materials on this site are presented as is and are mostly for educational use.

You may freely reproduce information presented herein without any consent from me, provided you include link to this site.
In case when i am not the copyright holder, you may want to contact proper owner of material. Anyway, they are freely available on the Internet.
If you hold the copyright right for any of the materials on this site and want them removed, please contact me here