Drilling cycle with chip breaking

INCT_PeckDrillingCycleFormer - SprutCAM X interface that implements the functionality to simplify the formation of movements in cycles with chip breaking. When called with the dctPeck parameter, the INCT_CLData.CreateDrillingCycleFormer, INCT_GeomCLData.CreateDrillingCycleFormer function returns as a result an object that implements two interfaces: INCT_DrillingCycleFormer, INCT_PeckDrillingCycleFormer.

Through the INCT_DrillingCycleFormer interface, basic parameters are set for the offset drilling cycle. A description of the use is given in this Drilling cycle article.

The INCT_PeckDrillingCycleFormer interface adds to the shaper implementation the ability to control the trajectory creation parameters with chip breaking.

images/download/attachments/113361102/PeckDrillingCycle.png

Purpose:

Displacements in different drilling cycles with chip breaking, 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. Return to the level of an accelerated move at rapid feed.

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

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

Drilling a hole for such cycles (the step of moving to the level of the bottom of the hole) occurs not in a single pass, but in several iterations. Examples of such cycles are Fanuc: G73, G83; Sinumerik: CYCLE83; Heidenhain: CYCL DEF 200, 203, 205, etc.


Former use:

We recommend to create a new drilling cycle former for each new cycle in the NC-code 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.

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

Using the INCT_PeckDrillingCycleFormer interface allows you to specify various parameters that control the number of iterations, the depth of cut per iteration, the type of tool retraction, etc.

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

  1. Get former interfaces (INCT_CLData.CreateDrillingCycleFormer, INCT_GeomCLData.CreateDrillingCycleFormer with the parameter dctPeck).

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

  3. Set the plane (Set_Plane).

  4. Set the hole center point (Set_HoleCenter).

  5. Set the hole center mode (Set_HoleCenterMode).

  6. Set the rapid level movement(Set_RapidLevel).

  7. Set the hole bottom level (Set_BottomLevel).

  8. Set the top level (Set_TopLevel).

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

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

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

  12. Set the parameters of the iterations for chip breaking (Set_StartLevel, Set_DepthOfCut, Set_DegressionType, Set_Degression, Set_FullReturn etc., see the description below).

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

The INCT_DrillingCycleFormer.Set_Events method for a cycle with chip breaking as an input parameter accepts an object that implements two interfaces: INCT_DrillingCycleEvents and INCT_PeckDrillingCycleEvents. For the INCT_DrillingCycleEvents interface events: BeforeMove, OnMove, AfterMove, the following type will be transmitted as the type of movement, along with the previously described values:

mtPeckMoveToNextDepthLevel - move to the next depth of cut (next iteration);
mtPeckReturnToRapidLevel - return to the level of accelerated movement at the current iteration (chip output);
mtPeckMoveToClearanceLevel - move to the current cut level minus the clearance after returning from the level of accelerated move;
mtPeckMoveToRetractionLevel - retraction and return to the current cut level (chip breaking).


Description of INCT_PeckDrillingCycleFormer interface methods:

Method

Method Description

Set_DepthOfCut

The method sets the cut depth for the iteration. The depth of the cut is the value that the tool moves to while drilling a hole, at each iteration.

No output parameters.

Get_DepthOfCut

The function returns the cut depth (number).

No input parameters.

Set_StartLevelType

The method sets the type of value to 'Initial Level'.

Input parameter: Value (TNCStartLevelType) - value type:

slFromLevel - from set in Set_StartLevel values begins counting the first depth of the cut.
slFirstLevel - from set in Set_StartLevel value is the first depth of the cut.

No output parameters.

Get_StartLevelType

The function returns to the 'Start Level' value type (TNCStartLevelType).

No input parameters.

Set_StartLevel

The method sets the level relative to which the first cut depth or the first cut depth is measured, depending on the value set in Set_StartLevelType.

Input parameter: Value (Integer) - set value.

No output parameters.

Get_StartLevel

The function returns the level relative to which the first cut depth or the first cut depth is calculated, depending on the value (number) set in Set_StartLevelType.

Set_Degression

The method establishes the value of degression - changes in the depth of cut at each iteration.

Input parameter: Value (number) - the value of degression.

The estimated value of the degression will depend on the type of degression specified in Set_DegressionType.

No output parameters.

Get_Degression

The function returns the current degression value (number).

No input parameters.

Set_DegressionType

The method sets the type of degression.

Input parameter: Value (TNCDegressionType) - degression type.

dtNone - no degressive, cutting depth does not change;
dtValue - the cutting depth is reduced by a constant value at each iteration (a constant value is set in Set_Degression);
dtCoef - the cutting depth is multiplied by the coefficient at each iteration (the value of the coefficient is given in Set_Degression).

No output parameters.

Get_DegressionType

The function returns the current degression type (TNCDegressionType). (TNCDegressionType).

No input parameters.

Set_MinDepthOfCut

The method sets the value of the minimum cutting depth. As a rule, the value is used for cycles with degression.

Input parameter: Value (number) - the value of the minimum cutting depth.

No output parameters.

Get_MinDepthOfCut

The function returns the current value of the minimum cut depth (number).

No input parameters.

Set_Retraction

The method sets the current value of the tap. Retract - the value to which the chip breaking tool rises after reaching the current cutting depth at the iteration, if this iteration does not return to the level of accelerated movement (i.e., the return sign to Set_FullReturn is set to False).

Input parameter: Value (number) - retract value.

The calculated retraction value will depend on the retraction type specified in Set_RetractionType.

No output parameters.

Get_Retraction

The function returns the current value of the retract (number).

No input parameters.

Set_RetractionType

The method sets the value of the type of retraction.

Input parameter: Value (TNCRetractionType) - retract type value.

rtNone - retraction is not performed:
rtValue - value of retraction (set in Set_Retraction).

No output parameters.

Get_RetractionType

The function returns the current value of the retraction type. (TNCRetractionType).

No input parameters.

Set_RetractionCount

The method sets the amount of retracts for chip breaking.

Input parameter: Value (integer) - amount of retracts for chip breaking.

No output parameters.

Get_RetractionCount

The function returns the amount of retracts for chip breaking (integer).

No input parameters.

Set_ClearanceType

The method sets the type of clearance. Clearance is the value to which the tool does not reach the level of the depth of the current iteration cut after returning from the level of accelerated movement (i.e., the sign of returning to Set_FullReturn is set to True). The method sets the type of clearance. Clearance is the value to which the tool does not reach the level of the depth of the current iteration cut after returning from the level of accelerated movement (i.e., the sign of returning to Set_FullReturn is set to True).

Input parameter: Value (TNCClearanceType) - clearance type.

ctNone - without clearance;
ctValue - value (set in Set_Clearance).

No output parameters.

Get_ClearanceType

The function returns the current clearance type. (TNCClearanceType).

No input parameters.

Set_Clearance

Method sets the clearance value

Input parameter: Value (number) - clearance value.

The calculated clearance value will depend on the type of clearance specified in Set_ClearanceType.

No output parameters.

Get_Clearance

The function returns the current value of the clearance (number).

No input parameters.

Set_FullReturn

The method sets the sign of returning to the level of accelerated movement. If the feature is set, then when the cutting depth is reached at the current iteration, the accelerated movement level is returned, and then the cutting depth level is reached at the iteration without taking into account the clearance.

input parameter: Value (boolean) - return attribute.

True - returning to the level of accelerated movement;

False - without returning.

No output parameters.

Get_FullReturn

The function returns the sign of returning to the level of accelerated movement (boolean).

No input parameters.

Set_FullReturnStep

The method sets the iteration step of the cut, which returns to the level of accelerated movement.

Example. As a step of the iterations of the cut, the value is set to 3. In this case, every third iteration returns to the level of accelerated movement (iterations 3, 6, 9, etc.). At the remaining iterations, no return is made (iterations 1, 2, 4, 5, 7, 8, etc.).

Input parameter: Value (integer) - cut iteration of the step.

Only if in Set_FullReturn set True (with return).

No output parameters.

Get_FullReturnStep

The function returns the iteration step of the cut, which returns to the level of accelerated moving (number).

No input parameters.

Set_SameLastSteps

The method sets the number of last identical cutting steps. If the value is different from 0 or 1, then the number of recent iterations specified by the method will be performed with the same depth of cut.

Input parameter: Value (integer) - the number of last identical cuts.

No output parameters.

Get_SameLastSteps

The function returns the current number of last identical cut steps (integer).

No input parameters.


INCT_PeckDrillingCycleEvents - an interface implemented in the interpreter that allows you to receive and manage the calculated values within the drilling cycle with chip breaking. The interface is a set of event methods that are performed when performing the calculation of certain values inside the shaper of a loop trajectory. Using the methods of the interface, you can get and change the cut levels for iterations, the sign of returning to the level of accelerated movement at iteration, the values of the clearance and retraction during the formation of the cycle path.

If events are assigned to the loop path generator, then the corresponding method is invoked for each calculated value:

  1. INCT_PeckDrillingCycleEvents.OnCalcNextDepth method executed when adding the next calculated cut level to the internal list of the former. The number of cut levels (list size) will be the number of iterations for which the tool will move to the bottom of the hole. As a parameter, the calculated cut depth level is transferred to the method.

  2. INCT_PeckDrillingCycleEvents.OnGetNextFullReturn method performed after calculating the sign of returning to the level of accelerated movement using cycle parameters. As a parameter, the iteration number and the calculated attribute are transferred to the method.

  3. INCT_PeckDrillingCycleEvents.OnGetNextClearance method performed after calculating the gap value. As a parameter, the iteration number and the calculated clearance value are passed to the method.

  4. INCT_PeckDrillingCycleEvents.OnGetNextRetraction method performed after calculating the gap value. As a parameter, the iteration number and the calculated retract value are passed to the method.


Description of interface methods:

Method

Method Description

Description of use

OnCalcNextDepth

The method is executed each time the next calculated cut level is added to the internal list of the former.

The size of the formed list (the number of elements) will be the number of iterations for which the tool will move to the bottom of the hole.

Input and output parameter: Depth (number) - cut level value for iteration (absolute value).

  1. To obtain the total number of iterations, to recalculate the parameters of the clearance, retraction or return to the level of accelerated movement when implementing calculation algorithms that are not included in the functionality of the cycle.

  2. To change the cut depth levels when implementing calculation algorithms that are not included in the cycle functionality.

OnGetNextFullReturn

The method is executed after calculating the sign of returning to the level of accelerated movement in the loop parameters for the current iteration.

Input parameter: Iteration (integer) - iteration number.

Input and output parameter: FullReturn (boolean) - sign of returning to the level of accelerated movement at a given iteration.

To change the sign of returning to the level of accelerated movement for the current iteration when implementing the algorithms for calculating the feature not included in the loop functionality.

OnGetNextClearance

The method is executed after calculating the clearance value using the loop parameters for the current iteration. It is called only if the sign of returning to the level of accelerated movement for iteration is set (FullReturn = True).

Input parameter: Iteration (integer) - iteration number.

Input and output parameter: Clearance (number) - the clearance value at a given iteration.

To change the sign of the clearance value for the current iteration when implementing algorithms for calculating the value not included in the loop functionality.

OnGetNextRetraction

The method is executed after calculating the value of the branch by the loop parameters for the current iteration. It is called only if the sign of returning to the level of accelerated movement for iteration is not set (FullReturn = False).

Input parameter: Iteration (integer) - iteration number.

Input and output parameter: Retraction (number) - retraction value at a given iteration.

To change the attribute of the tap value for the current iteration when implementing algorithms for calculating the value not included in the loop functionality.