Turning cycle grooving

INCT_LatheGroovingCycleFormer - SprutCAM X interface that implements the functionality to simplify the formation of the movements of the turning cycle of turning grooves. An object that implements this interface is returned by the INCT_CLData.CreateLatheCycleFormer, INCT_GeomCLData.CreateLatheCycleFormer function when it is executed with the lctGrooving parameter.

images/download/attachments/84218643/Groove.png

Purpose:

Making movements in different types of turning cycles for turning grooves, for different racks generally repeat the same path:

  1. Tool approach to the starting or next piercing point at rapid feed.

  2. The plunging to the depth of the groove in a single pass or in several iterations by the size of the cutting step at the working feed, with a rebound for chip breaking.

  3. Return to the starting position with or without retraction with the transition feed.

  4. If the groove width is not reached, return to step 1.

An examples of such cycles, Sinumerik: CYCLE93.

Using the former allows you to to form the tool path according to the specified parameters: the starting and ending points of the groove, the step in the width of the groove, the cutting step, the distance of the outlet, etc.. And also add the features necessary for a particular cycle to the path on any formed section, change the type or value of feed, or skip the tool movement prepared by the former.

images/download/attachments/84218643/GrooveCycleTraj.png

images/download/attachments/84218643/GrooveCyclePlungeStep.png

Former use:

We recommend creating a new turning cycle generator for each new cycle in the NC-code frame, except for cases of repeating the cycle operation in a new frame. Thus, the interface of the old former must be freed when creating a new one or when the interpreter shutting down.

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

  1. Get former interface ( INCT_CLData.CreateLatheCycleFormer, INCT_GeomCLData.CreateLatheCycleFormer ).

  2. Set the indexes of the longitudinal and transverse axes along which the movements will be made (Set_AxisIndexes).

  3. Set the start point (Set_StartPoint).

  4. Set the end point (Set_EndPoint).

  5. Set the groove direction (Set_GrooveDirection).

  6. Set the step of the groove(Set_Step).

  7. Set the safe distance for the return (Set_SafeDist).

  8. Set the plunge step on axis direction (Set_PlungeStep).

  9. Set the return distance for chip breaking (Set_ReturnDistance).

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

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


Description of interface methods:

Method

Method description

Set_AxisIndexes

The method establishes the indices of the longitudinal and transverse axes along which the movements will be made during the formation of the cycle path.

Input parameters: Value (TNCLCAxisIndexes) - Transverse (integer) - transverse axis index, Longitudinal (integer) - longitudinal axis index.

No output parameters.

Get_AxisIndexes

The function returns the indices of the longitudinal and transverse axes in which the movements will be made during the formation of the cycle path (TNCLCAxisIndexes).

No input parameters.

Set_StartPoint

The method sets the coordinates of the initial point of the groove.

Input parameter: Value (TNC2DPoint) - the coordinates of the initial point of the groove ( Transverse - transverse, Longitudinal - longitudinal) .

No output parameters.

Get_StartPoint

The function returns the coordinates of the initial point of the groove (TNC2DPoint).

No input parameters.

Set_EndPoint

The method sets the end point coordinate of the groove.

Input parameter: Value (TNC2DPoint) - The value of the coordinates is of course the point of the groove.

No output parameters.

Get_EndPoint

The function returns the coordinates of the point of the groove. (TNC2DPoint).

No input parameters.

Set_GrooveDirection

The method sets the value of the direction of the groove.

Input parameter: Value (TNCGrooveDirection) - groove direction value.

gdLongitudinal - longitudinal;
gdFace - face.

No output parameters.

Get_GrooveDirection

The function returns the direction of the groove (TNCGrooveDirection).

No input parameters.

Set_Step

The method sets the step size in the groove width in the radial direction.

Input parameter: Value (number) - step value.

No output parameters.

Get_Step

The function returns the step size in the groove width in the radial direction (number).

Set_SafeDist

The method sets the value of the rebound to the side before outputting the tool.

Input parameter: Value (number) - rebound value in the side..

No output parameters.

Get_SafeDist

The function returns the value of the rebound to the side before the output of the tool (number).

No input parameters.

Set_PlungeStep

The method sets the step value when plunging into the groove depth.

Input parameter: Value (number) - step value.

No output parameters.

Get_PlungeStep

The function returns the step value when plunging into the depth of the groove (number).

No input parameters.

Set_ReturnDistance

The method sets the value of the rebound up for chip breaking .

Input parameter: Value (number) - bounce up value.

No output parameters.

Get_ReturnDistance

The function returns the value of the bounce up for chip breaking (number).

No input parameters.

Set_ReturnDistanceInsidePlungeStep

The method sets the attribute value 'Return distance inside the plunge step'. True - the return distance is included in the plunge step, False - the return distance is added with the plunge step.

Input parameter: Value (boolean) - attribute value.

No output parameters.

images/download/attachments/84218643/GrooveCycleReturnDistanceInsidePlungeStep.png

Get_ReturnDistanceInsidePlungeStep

The function returns the attribute value 'Return distance inside the plunge step'.

No input parameters.

Set_RapidLevel

The method sets the value of the rapid level.

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

No output parameters.

Get_RapidLevel

The function returns the value of the rapid level.

No input parameters.

Set_FullReturnDist

The method sets the return distance to the rapid level.

Input parameter: Value (number) - return distance to the rapid level.

No output parameters.

Get_FullReturnDist

The function returns the return distance to the rapid level .

No input parameters.

Set_Feedrate

The method sets the value of the work feed.

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

No output parameters.

Get_Feedrate

The function returns the value of the work feed.

No input parameters.

Set_MPM

The method sets the type of working feed.

Input parameter: Value (logical) - type of working feed. True - mm/min, False - rev/min.

No output parameters.

Get_MPM

The function returns the type of working feed.

No input 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 any movement path in any formed section, change the type or value of feed, or skip tool movement prepared by the former.

Input parameter: Value (INCT_LatheCycleEvents) - 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_LatheCycleEvents).

No output parameters.

MakeWorkpath

The method forms a cycle path according to specified parameters.


INCT_LatheCycleEvents - an interface implemented in the interpreter that allows you to control the behavior of the turning 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 to the path of the movement on any formed section the features necessary for a specific cycle: stop, oriented stop, etc., change the type 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_LatheCycleEvents . BeforeMove method is executed. The parameters specified by the cycle are transferred to the method: type of movement, coordinates of the movement point, type of feed.

  2. INCT_LatheCycleEvents . 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_LatheCycleEvents . AfterMove method is executed. The following parameters are passed as parameters to the method: type of movement, movement point coordinates, feed type returned by OnMove method


Interface methods description:

Method

Method description

Description of use

BeforeMove

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

Inter parameters: MoveType (TNCLatheCycleMoveType) - move type, see the description below; Point (TNC2DPoint) - movement point coordinates (Transverse - transverse, Longitudinal - longitudinal); Feed (TNCFeedType) - feedrate type.

lmMoveToStartPoint - move to the start point;
lmMoveToNextGroove - move to the next groove ;
lmMoveToNextLevel - move to the next level;
lmMoveToBottomLevel - move to the bottom level of the groove;
lmChipBreaking - chop breaking;
lmRetractSideways - rebound to the side, before tool retraction;
lmReturnToTopLevel - return to the top level;
lmReturnToStartPoint - return to the start point;
lmCutTheThread - cut the thread (for the T hreading turning cycle); lmMoveToRapidLevel - Returns to the rapid level (tool withdrawal).

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 turn on the cooling system of the machine before turning the groove, this can be done by adding the INCT_CLData.AddCoolant call to the implementation of the BeforeMove method with the appropriate parameters for the condition MoveType = lmMoveToStartPoint.

OnMove

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

Inter parameters: MoveType (TNCLatheCycleMoveType) - move type, see the description above;

Input and output parameters: Point (TNC2DPoint) - coordinate movement point; Feed (TNCFeedType) - feedrate type; Handled (boolean) - sign of moving inside the OnMove implementation (True - move completed, False - move not completed).

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 Feed type.

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 to accelerated, when you return to the initial level, after turning the groove, then in the implementation of the OnMove method you need to change the value of the Feed parameter returned by the method to ffRapid on the condition MoveType = lmReturnToTopLevel (the feed type is described in the article 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 movement of the tool when forming the cycle path, even if the movement was canceled in OnMove.

Inter parameters: MoveType (TNCLatheCycleMoveType) - movement type, see the description above; Point (TNC2DPoint) - feed point coordinate ; Feed (TNCFeedType) - feed type.

Inter parameters: MoveType (TNCLatheCycleMoveType) - type of movement, description see above; Point (TNC2DPoint) - coordinates of the point of movement; Feed (TNCFeedType) - feed type.

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 corresponding parameters by the condition MoveType = lmMoveToBottomLevel.