Program structure is nothing more then
organizing your CNC program. Your programs will become easier to read,
understand and follow by separating and labeling the individual operations. Next,
break the program into the different program formats. There are three basic
format groups (program, tooling
&; operation), each being broken into two sub
groups (start & end). Examples of each format group are given below. Structure programming will save your company money. If you use the same
format (structure) for all programs you write, you will be able to repeat past
successes and eliminate common programming errors. Programs will be easier to
write if there is a structure to follow. And, program structure can be used as
your outline when training new employees.
PROGRAM END | |
| X-.09F.001 G250 G160H9902 GOTO5 M2 |
Program end contains all information needed to close the program. In this example, spindle synchronization is cancelled, length of bar is checked to determine if new bar is needed and return to start of program. |
TOOLING END |
|
| N155 G00 G40 Z1.0 M09 N160 G91 G28 Y0 Z0 M05 N165 G90 |
Tooling end is the information used to end machining when you are done using the tool. Line number 155 cancels tooling compensation and retracts the tool to a safe position while shutting off the coolant. It then sends the tool to tool change position and stops spindle rotation. |
OPERATION END |
|
| G50 U0.0 W0.032 G00 X2.283 M25 T0 G99 M51 M01 |
Special operations always deviate from the standard operating conditions. At the end of the operation the machine must be returned to it's normal state. This example shows the offsets that were applied being cancelled, live tooling rotation being stopped, feedrate being set back to IPR and C-axis being cancelled. |
GB Custom Programming
2233 2nd Avenue West
Monroe, WI. 53566-2707
608-325-3745
E-mail: gabahn@wekz.net