Starting a program And references for milling

Starting a program and references




This is not a strict rule, But more of a guideline. Always start programs with these codes:


G40 G80 G90 ;


G28 Z0. ;


G28 X0. Y0. ;




This is a safety feature that should be applied to programs, The first line clears any and all offsets, start points, and cutter compensations that might have been left on from the previous program.




The second line takes the Z axis home, This is to ensure there is clearance for the X and Y axis to go home. By moving all 3 together, there is a risk that the tool will crash into the job or fixture.




T01 ;


M06 ;




This is simply to select this first tool in the process, and does a tool change.




G00 G54 X0. Y0. S500 M03 ;



This puts the machine in rapid movement mode, Reads the first reference point, and starts thespindle in a clockwise direction at 500 RPM.



G43 Z100. H01




This set of codes reads the tool height ( measured and put into the machine at the beginning of the setup process) and moves the Z axis 100mm from the job.



Now put it all together:


G40 G80 G90 ;


G28 Z0. ;


G28 X0. Y0. ;


T01 ;


M06 ;


G00 G54 X0. Y0. S500 M03 ;




Simple as that!



Follow up now with the codes depending on the required tool path. For flood coolant, it is necessary to use the M08 code near the beginning of the program, and M09 after the tool has completed its path. The M30 code is used to indicate that the program has finished.





**Note: This is just a guide, Not all Fanuc machines work exactly like this. Some use G46 instead of G43 and some use other codes like G92 instead of G54. Always refer to the manual before writing programs.

No comments:

Post a Comment