Thread milling cycle

INCT_ThreadMillingCycleFormer - CAM system interface that implements the functionality to simplify the formation of the movements of the thread milling cycle. The object that implements this interface is returned by the INCT_CLData.CreateMillingCycleFormer function when it is executed with the mctThreadMilling parameter.

images/download/attachments/137013651/milling.png

Purpose:

Performing movements in various types of thread milling cycles, for different racks, typically follows the same trajectory:

  1. Tool approach to the starting level at rapid feed rate.

  2. Tool approach to the clearance level at rapid feed rate.

  3. Tool approach by arc or helix to the start point of milling at feed rate (clearance).

  4. Thread milling with specified parameters (center, diameter, pitch) until the end of the milling level.

  5. Tool retraction by arc or helix at feed rate to the clearance level after retraction (clearance).

  6. Return to the starting level at rapid feed rate.

Examples of such cycles for Sinumerik: CYCLE90.

Using a former allows forming the toolpath trajectory based on the specified parameters. It also enables adding necessary cycle-specific features to the toolpath at any point, changing the feed type or value, or skipping a tool movement prepared by the former.

Using the Former:

It is recommended to create a new former for each new cycle in the program frame. Thus, the interface of the old former should be released when creating a new one or when the interpreter finishes its work.

To generate the tool movement commands along the cycle trajectory, the following steps must be followed:

  1. Obtain the former interface (INCT_CLData.CreateMillingCycleFormer).

  2. Set the axis indexes for the movements (Set_AxisIndexes).

  3. Set the current plane (Set_Plane).

  4. Set the working feedrate (Set_Feedrate).

  5. Set the thread type (Set_ThreadType).

  6. Set the thread direction (Set_ThreadDirection).

  7. Set the thread pitch (Get_ThreadStep).

  8. Set the thread diameter (Set_Diameter).

  9. Set the center point of the thread (Set_CenterPoint).

  10. Set the approach level (Set_TopLevel).

  11. Set the safe plane level (Set_RapidLevel).

  12. Set the end milling level (Set_BottomLevel).

  13. Set the approach overshoot level (Set_TravelInOvershoot).

  14. Set the retraction overshoot level (Set_TravelOutOvershoot).

  15. Assign an event handler to the cycle (Set_Events) if changes need to be made to the cycle trajectory.

  16. Generate the tool movement commands along the cycle trajectory (MakeWorkpath).


Description of interface methods:

Method

Method description

Set_AxisIndexes

The method sets the indices of the X, Y, Z axes in which movements will be made during the formation of the cycle path.

Input parameters: Value (TNCDCAxisIndexes) - X (integer) - index of the X axis, Y (integer) - index of the Y axis, Z (integer) - index of the Z axis.

No output parameters.

Get_AxisIndexes

The function returns the indices of the X, Y, Z axes in which movements will be made during the formation of the cycle path (TNCDCAxisIndexes).

No input parameters.

Set_Plane

The method sets the current plane.

Input parameter: Value (TNCPlaneType) - the current plane.

ptXY - XY plane, hole drilling is performed along the Z axis.
ptYZ - YZ plane, hole drilling is performed along the X axis.
ptZX - ZX plane, hole drilling is performed along the Y axis.

No output parameters.

Get_Plane

The function returns the current plane (TNCPlaneType).

No input parameters.

Set_ThreadType

The method sets the thread type.

Input parameter: Value (TNCMillingThreadType) - thread type.

mttInternal - internal

mttExternal - external

No output parameters.

Get_ThreadType

The function returns the thread type.

No input parameters.

Set_ThreadDirection

The method sets the thread direction.

Input parameter:

Value (TNCCircularMode) - thread direction.

cmCW - clockwise

cmCCW - counterclockwise

No output parameters.

Get_ThreadDirection

The function returns the thread direction value.

No input parameters.

Set_ThreadStep

The method sets the thread pitch value.

Input parameter: Value (real number) - thread pitch value.

No output parameters.

Get_ThreadStep

The function returns the thread pitch value.

No input parameters.

Set_Diameter

The method sets the thread diameter value.

Input parameter: Value (real number) - thread diameter value.

No output parameters.

Get_Diameter

The function returns the thread diameter value.

No input parameters.

Set_CenterPoint

The method sets the thread center point.

Input parameter: Value (TNC2DPoint) - thread center point.

No output parameters.

Get_CenterPoint

The function returns the thread center point (TNC2DPoint).

No input parameters.

Set_TopLevel

The method sets the entry level.

Input parameter: Value (real number) - entry level value.

No output parameters.

Get_TopLevel

The function returns the entry level value.

No input parameters.

Set_RapidLevel

The method sets the safe plane level value.

Input parameter: Value (real number) - safe plane level value.

No output parameters.

Get_RapidLevel

The function returns the safe plane level value.

No input parameters.

Set_BottomLevel

The method sets the milling end level value.

Input parameter: Value (real number) - milling end level value.

No output parameters.

Get_BottomLevel

The function returns the milling end level value.

No input parameters.

Set_TravelInOvershoot

The method sets the overshoot level during approach.

Input parameter: Value (real number) - overshoot level during approach.

No output parameters.

Get_TravelInOvershoot

The function returns the overshoot level during approach.

No input parameters.

Set_TravelOutOvershoot

The method sets the overshoot level during withdrawal.

Input parameter: Value (real number) - overshoot level during withdrawal.

No output parameters.

Get_TravelOutOvershoot

The function returns the overshoot level during withdrawal.

No input parameters.

Set_Feedrate

The method sets the feedrate value.

Input parameter: Value (real number) - feedrate value.

No output parameters.

Get_Feedrate

The function returns the feedrate value.

No input parameters.

Set_MPM

The method sets the feed type.

Input parameter: Value (boolean) - feed type. True - mm/min, False - rpm.

No output parameters.

Get_MPM

The function returns the feed type.

No input parameters.

Set_Events

The method assigns events to control the behavior of the cycle. When using events, it is possible to add specific features for the cycle to the movement path at any point being generated, change the feed type or value, or skip a tool movement prepared by the path generator.

Input parameter: Value (INCT_MillingCycleEvents) - an object implementing events. Detailed description below.

No output parameters.

Get_Events

The function returns an object that implements the events associated with the loop generator (INCT_MillingCycleEvents).

No input parameters.

MakeWorkpath

The method forms a cycle path according to specified parameters.


INCT_MillingCycleEvents is an interface implemented in the interpreter that allows controlling the behavior of the thread milling cycle. The interface consists of a set of event methods that are executed during the tool movement within the cycle path generator. By using the interface methods, you can add specific features for the cycle to the movement path at any generated segment, such as height, oriented stop, etc., change the feed type, or skip a tool movement prepared by the path generator.

If events are assigned to the cycle path generator, any tool movement within the generator consists of three stages:

  1. The method INCT_MillingCycleEvents.BeforeMove is executed. The method receives as parameters: the movement type, the coordinates of the movement point, and the feed type.

  2. The method INCT_MillingCycleEvents.OnMove/OnArc is executed, depending on the movement type: straight or arc.
    For OnMove, the method receives the following parameters: movement type, coordinates of the movement point, feed type, and movement execution flag. All parameters, except the movement type, can be changed in the method's implementation. Depending on the execution flag specified in OnMove, the tool will either move to the specified point with the given feed rate or the movement will not be performed.
    For OnArc, the method receives the following parameters: movement type, center coordinates of the arc, movement point, radius, feed type, and movement execution flag. All parameters, except the movement type, can be changed in the method's implementation. Depending on the execution flag specified in OnArc, the tool will either move to the specified point with the given feed rate or the movement will not be performed.

  3. The method INCT_MillingCycleEvents.AfterMove is executed. The method receives the following parameters: movement type, coordinates of the movement point, feed type, and the values returned by OnMove/OnArc.


Description of interface methods:

Method

Method description

Description of Use

BeforeMove

The method will be executed before each tool movement when forming the cycle trajectory.

Input parameters: MoveType (TNCMillingCycleMoveType) - movement type, description below; Point (TNC3DPoint) - coordinates of the movement point; Feed (TNCFeedType) - feed type.

mmMoveToTopLevel - movement to the starting point at the TopLevel.

mmMoveToRapidLevel - movement to the feed start level.

mmTravelInMovement - approach to the thread by arc.

mmThreadMilling - thread milling.

mmTravelOutMovement - retraction from the thread to the center by arc.

mmReturnToTopLevel - return to the TopLevel.

No output parameters.

If it is necessary to add specific commands before performing the movement, they should be added to the method implementation.

For example, if there is a need to turn on the cooling system of the machine before turning the groove, it can be done by adding a call INCT_CLData.AddCoolant to the implementation of the BeforeMove method with the appropriate parameters by the condition MoveType = mmMoveToTopLevel.

OnMove

The method will be executed immediately before each tool movement when forming the cycle trajectory.

Input parameters: MoveType (TNCMillingCycleMoveType) - type of movement, description is provided above;

Input and output parameters: Point (TNC3DPoint) - coordinates of the movement point; Feed (TNCFeedType) - feed type; Handled (Boolean) - flag indicating whether the movement was performed within the implementation (True - movement was executed, False - movement was not executed).

If, after calling OnMove, the Handled parameter is set to True, it means that the movement was executed within the OnMove method, and the cycle generator does not add a movement command to the tool movement trajectory.

If, after calling OnMove, the Handled parameter is set to False, the cycle generator assumes that the movement was not executed within the OnMove method and adds a movement command to the tool movement trajectory to the Point with the feed type Feed.

If it is necessary to override the movement point or feed values, or to skip the movement (omit it):

For example, if the feed type needs to be changed to rapid feed when returning to the initial level after milling, the implementation of the OnMove method should modify the returned Feed parameter to ffRapid when MoveType = mmReturnToTopLevel (the feed type is described in this article, see OutStandardFeed).

If the tool movement needs to be performed to a point different from the one calculated by the cycle, the returned Point parameter in the OnMove method should be changed.

If the movement to the cycle-calculated point is not required, the Handled parameter in the OnMove method implementation should be set to True.

OnArc

The method will be executed directly before each tool movement when forming the cycle trajectory.

Input parameters: MoveType (TNCMillingCycleMoveType) - type of movement, description is provided above;

Input and output parameters: Center, Point (TNC3DPoint) - coordinates of the center and the movement point; Radius (real number) - radius of the arc, Feed (TNCFeedType) - feed type; Handled (boolean) - flag indicating whether the movement was executed within the implementation (True - movement executed, False - movement not executed).

If, after calling OnArc, the Handled parameter is set to True, this means that the movement was executed inside the OnArc method, and the cycle generator does not add the movement command to the tool path.

If, after calling OnArc, the Handled parameter is set to False, the cycle generator assumes that the movement was not executed within the OnArc method and adds a movement command to the tool path, moving the tool along the arc to the Point with the Feed type specified.

If it is necessary to override the values of the movement point or feed, or to skip the movement.

AfterMove

The method will be executed after each tool movement when forming the cycle trajectory, even if the movement was canceled in OnMove/OnArc.

Input parameters: MoveType (TNCMillingCycleMoveType) - type of movement, description see above; Point (TNC3DPoint) - coordinates of the movement point; Feed (TNCFeedType) - feed type.

There are no output parameters.

If it is necessary to add certain commands after the movement is executed, they should be added in the implementation of the method.