Programming possibilities
Path functions
Use the path functions to program contours.
A workpiece contour consists of several contour elements, such as straight lines and circular arcs. You use path functions, such as straight line L, to program tool movements for these contours.
Fundamentals of path functions
Graphical programming
As an alternative to Klartext programming you can program contours graphically in the Contour graphics workspace.
You can create 2D sketches by drawing lines and arcs and then export the contour to an NC program.
You can import existing contours from an NC program for graphical editing.
Miscellaneous functions M
You can use miscellaneous functions to control the following actions:
- Program run (e.g., M0 Program STOP)
- Machine functions (e.g., M3 Spindle ON clockwise)
- Contouring behavior of the tool (e.g., M197 Corner rounding)
Subprograms and program-section repeats
Subprograms and program-section repeats enable you to program a machining sequence once and then run it as often as necessary.
Program sections that are defined in a label can be directly executed repeatedly as program-section repeats, or can be called as a subprogram at defined locations in the main program.
If you wish to execute a specific NC program section only under certain conditions, you also define this machining sequence as a subprogram.
Within an NC program you can call a separate NC program for execution.
Control structures
Using control structures, you can program the NC program more clearly and with a better structure. The control indents the NC blocks within the control structures. Thus you can see right away where a control structure starts and ends.
Examples of control structures are case analyses and program loops.
You can program case analyses by using IF with a condition and ELSE, for example.
You can program loops by using WHILE, for example, and execute a program section several times.
Programming with variables
In an NC program, variables are used as placeholders for numerical values or texts. A numerical value or text is assigned to a variable elsewhere.
In the Q parameter list window, you can see and edit the numerical values and texts of the individual variables.
You can use the variables to program mathematical functions that control program execution or describe a contour.
You can also use variable programming, for example, to save and process measurement results determined by the 3D touch probe during program execution.
CAM programs
You can also optimize and execute externally created NC programs on the control.
You use CAD (Computer-Aided Design) to create geometric models of the workpieces to be produced.
In a CAM system (Computer-Aided Manufacturing) you then define how the CAD model will be produced. You can use an internal simulation to check the resulting tool paths, which are not control-specific.
Using a postprocessor, you can then generate the control- and machine-specific NC program in the CAM system. This results not only in programmable path functions but also LN lines with surface-normal vectors.
Possible methods for editing
Application
The editing of NC programs refers both to the insertion of NC functions as well as their modification. You can also edit NC programs that you have previously generated with a CAM system and transmitted to the control.
Related topics
- Using the Program workspace
- Insert NC function window
- Text mode
Description of function
You can edit NC programs only in the Editor operating mode and in the MDI application.
In the MDI application you edit only the NC program $mdi.h or $mdi_inch.h.
Inserting NC functions
The control provides the following options to insert NC functions:
- Inserting an NC function directly with keys or buttons
Frequently required NC functions such as path functions can be inserted via keys.
As an alternative to the keys, the control offers both the screen keyboard as well as the Keyboard workspace in NC input mode.
- Inserting an NC function by selecting it
You can select all NC functions from the Insert NC function window.
- Inserting an NC function in Text mode
In Text mode, the control offers automatic completion.
- Tip
If Text mode is active, then the Klartext editor toggle switch is located on the left and is dimmed.
Editing NC functions
The control provides the following options to edit NC functions:
- Editing an NC function in the Klartext editor mode
By default, the control opens newly created and syntactically correct NC programs in the Klartext editor mode.
- Editing an NC function in the Form column
The Form column not only shows the syntax elements selected and used, but also all those that can be used for the current NC function.
- Editing an NC function in Text mode
If the control can't automatically correct syntax errors in the NC program, it activates Text mode. You must correct all errors before you can switch to Klartext editor mode.
Inserting NC functions
Inserting an NC function directly with keys or buttons
To insert frequently needed NC functions: | ||
|
Inserting an NC function by selecting it
To insert a new NC function: | ||
| ||
|
Inserting an NC function in Text mode
To insert an NC function:
|
Editing NC functions
Editing an NC function in the Klartext editor mode
To edit an NC function in the Klartext editor mode:
| ||
|
Editing an NC function in the Form column
If the Klartext editor mode is active, you can also use the Form column.
To edit an NC function in the Form column:
| ||
| ||
| ||
|
Editing an NC function in Text mode
To edit an incorrect NC function in Text mode:
| ||
| ||
| ||
|
Inserting an axis value into an NC block
To enter the value of an axis into an NC block:
| ||
|
Notes
- Edit NC programs in the Program workspace only
- In Text mode, the control may not be able to suggest a solution in every case.
- When you are editing an NC function, use the arrows to navigate left and right to the syntax elements, even within cycles. The up and down arrows search for the same syntax element in the rest of the NC program.
Searching for identical syntax elements in different NC blocks
- If you are editing an NC block and have not yet saved it, the Undo and Redo functions will affect the individual syntax elements of the NC function.
- Always write an NC program as if the tool were moving. This makes it irrelevant whether a head axis or a table axis performs the motion.
- You cannot edit an NC program in the Editor operating mode if this NC program is currently being executed in the Program Run operating mode.
- In the Klartext editor mode, you can insert line breaks within comments or structuring items.