CAM-generated NC programs
Application
CAM-generated NC programs are created externally of the control using CAM systems.
CAM systems provide a comfortable and sometimes unique solution in connection with 4-axis simultaneous machining.
For CAM-generated NC programs to be able to use the full performance potential of the control and to provide you with such options as intervention and correction, certain requirements must be met.
CAM-generated NC programs must meet the same requirements as manually created NC programs. In addition, other requirements arise from the process chain.
The process chain specifies the path from a design to the finished workpiece.
Related topics
- Using 3D data directly at the control
- Programming graphically
Output formats of NC programs
Output in HEIDENHAIN Klartext format
If you output the NC program in Klartext, you have the following options:
- 3-axis output
- Output with up to four axes, without M128 or FUNCTION TCPM
- Output with up to four axes, with M128 or FUNCTION TCPM (#9 / #4-01-1)
Prerequisites for 4-axis machining:
- Machine with rotary axes
- Software option Adv. Function Set 1 (#8 / #1-01-1)
- Software option Adv. Function Set 2 (#9 / #4-01-1) for M128 or FUNCTION TCPM
The TNC7 basic can move up to four axes simultaneously. If an NC block commands movement of more than four axes, the control displays an error message.
If the axis position does not change, you can nevertheless program more than four axes.
If the machine kinematics and the exact tool data are available to the CAM system, you can output NC programs without M128 or FUNCTION TCPM. The programmed feed rate is calculated for all axis components per NC block, which can result in different cutting speeds.
An NC program with M128 or FUNCTION TCPM is machine-neutral and more flexible, since the control takes over the kinematics calculation and uses the tool data from the tool management. The programmed feed rate acts on the tool location point.
Compensating the tool angle of inclination with FUNCTION TCPM (#9 / #4-01-1)
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 L X+88 Y+23.5375 Z-8.3 R0 F5000 | ; 3-axis |
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 L X+88 Y+23.5375 Z-8.3 C+45 R0 F5000 | ; 4-axis without M128 |
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 L X+88 Y+23.5375 Z-8.3 C+45 R0 F5000 M128 | ; 4-axis with M128 |
Output with vectors
From the point of view of physics and geometry, a vector is a directed variable that describes a direction and a length.
When outputting with vectors, the control requires at least one vector that specifies the direction of the surface normal or the tool angle of inclination. Optionally, the NC block contains both vectors.
Prerequisites:
- Machine with rotary axes
- Software option Adv. Function Set 1 (#8 / #1-01-1)
- Software option Adv. Function Set 2 (#9 / #4-01-1)
The TNC7 basic can move up to four axes simultaneously. If an NC block commands movement of more than four axes, the control displays an error message.
If the axis position does not change, you can nevertheless program more than four axes.
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 LN X0.499 Y-3.112 Z-17.105 NX0.2196165 NY-0.1369522 NZ0.9659258 | ; 3-axis with surface normal vector, without tool orientation |
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 LN X0.499 Y-3.112 Z-17.105 NX0.2196165 NY-0.1369522 NZ0.9659258 TX+0 TY–0.8764339 TZ+0.2590319 M128 | ; 4-axis with M128, surface normal vector and tool orientation |
Structure of an NC block with vectors
Surface normal vector perpendicular to the contour | Tool direction vector |
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 LN X+0.499 Y-3.112 Z-17.105 NX0 NY0 NZ1 TX+0.0078922 TY–0.8764339 TZ+0.2590319 | ; Straight line LN with surface normal vector and tool orientation |
Syntax element | Meaning |
---|---|
LN | Straight line LN with surface normal vector |
X Y Z | Target coordinates |
NX NY NZ | Components of the surface normal vector Optional syntax element |
TX TY TZ | Components of the tool direction vector Optional syntax element |
Types of machining according to number of axes
3-axis machining
If only the linear axes X, Y and Z are required for machining a workpiece, 3-axis machining takes place.
3+2-axis machining
If tilting of the working plane is required for machining a workpiece, 3+2-axis machining takes place.
Prerequisites:
- Machine with rotary axes
- Software option Adv. Function Set 1 (#8 / #1-01-1)
Inclined machining
For inclined machining, also referred to as inclined-tool machining, the tool is positioned at a user-defined angle to the working plane. The orientation of the working plane coordinate system WPL-CS is not changed, but only the position of the rotary axes and therefore the tool position. The control is able to compensate for the offset that is created in the linear axes.
Inclined machining is used in conjunction with undercuts and short tool clamping lengths.
Prerequisites:
- Machine with rotary axes
- Software option Adv. Function Set 1 (#8 / #1-01-1)
- Software option Adv. Function Set 2 (#9 / #4-01-1)
4-axis machining
In 4-axis machining, also referred to as 4-axis simultaneous machining, the machine moves four axes at the same time.
Requirements:
- Machine with rotary axes
- Software option Adv. Function Set 1 (#8 / #1-01-1)
- Software option Adv. Function Set 2 (#9 / #4-01-1)
Process steps
CAD
Application
Using CAD systems, designers create the 3D models of the required workpieces. Incorrect CAD data has a negative impact on the entire process chain, including the quality of the workpiece.
Notes
- In 3D models, avoid open or overlapping faces and unnecessary points. If possible, use the check functions of the CAD system.
- Design or save the 3D models based on the center of tolerance and not the nominal dimensions.
Support manufacturing with additional files:
- Provide 3D models in STL format. The control-internal simulation can use the CAD data as blank and finished parts, for example. Additional models of tool and workholding equipment are required in conjunction with collision testing (#40 / #5-03-1).
- Provide drawings with the dimensions to be checked. The file type of the drawings is not important in this respect, since the control can also open files such as PDFs, and therefore supports paperless production.
Definition
Abbreviation | Definition |
---|---|
CAD (computer- aided design) | Computer-aided design |
CAM and postprocessor
Application
Using machining strategies within the CAM systems, CAM programmers create machine-independent and control-independent NC programs based on the CAD data.
With the aid of the postprocessor, the NC programs are ultimately output specific to machine and control.
Notes on CAD data
- Avoid quality losses due to unsuitable transfer formats. Integrated CAM systems with manufacturer-specific interfaces work in some cases without loss.
- Take advantage of the available accuracy of the CAD data obtained. A geometry or model error of less than 1 μm is recommended for finishing large radii.
Notes on chord errors and Cycle 32 TOLERANCE
- In roughing, the focus is on the processing speed.
The sum of the chord error and the tolerance T in Cycle 32 TOLERANCE must be smaller than the contour allowance, otherwise contour violations may occur.
Chord error in CAM system
0.004 mm to 0.015 mm
Tolerance T in Cycle 32 TOLERANCE
0.05 mm to 0.3 mm
- When finishing with the aim of high accuracy, the values must provide the required data density.
Chord error in CAM system
0.001 mm to 0.004 mm
Tolerance T in Cycle 32 TOLERANCE
0.002 mm to 0.006 mm
- When finishing with the aim of a high surface quality, the values must allow smoothing of the contour.
Chord error in CAM system
0.001 mm to 0.005 mm
Tolerance T in Cycle 32 TOLERANCE
0.010 mm to 0.020 mm
Notes on control-optimized NC output
- Prevent rounding errors by outputting axis positions with at least four decimal places. For optical components and workpieces with large radii (small curves), at least five decimal places are recommended. The output of surface normal vectors (for straight lines LN) requires at least seven decimal places.
- You can prevent the cumulation of tolerances by outputting absolute instead of incremental coordinate values for successive positioning blocks.
- If possible, output positioning blocks as arcs. The control calculates circles more accurately internally.
- Avoid repetitions of identical positions, feed specifications and additional functions (e.g., M3).
- If a subprogram call and a subprogram definition are separated by multiple NC blocks, program execution might be interrupted due to the calculation effort. Use the following options to avoid problems such as dwell marks due to interruptions:
- Put subprograms that define retraction positions at the beginning of the program. Thus, the control "knows" where to find the subprogram when it is called later.
- Use a separate NC program for machining positions or coordinate transformations. This ensures that the control simply needs to call that program when safety positions and coordinate transformations are required in the NC program.
- Output Cycle 32 TOLERANCE again only when changing settings.
- Make sure that corners (curvature transitions) are precisely defined by an NC block.
- The feed rate fluctuates strongly if the tool path is output with strong changes in direction. If possible, round the tool paths.
Tool paths with strong changes in direction at transitions
Tool paths with rounded transitions
- Do not use intermediate or interpolation points for straight paths. These points are generated, for example, by a constant point output.
- Prevent patterns on the workpiece surface by avoiding exactly synchronous point distribution on surfaces with even curvature.
- Use suitable point distances for the workpiece and the machining step. Possible starting values are between 0.25 mm and 0.5 mm. Values greater than 2.5 mm are not recommended, even with high machining feed rates.
- Avoid incorrect positioning by outputting the PLANE functions (#8 / #1-01-1) with MOVE or TURN without using separate positioning blocks. If you output STAY and position the rotary axes separately, use the variables Q120 to Q122 instead of fixed-axis values.
Tilting the working plane with PLANE functions (#8 / #1-01-1)
- Prevent strong feed breaks at the tool location point by avoiding an unfavorable relationship between linear and rotary axis motion. A significant change in the tool adjustment angle with a slight change in the position of the tool is a problem, for example. Take into account the different speeds of the axes involved.
- When the machine moves multiple axes at the same time, kinematic errors of the axes might sum up. Move as few axes as possible simultaneously.
- Avoid unnecessary feed-rate limitations, which you can define for compensation movements within M128 or the function FUNCTION TCPM (#9 / #4-01-1).
Compensating the tool angle of inclination with FUNCTION TCPM (#9 / #4-01-1)
- Take into account the machine-specific behavior of rotary axes.
Notes on tools
- A ball-nose cutter, a CAM output to the tool center point and a high rotational axis tolerance TA (1° to 3°) in cycle 32 TOLERANCE enable uniform feed paths.
- Ball-nose or toroidal milling cutter and a CAM output relative to the tool tip require low rotational axis tolerances TA (approx. 0.1°) in Cycle 32 TOLERANCE. Contour violations are more likely to occur at higher values. The extent of the contour violations depends on factors such as the tool position, the tool radius and the depth of engagement.
Notes on user-friendly NC outputs
- Facilitate the easy adaptation of NC programs by using the machining and touch probe cycles of the control.
- Facilitate both the adaptation options and the overview by defining feed rates centrally using variables. It is preferable to use freely usable variables (e.g., QL parameters).
- Provide a better overview by structuring the NC programs. One method is to use subprograms within the NC programs. If possible, divide larger projects into multiple separate NC programs.
- Support correction options by outputting contours with tool radius correction.
- Use structure items to enable fast navigation within the NC programs.
- Use comments to communicate important information about the NC program such as the chord error being used.
NC control and machine
Application
The control uses the points defined in the NC program to calculate the motions of each machine axis as well as the required velocity profiles. Control-internal filter functions then process and smooth the contour so that the control does not exceed the maximum permissible path deviation.
The motions and velocity profiles calculated are implemented as movements of the tool by the machine's drive system.
You can use various intervention and correction options to optimize machining.
Notes on the use of CAM-generated NC programs
- The simulation of machine and control-independent NC data within the CAM systems can deviate from the actual machining. Check the CAM-generated NC programs using the control-internal simulation.
- Take into account the machine-specific behavior of rotary axes.
- Make sure that the required tools are available and that the remaining service life is sufficient.
- If necessary, change the values in Cycle 32 TOLERANCE depending on the chord error and the dynamic response of the machine.
- Machine
Refer to your machine manual.
Some machine manufacturers provide an additional cycle for adapting the behavior of the machine to the respective machining operation (e.g., Cycle 332 Tuning). Cycle 332 can be used to modify filter settings, acceleration settings and jerk settings.
- If the CAM-generated NC program contains vectors, it is possible to correct tool movements in three dimensions.
- Software options enable further optimizations.
Notes on software limit switches for modulo axes
The following information on software limit switches for modulo axes also applies to traversing limits.
The following general conditions apply to software limit switches for modulo axes:
- The lower limit is greater than –360° and less than +360°.
- The upper limit is not negative and less than +360°.
- The lower limit is not greater than the upper limit.
- The lower and upper limits are less than 360° apart.
If the general conditions are not met, the control cannot move the modulo axis and issues an error message.
If the target position or a position equivalent to it is within the permitted range, movement is permitted with active modulo limit switches. The direction of motion is determined automatically, as only one of the positions can be approached at any one time. Please note the following examples!
Equivalent positions differ by an offset of n x 360° from the target position. The factor n corresponds to any integer.
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 L C+0 R0 F5000 | ; Limit switches –80° and +80° |
12 L C+320 | ; Target position –40° |
The control positions the modulo axis between the active limit switches to the position –40°, which is equivalent to 320°.
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 L C-100 R0 F5000 | ; Limit switches –90° and +90° |
12 L IC+15 | ; Target position –85° |
The control executes the traversing motion because the target position lies within the permitted range. The control positions the axis in the direction of the nearest limit switch.
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 L C-100 R0 F5000 | ; Limit switches –90° and +90° |
12 L IC-15 | ; Error message |
The control issues an error message because the target position is outside the permitted range.
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 L C+180 R0 F5000 | ; Limit switches –90° and +90° |
12 L C-360 | ; Target position 0°: Also applies for a multiple of 360° (such as 720°) |
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
11 L C+180 R0 F5000 | ; Limit switches –90° and +90° |
12 L C+360 | ; Target position 360°: Also applies for a multiple of 360° (such as 720°) |
If the axis is exactly in the middle of the prohibited area, the distance to both limit switches is identical. In this case, the control can move the axis in both directions.
If the positioning block results in two equivalent target positions in the permitted range, the control positions itself along the shorter path. If both equivalent target positions are 180° away, the control selects the direction of motion according to the programmed algebraic sign.
Definitions
Modulo axis
Modulo axes are axes whose encoder only returns values between 0° and 359.9999°. If an axis is used as a spindle, then the machine manufacturer must configure this axis as a modulo axis.
Rollover axis
Rollover axes are rotary axes that can perform several or any number of revolutions. The machine manufacturer must configure a rollover axis as a modulo axis.
Modulo counting method
The position display of a rotary axis with the modulo counting method is between 0° and 359.9999°. If the value exceeds 359.9999°, the display starts over at 0°.
Functions and function packages
ADP motion control
Distribution of points | |
Comparison without and with ADP |
CAM-generated NC programs with an insufficient resolution and variable point density in adjacent paths can lead to feed rate fluctuations and errors on the workpiece surface.
The Advanced Dynamic Prediction (ADP) function extends the prediction of the permissible maximum feed rate profile and optimizes the motion control of the axes involved during milling. This means that you can achieve a high surface quality with a short machining time and reduce the reworking effort.
The most important benefits of ADP at a glance:
- With bidirectional milling, the forward and reverse paths have symmetrical feed behavior.
- Tool paths adjacent to one another have uniform feed paths.
- Negative effects associated with typical problems of CAM-generated NC programs are compensated for or mitigated, e.g.:
- Short stair-like steps
- Rough chord tolerances
- Strong rounded block end point coordinates
- Even under difficult conditions, the control precisely complies with the dynamic parameters.
Dynamic Efficiency
The Dynamic Efficiency package of functions enables you to increase process reliability in heavy machining and roughing in order to improve efficiency.
Dynamic Efficiency includes the following software features:
- Active Chatter Control (ACC (#45 / #2-31-1))
- Adaptive Feed Control (AFC (#45 / #2-31-1))
- Trochoidal milling cycles (#167 / #1-02-1)
Using Dynamic Efficiency offers the following advantages:
- ACC, AFC and trochoidal milling reduce machining time by increasing the material removal rate.
- AFC enables tool monitoring and thus increases process reliability.
- ACC and trochoidal milling extend the tool life.
You can find more information in the brochure titled Options and Accessories.
Dynamic Precision
The Dynamic Precision package of functions enables you to machine quickly and accurately, and with high surface quality.
Dynamic Precision includes the following software functions:
- Cross Talk Compensation (CTC (#141 / #2-20-1))
- Position Adaptive Control (PAC (#142 / #2-21-1))
- Load Adaptive Control (LAC (#143 / #2-22-1))
- Motion Adaptive Control (MAC (#144 / #2-23-1))
- Machine Vibration Control (MVC (#146 / #2-24-1))
The functions each provide decisive improvements. They can be combined and also mutually complement each other:
- CTC increases the accuracy in the acceleration phases.
- MVC allows to machine better surfaces.
- CTC and MVC result in fast and accurate processing.
- PAC leads to increased contour constancy.
- LAC keeps accuracy constant, even with variable load.
- MAC reduces vibrations and increases the maximum acceleration for rapid traverse movements.
You can find more information in the brochure titled Options and Accessories.