Define Macros on a Turning Operation

task target This task shows you how to define macros on a turning operation.

This is done using the Macros tab of the machining operation editor. In this example you will add approach and retract macros to a Longitudinal Rough Turning operation.

For more general information about macros, see NC Macros.

task target

Predefined Macros

You can use predefined macros such as Direct or Axial-Radial approach. These are made up from one or more paths in a specific order. Just select the desired mode in the Current Macro Toolbox.

You can then adjust parameters (such as feedrate) of the macro.

User-Built Macros

You can also build your own macros using the Build by user mode.

Depending on the context, you can use the following icons to specify macro paths:

tangent motion
normal motion
circular motion
PP word
motion perpendicular to a plane
distance along a given direction
motion to a point.

In addition, the following icons allow you to:

remove all macro paths
remove current macro paths
copy the motions defined on the Approach macro on to the approach motions of other macros or copy the motions defined on the Retract macro on to the retract motions of other macros.

Macro Edition

A sensitive icon representing the elementary paths of the macro will help you to build or edit your macro. The current macro path is colored violet. Right-clicking a macro path gives you access to a contextual menu.

  • Deactivate: Deactivates the selected macro path.

  • Activate: Activates a path that was previously deactivated.

  • Feedrate: Gives access to feedrates for the selected macro path (RAPID, lead-in, lift-off, and so on). Local feedrates can be set to either Angular units (length per revolution) or Linear units (length per minute).

  • Parameter: Gives access to parameters of the selected macro path.

  • Delete: Deletes the selected macro path.

  • Insert: Inserts a macro path depending on the type chosen in the sub-menu.

Inherited Macros

If you create a machining operation and there are other operations of the same type in the program, the new operation will inherit the macros used in the most-recently edited operation of the same type. An operation is considered edited when you click OK to quit the operation definition dialog box.

 

Interruptible Macros

Linking macros, which are available for Rough, Groove, Recess, Ramp Rough and Ramp Recess Turning operations, can be interrupted. Interrupt conditions are defined in the Options tab of the Current Macro Toolbox.

Interrupt modes for Linking macros are:

  • No: macro is not interrupted
  • Start of path: interrupt macro at the start of the path where the specified time is reached
  • End of path: interrupt macro at the end of the path where the specified time is reached
  • On time: interrupt macro as soon as the specified time is reached
  • Number of paths: interrupt macro at the end of the number of specified paths
  • By levels: for Groove Turning only, interrupt macro at the end of the number of specified levels.

The specified time may correspond to the expected lifetime of the insert, for example. This allows you to interrupt an operation in order to change a worn insert. This is useful when machining very hard materials.

Create a Longitudinal Rough Turning operation as described in the Lathe Machining User's Guide.
scenario 1. Double-click the Longitudinal Rough Turning operation in the specification tree to edit that operation.
2. Select the Macros tab in the operation definition dialog box. The initial status of all the macros in the Macro Management list is Inactive.
3. Right-click the Approach macro line and activate the macro by means of Activate.

In the Current Macro Toolbox, select the Axial radial mode.

A sensitive icon representing the paths of the approach macro appears.

4. Select the point symbol in the sensitive icon then select a point in the 3D window. 

The radial and axial paths of the macro are calculated from the selected point to the start point of the operation.

  5. You can then click Replay to check the approach motion. The status of the macro becomes Up to date.
6. Right-click the Retract macro line and activate the macro by means of Activate.

In the Current Macro Toolbox, select the Radial axial mode.

7. Select the point symbol in the sensitive icon then select a point in the 3D window. 

The axial and radial paths of the macro are calculated from the end point of the operation to the selected point.

8.

Click Replay to validate the tool path. The status of the macro becomes Up to date.

  In the Replay dialog box, select the Different colors mode in order to visualize feedrate changes. The tool path is displayed with the following colors:
  • Yellow: approach or lead-in feedrate
  • Green: machining feedrate
  • Blue: retract feedrate
  • Red: Rapid or lift-off feedrate
  • White: user-defined feedrate.

Please note that transition paths are represented by dashed white lines.

9. Click OK to accept the modifications made to the operation.

The operation is updated with the specified macros.

task target

PP Words in Macros

You can insert PP words in macros by double-clicking the green X symbols in the sensitive icons.

The PP Words Selection dialog box is displayed. You can enter the syntax in the following ways:

  • enter one or more PP word syntaxes directly in the text field
  • click to access the PP words table that is referenced in the current part operation. 
    You can then select predefined syntaxes from this table using the dialog box that appears.

end of task