Editing NC programs

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 previously generated with a CAM system and then transmitted to the control.

Requirements

You can edit NC programs only in the Editor operating mode and in the MDI application.

 
Tip

In the MDI application you edit only the NC program $mdi.h or $mdi_inch.h.

Description of function

Inserting NC functions

Inserting an NC function directly with keys or buttons

You can directly insert frequently needed NC functions, such as path functions, with keys.

As an alternative to the keys, the control offers both the screen keyboard as well as the Keyboard workspace in NC input mode.

Virtual keyboard of the control bar

  1. To insert frequently needed NC functions:
L

  1. Select L
  2. The control creates a new NC block and starts the dialog.
  3. Follow the instructions in the dialog

Inserting an NC function through selection

AS_4_24_11_NCFunktion_Einfuegen_PGM_1339889_Programmvorgaben
Insert NC function window

You can select all NC functions through the Insert NC function window.

  • You can navigate through the Insert NC function window as follows:
  • Navigate through the tree structure manually, starting from All functions
  • Use keys or buttons to narrow down the selection possibilities (e.g., CYCL DEF key opens the cycle groups)
  • Keycaps for NC dialog

  • Ten most recently used NC functions under Last functions
  • NC functions marked as favorites under Favorites
  • Icons on the control's user interface

  • Stored sequence of NC functions under NC sequences
  • NC sequences for reuse

  • Enter a search term under Search for NC functions
  • The control displays the results under Search result.

     
    Tip

    You can begin the search as soon as the Insert NC function window opens by entering a character.

In the areas Search result, Favorites and Last functions, the control shows the path of the NC functions.

  1. To insert a new NC function:
SF_4_NCFunktion_Einfuegen

  1. Select Insert NC function
  2. The control opens the Insert NC function window.
  3. Navigate to the desired NC function
  4. The control highlights the selected NC function.
SF_4_NCFunktion_Einfuegen_Einfuegen

  1. Select Paste
  2. The control creates a new NC block and starts the dialog.
  3. Follow the instructions in the dialog

Inserting an NC function in the text editor

In the text editor, the control provides an auto-complete function when programming.

 
Tip

If text editor mode is active, the Klartext programming toggle switch is to the left and gray.

  1. To insert an NC function:
  2. Press the enter key
  3. The control inserts an NC block.
  4. Enter the first letter of the NC function as needed
  5. Press the keyboard shortcut CTRL+BLANK
  6. The control shows a selection menu with possible syntax initiators.
  7. Select the syntax initiator
  8. Enter the value as needed
  9. Press the keyboard shortcut CTRL+BLANK again if needed
  10. Select the syntax element as needed
 
Tip
  • If you press CTRL+BLANK immediately after entering a character string, the control displays a selection menu for the current syntax element.
  • If you insert a space character after a completely entered syntax element and then press CTRL+BLANK, the control displays a selection menu for the subsequent syntax element.

Editing NC functions

Editing an NC function in the Klartext programming mode

By default, the control opens newly created and syntactically correct NC programs in the Klartext programming mode.

  1. To edit an existing NC function in the Klartext programming mode:
  2. Navigate to the desired NC function
  3. Navigate to the desired syntax element
  4. The control displays alternative syntax elements in the action bar.
  5. Select a syntax element
  6. Define a value, if necessary
EndBlk

  1. Conclude entry (e.g., by pressing END)

Editing an NC function in the Form column

If the Klartext programming mode is active, you can also use the Form column.

The Form column does not just show the syntax elements selected and used, but rather all those that are possible for the current NC function.

  1. To edit an existing NC function in the Form column:
  2. Navigate to the desired NC function
editForm

  1. Show the Form column

  1. Select an alternative syntax element if necessary (e.g., LP instead of L)
  2. If necessary, edit or add the value
  3. If necessary, enter an optional syntax element or select from a list (e.g., miscellaneous function M8)
SF_4_Formular_Bestaetigen

  1. Conclude entry (e.g., by pressing Confirm)

Editing an NC function in the text editor mode

The control tries to correct syntax errors in the NC program automatically. If automatic correction is not possible, the control switches to text editor mode while editing this NC block. You must correct all errors before you can switch to Klartext programming mode.

 
Tip
  • If text editor mode is active, the Klartext programming toggle switch is to the left and gray.
  • If you are editing an NC block with syntax errors, the only way to cancel editing is to press the ESC key.
  1. To edit an existing NC function in the text editor mode
  2. The control underscores the faulty syntax element with a jagged red line and shows an information symbol before the NC function (e.g., for FMX instead of FMAX).
  3. Navigate to the desired NC function
messageWarningIcon (1)

  1. Select the information symbol as needed
  2. The control displays the corresponding error description.

  1. Close the NC block
  2. The control might open the NC block auto-correction window with a solution proposal.
SF_4_Text_Autokorrektur_Ja

  1. Apply the proposal to the NC program with Yes or cancel auto-correction.
 
Tip
  • The control cannot offer solution proposals in all cases.
  • The text editor mode supports all navigation possibilities of the Program workspace. But you can work more quickly in the text editor mode by using gestures or a mouse, since then you can select the information symbol directly, for example.

Notes

  • The instructions include emphasized text strings (e.g., 200 DRILLING. You can use these text strings for better searching in the Insert NC function window.
  • 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 the same syntax elements in different NC blocks

  • If you are editing an NC block and haven't saved yet, the Undo and Redo functions affect the individual syntax elements of the NC function.
  • Icons on the control's user interface

  • Press the actual position capture key for the control to open the position display of the status overview. You can copy the current value of an axis into the programming dialog.
  • Status overview on the TNC bar

  • 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.
  • If you select an NC function in the Insert NC function window and swipe to the right, the control displays the following file functions:
    • Add to or remove from favorites
    • Navigate to the NC function
    • Not in the All functions area

  • In the areas Search result, Favorites and Last functions, the control shows the path of the NC functions.
  • If software options are not enabled, the control shows unavailable contents in the Insert NC function window grayed out.