Drilling cycle

INCT_DrillingCycleFormer - SprutCAM X interface that implements the functionality to simplify the formation of movements in drilling cycles. The object implementing this interface is returned by the INCT_CLData.CreateDrillingCycleFormer, INCT_GeomCLData.CreateDrillingCycleFormer function when it is executed with any of the parameters: dctSimple, dctWithShift, dctPeck.

images/download/attachments/84218637/DrillingCycleFormer.png

Purpose:

Displacements in different drilling cycles, for different racks generally repeat the same path:

  1. Positioning the tool over the center of the hole/next hole in the accelerated feed.

  2. Move the tool to the level of the accelerated movement at the accelerated feed.

  3. Move the tool to the bottom of the hole in the work feed.

  4. Returns to the level of accelerated movement at an accelerated feed.

  5. Return to retract/return level in expedited feed.

  6. If the number of repetitions is not over, return to step 1.

Examples of such cycles for Fanuc: G74, G81, G82, G84, G85, G86, G88, G89; Sinumerik: CYCLE81, CYCLE82, CYCLE85, CYCLE87, CYCLE88, CYCLE89; Heidenhain: CYCL DEF 201, CYCL DEF 206, CYCL DEF 207, etc.

The use of a shaper allows for the specified parameters: initial position, levels of accelerated movement, bottom of the hole, number of repetitions, etc., to form the tool path. And also add to the path of movement on any formed section features necessary for a specific cycle: dwell operation, oriented stop, threading, etc., change the type or value of the feed, or skip the tool path prepared by the former.


Shaper use:

We recommend to create a new drilling cycle former for each new cycle in the control program frame, except for cases of repeating the cycle operation in a new frame (analogue of the CYCL CALL for Heidenhain). Thus, the interface of the old driver must be freed when creating a new one or shutting down the interpreter.

To form commands for tool path along a cycle path, the following steps must be performed:

  1. Get shaper interface (INCT_CLData.CreateDrillingCycleFormer, INCT_GeomCLData.CreateDrillingCycleFormer).

  2. Set the indexes of the axes X, Y, Z on which the movements will be made (Set_AxisIndexes).

  3. Set the current plane (Set_Plane).

  4. Set the hole center point value (Set_HoleCenter).

  5. Set the center point mode (Set_HoleCenterMode).

  6. Set the level of accelerated movement (Set_RapidLevel).

  7. Set bottom hole level (Set_BottomLevel).

  8. Set the return level (Set_TopLevel).

  9. Set the feedrate (Set_Feedrate), feed units (Set_MPM).

  10. Set the number of repetitions of the cycle (Set_Count).

  11. If the loop path needs to be modified, assign loop event handler (Set_Events).

  12. Form the teams of tool path along the cycle path (MakeWorkpath).


Description of interface methods:

Method

Method Description

Set_AxisIndexes

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

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

No output parameters.

Get_AxisIndexes

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

No input parameters.

Set_HoleCenter

The method sets the coordinates of the center point of the hole.

Input parameters: Value (TNC3DPoint), X, Y, Z - the coordinate value for the corresponding axes.

No output parameters.

Get_HoleCenter

The function returns the coordinates of the center of the hole point (TNC3DPoint).

No output parameters.

Set_HoleCenterMode

The method sets the center point mode.

Input parameter: Value (boolean) - center point mode. True - the coordinates of the hole center point (Set_HoleCenter) are given in absolute values. False - the coordinates of the hole center point are given in relative values from the current tool position.

No output parameters.

Get_HoleCenterMode

The function returns the value of the center point mode (boolean).

Set_Plane

The method sets the current plane.

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

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

No output parameters.

Get_Plane

The function returns the current plane. (TNCPlaneType).

No input parameters.

Set_RapidLevel

The method sets the level of accelerated path along the drilling axis.

Input parameter: Value (number) - the level of accelerated movement.

No output parameters.

Get_RapidLevel

The function returns the level of the accelerated path along the drilling axis (number).

No input parameters.

Set_BottomLevel

The method sets the bottom level of the hole along the drilling axis.

Input parameter: Value (number) - the bottom level of the hole.

No output parameters.

Get_BottomLevel

The function returns the bottom hole level along the drilling axis (number).

No input parameters.

Set_TopLevel

The method sets the level of retract/return along the drilling axis.

Input Parameter: Value (number) - the level of retract/return.

No output parameters.

Get_TopLevel

The function returns the level of retract/return along the drilling axis (number).

No input parameters.

Set_Feedrate

The method sets the value of the work feed.

Input parameter: Value (number) - feed value.

No output parameters.

Get_Feedrate

The function returns the value of the work feed (number).

No input parameters.

Set_MPM

The method establishes the sign of the unit of measure for the feed.

Input parameter: Value (boolean) - sign of units of measure feed. True - mm per minute False - mm per turn.

No output parameters.

Get_MPM

The function returns the sign of the unit of measure of the supply (boolean).

No output parameters.

Set_Count

The method sets the number of repetitions of the cycle.

Input parameter: Value (integer) - the number of iterations of the cycle.

No output parameters.

The cycle operation varies depending on the mode of the hole center point (Set_HoleCenterMode). If the coordinates of the center point of the hole are given in absolute values, then:

  • for the number of repetitions = 0, only the instrument is positioned above the center of the hole;

  • for the number of repetitions = 1, one iteration of the loop will be performed;

  • for the number of repetitions > 1 cycle, the specified number of times will be repeated: if the coordinates of the point of the center of the hole are specified in absolute values - in one place; if the coordinates of the hole center point are specified in relative values, each iteration will be shifted by the value set in Set_HoleCenter relative to the point at which the previous iteration was completed.

Get_Count

The function returns the number of repetitions of the cycle (integer).

No output parameters.

Set_Events

The method assigns events to control the behavior of the loop. When using events, you can add features that are necessary for a particular cycle to a trajectory in any formed section: stop, oriented stop, thread cutting, etc., change the type or value of feed, or skip tool movement prepared by the former.

Input parameter: Value (INCT_DrillingCycleEvents) - the object that implements the event. Detailed description below.

No output parameters.

Get_Events

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

No output parameters.

MakeWorkpath

The method forms a cycle trajectory according to specified parameters.

Get_NextHole

The function returns the coordinates of the current hole point calculated for the current iteration (TNC3DPoint). Value is available for use only inside the events (Set_Events).

Get_RapidPoint

The function returns the coordinates of the accelerated moving point calculated for the current iteration (TNC3DPoint). Value is available for use only inside the events. (Set_Events).

Get_TopPoint

The function returns the coordinates of the point of retract/return calculated for the current iteration. (TNC3DPoint). Value is available for use only inside the events. (Set_Events).

Get_BottomPoint

The function returns the bottom point coordinates calculated for the current iteration (TNC3DPoint). Value is available for use only inside the events. (Set_Events).

INCT_DrillingCycleEvents - is an interface implemented in the interpreter that allows you to control the behavior of the drilling cycle. The interface is a set of event methods that are executed when the tool is moved inside the loop path traverser. Using the methods of the interface, you can add features that are necessary for a particular cycle to the path of motion on any formed section: stop, oriented stop, thread cutting, etc., change the type or value of feed, or skip the tool movement prepared by the former.

If events are assigned to the cycle path generator, any movement of the tool inside the imaging unit consists of 3 stages:

  1. INCT_DrillingCycleEvents.BeforeMove method is executed. The parameters specified by the cycle are transferred to the method: type of movement, coordinates of the point of movement, type of feed.

  2. INCT_DrillingCycleEvents.OnMove method is executed. The following parameters are transferred as parameters to the method: the type of movement, the coordinates of the movement point, the type of feed, the sign of the movement being executed. All parameters, except the type of movement in the implementation of the method can be changed. Depending on the sign specified in OnMove, the tool is moved to the specified point with the specified feed, or not moved.

  3. INCT_DrillingCycleEvents.AfterMove method is executed. The following parameters are passed as parameters to the method: displacement type, displacement point coordinates, feed type returned by OnMove method


Description of interface methods:

Method

Method Description

Description of use

BeforeMove

The method will be executed before each movement of the tool during the formation of the cycle trajectory.

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

mtMoveToNextHole - move to the first or to the next hole;
mtMoveToRapidLevel - move to the level of accelerated movement;
mtMoveToBottomLevel - moving to the bottom of the hole;
mtReturnToRapidLevel - return to the level of accelerated movement;
mtReturnToTopLevel - return to the level of retract/return;
mtPeck* - used when forming a cycle with chip breaking.

No output parameters

If it is necessary to add certain commands before executing the move, they must be added to the implementation of the method.

For example, if there is a need to set the spindle rotation in clockwise direction before drilling a hole, this can be done by adding the INCT_CLData.AddSpindleSpeedOnRPM call to the implementation of the BeforeMove method with the appropriate parameters according to the condition MoveType = mtMoveToBottomLevel.

OnMove

The method will be executed before each movement of the tool during the formation of the cycle trajectory.

Input parameters: MoveType (TNCDrillingCycleMoveType) - move type, see description above;

Input and output parameters: Point (TNC3DPoint) - coordinates of the point of movement; Feed (TNCFeedType) - feed type; Handled (boolean) - a sign of the execution of a movement within the OnMove implementation (True - movement completed, False - movement not performed).

If, after calling OnMove, the Handled parameter takes the value True, this means that the movement was performed inside the implementation of the OnMove method and the loop former does not add a move command to the tool path.

If, after calling OnMove, the Handled parameter takes the value False, the former assumes that the movement was not performed within the implementation of the OnMove method and adds a command to the point of the tool movement path to the Point with feed type Feed.

If necessary, override the values of the point of movement or feed, or to refuse to move (skip).

For example, if you need to change the feed type from accelerated to working, when returning after drilling, then in the implementation of the OnMove method you need to change the value of the Feed parameter to ffWorking by the condition MoveType = mtReturnToRapidLevel (the feed type is described in this article, see OutStandardFeed).

If you need to move the tool to a point other than the one calculated by the cycle, you need to change the value of the Point parameter returned by the OnMove method.

If moving to a point calculated by the cycle is not necessary, then within the implementation of the OnMove method, you need to change the value of the Handled parameter to True.

AfterMove

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

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

No output parameters

If it is necessary to add certain commands after performing the move, they need to be added to the implementation of the method.

For example, if there is a need to add a lag after drilling a hole, you can do this by adding the INCT_CLData.AddDelay call to the implementation of the AfterMove method with the appropriate parameters by the condition MoveType = mtMoveToBottomLevel.