Interpreters development
  • Interpreters development
v3.0.4
Search Results for

    Show / Hide Table of Contents

    Circular pocket milling cycle

    INCT_PocketCycleFormer - a CAM system interface that simplifies forming the movements of a circular pocket milling cycle. The object implementing this interface is returned by the method INCT_CLData_PocketCycleFormer.CreatePocketCycleFormer.

    123456

    Purpose:

    The movements in the various types of circular pocket milling cycles generally follow the same tool path on different controllers:

    1. Approach to the pocket center at the initial level.
    2. Approach to the safe distance.
    3. Approach to the base point.
    4. Plunging (helical or linear) to the specified depth of cut or to the full depth.
    5. Retraction to the safe distance and repetition down to the pocket depth; in finishing, the tool goes directly to the pocket depth.
    6. Return to the pocket center at the level where the machining started, here at the initial level.

    Example of such a cycle: Sinumerik: POCKET4.

    The generator forms the tool path from the specified parameters. It also allows adding to any section of the tool path the features required by a particular cycle, changing the feed type or value, or skipping a tool movement prepared by the generator.

    Using the generator:

    We recommend creating a new generator for each new cycle in a block of the NC program. Therefore, the interface of the old generator must be released when a new one is created or when the interpreter finishes its work.

    1. Get the generator interface (INCT_CLData_PocketCycleFormer.CreatePocketCycleFormer).
    2. Set the indexes of the axes along which the movements are made (Set_AxisIndexes).
    3. Set the current plane (Set_Plane).
    4. Set the pocket center (Set_HoleCenter).
    5. Set the safe distance (Set_SafeLevel).
    6. Set the pocket start (Set_BaseLevel).
    7. Set the pocket bottom level (Set_BottomLevel).
    8. Set the pocket diameter (Set_Diameter).
    9. Set the flat spiral step (Set_FlatSpiralStep).
    10. Set the flat spiral step type (Set_FlatSpiralStepType).
    11. Set the flat spiral direction (Set_FlatSpiralDirection).
    12. Set the helix direction (Set_SpiralDirection).
    13. Set the helix pitch (Set_SpiralStep).
    14. Set the machining type (Set_TypeOfHoleProcessing).
    15. Set the depth of cut per pass (Set_Degression).
    16. Set the plunge radius (Set_PlungeRadius).
    17. Set the allowance at the pocket edge (Set_EdgeStock).
    18. Set the allowance at the pocket bottom (Set_BottomStock).
    19. Assign a cycle event handler (Set_Events) if the cycle path needs to be changed.
    20. Form the tool movement commands along the cycle path (MakeWorkpath).

    Description of the interface methods:

    Method Method description
    Set_AxisIndexes The method sets the indexes of the X, Y, Z axes along which the movements are made when the cycle path is formed.
    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 indexes of the X, Y, Z axes along which the movements are made when the cycle path is formed (TNCDCAxisIndexes).
    No input parameters.
    Set_Plane The method sets the current plane.
    Input parameter: Value (TNCPlaneType) - current plane.
    ptXY - XY plane, the pocket is machined along the Z axis;
    ptYZ - YZ plane, the pocket is machined along the X axis;
    ptZX - ZX plane, the pocket is machined along the Y axis.
    No output parameters.
    Get_Plane The function returns the current plane (TNCPlaneType).
    No input parameters.
    Set_HoleCenter The method sets the pocket center point.
    Input parameter: Value (TNC3DPoint) - pocket center point.
    No output parameters.
    Get_HoleCenter The function returns the pocket center point (TNC3DPoint).
    No input parameters.
    Set_SafeLevel The method sets the safe distance.
    Input parameter: Value (real number) - safe distance.
    No output parameters.
    Get_SafeLevel The function returns the safe distance (real number).
    No input parameters.
    Set_BaseLevel The method sets the pocket start.
    Input parameter: Value (real number) - pocket start.
    No output parameters.
    Get_BaseLevel The function returns the pocket start (real number).
    No input parameters.
    Set_Diameter The method sets the pocket diameter.
    Input parameter: Value (real number) - pocket diameter.
    No output parameters.
    Get_Diameter The function returns the pocket diameter (real number).
    No input parameters.
    Set_FlatSpiralStep The method sets the flat spiral step.
    Input parameter: Value (real number) - flat spiral step.
    No output parameters.
    Get_FlatSpiralStep The function returns the flat spiral step (real number).
    No input parameters.
    Set_BottomLevel The method sets the pocket bottom level.
    Input parameter: Value (real number) - pocket bottom level.
    No output parameters.
    Get_BottomLevel The function returns the pocket bottom level (real number).
    No input parameters.
    Set_FlatSpiralStepType The method sets the flat spiral step type.
    Input parameter: Value (TNCFlatSpiralStepType) - flat spiral step type.
    fsByMillimeters - the spiral step is calculated in millimeters;
    fsByPersentOfToolDiameter - the spiral step is calculated as a percentage of the tool diameter.
    No output parameters.
    Get_FlatSpiralStepType The function returns the flat spiral step type (TNCFlatSpiralStepType).
    No input parameters.
    Set_FlatSpiralDirection The method sets the flat spiral direction.
    Input parameter: Value (TNCSpiralDirection) - flat spiral direction.
    sdCW - clockwise;
    sdCCW - counterclockwise.
    No output parameters.
    Get_FlatSpiralDirection The function returns the flat spiral direction (TNCSpiralDirection).
    No input parameters.
    Set_SpiralDirection The method sets the helix direction.
    Input parameter: Value (TNCSpiralDirection) - helix direction.
    sdCW - clockwise;
    sdCCW - counterclockwise.
    No output parameters.
    Get_SpiralDirection The function returns the helix direction (TNCSpiralDirection).
    No input parameters.
    Set_TypeOfHoleProcessing The method sets the pocket machining type.
    Input parameter: Value (TNCTypeOfProcessing) - pocket machining type.
    tpHelicalPlungeRoughing - roughing, helical plunge, machining with a flat spiral;
    tpLinearPlungeRoughing - roughing, linear plunge, machining with a flat spiral;
    tpOnlyHelicalRoughing - roughing, fully helical machining;
    tpOnlyHelicalFinishing - finishing, helical machining along the edge;
    tpOnlyCircularFinishing - finishing, machining along the edge with circles;
    tpOnlyHelicalFinishingAndBottom - finishing, helical machining along the edge, machining of the bottom with a flat spiral.
    No output parameters.
    Get_TypeOfHoleProcessing The function returns the pocket machining type (TNCTypeOfProcessing).
    No input parameters.
    Set_SpiralStep The method sets the helix pitch.
    Input parameter: Value (real number) - helix pitch.
    No output parameters.
    Get_SpiralStep The function returns the helix pitch (real number).
    No input parameters.
    Set_Degression The method sets the depth of cut per pass.
    Input parameter: Value (real number) - depth of cut per pass.
    No output parameters.
    Get_Degression The function returns the depth of cut per pass (real number).
    No input parameters.
    Set_DepthOfCut The method stores a depth of cut value. The generator does not use it when forming the tool path; the depth of cut per pass is set by Set_Degression.
    Input parameter: Value (real number) - depth of cut.
    No output parameters.
    Get_DepthOfCut The function returns the value stored by Set_DepthOfCut (real number).
    No input parameters.
    Set_PlungeRadius The method sets the plunge radius: the lateral offset from the pocket center before helical plunging (machining type tpHelicalPlungeRoughing).
    Input parameter: Value (real number) - plunge radius.
    No output parameters.
    Get_PlungeRadius The function returns the plunge radius (real number).
    No input parameters.
    Set_EdgeStock The method sets the allowance at the pocket edge for roughing.
    Input parameter: Value (real number) - allowance at the pocket edge.
    No output parameters.
    Get_EdgeStock The function returns the allowance at the pocket edge for roughing (real number).
    No input parameters.
    Set_BottomStock The method sets the allowance at the pocket bottom for roughing.
    Input parameter: Value (real number) - allowance at the pocket bottom.
    No output parameters.
    Get_BottomStock The function returns the allowance at the pocket bottom for roughing (real number).
    No input parameters.
    Set_Events The method assigns events that control the cycle behavior. Events allow adding to any section of the tool path the features required by a particular cycle, changing the feed type or value, or skipping a tool movement prepared by the generator.
    Input parameter: Value (INCT_PocketCycleEvents) - object implementing the events. See the detailed description below.
    No output parameters.
    Get_Events The function returns the object implementing the events that is linked to the generator (INCT_PocketCycleEvents).
    No input parameters.
    MakeWorkpath The method forms the cycle path from the specified parameters.

    INCT_PocketCycleEvents - an interface implemented in the interpreter that allows controlling the behavior of the circular pocket milling cycle. The interface is a set of event methods executed during the tool movements inside the generator. With these methods, the features required by a particular cycle (dwell, oriented spindle stop, etc.) can be added to any section of the tool path, the feed type can be changed, or a tool movement prepared by the generator can be skipped.

    If events are assigned to the generator, every tool movement inside the generator consists of 3 stages:

    1. The INCT_PocketCycleEvents.BeforeMove method is executed. It receives the values set by the cycle: movement type, coordinates of the movement point, feed type.
    2. The INCT_PocketCycleEvents.OnMove method is executed. It receives: movement type, coordinates of the movement point, feed type and the flag of whether the movement has been made. All parameters except the movement type can be changed in the implementation. Depending on the flag set in OnMove, the tool moves to the specified point with the specified feed, or the movement is not made.
    3. The INCT_PocketCycleEvents.AfterMove method is executed. It receives the values returned by OnMove: movement type, coordinates of the movement point, feed type.

    Description of the interface methods:

    Method Method description Description of use
    BeforeMove The method is executed before each tool movement when the cycle path is formed.
    Input parameters: MoveType (TNCPocketCycleMoveType) - movement type, see the description below; Point (TNC3DPoint) - coordinates of the movement point; Feed (TNCFeedType) - feed type.
    pcmMoveToHoleCenter - movement to the pocket center;
    pcmMoveToSafeLevel - movement to the safe distance;
    pcmMoveToCutOfDepthByLine - movement to the next cut level along a line;
    pcmMoveToCutOfDepthByHelic - movement to the next cut level along a helix;
    pcmMoveToAside - movement from the center toward the pocket edge;
    pcmMoveToHoleEdge - movement along the flat spiral to the pocket edge;
    pcmMoveOnHoleEdge - movement along the pocket edge;
    pcmMoveToTopLevel - movement to the start point;
    pcmMoveFromHoleEdgeToCenter - movement from the edge to the pocket center.
    No output parameters.
    If some commands must be added before a movement, add them to the method implementation.
    For example, to turn on the machine coolant before milling the pocket, call INCT_CLData.AddCoolant with the appropriate parameters in the BeforeMove implementation under the condition MoveType = pcmMoveToSafeLevel.
    OnMove The method is executed immediately before each tool movement when the cycle path is formed.
    Input parameters: MoveType (TNCPocketCycleMoveType) - movement type, see the description above;
    Input and output parameters: Point (TNC3DPoint) - coordinates of the movement point; Feed (TNCFeedType) - feed type; Handled (boolean) - flag of whether the movement has been made inside the implementation (True - the movement has been made, False - it has not).
    If Handled is True after the OnMove call, the movement has been made inside the OnMove implementation, and the generator does not add a movement command to the tool path.
    If Handled is False after the OnMove call, the generator considers that the movement has not been made and adds to the tool path a command to move to the point Point with the feed type Feed.
    To override the movement point or the feed, or to skip the movement.
    For example, to switch to rapid traverse when returning to the initial level after milling, in the OnMove implementation set the returned Feed parameter to ffRapid under the condition MoveType = pcmMoveToTopLevel (for the feed type, see OutStandardFeed).
    To move the tool to a point other than the one calculated by the cycle, change the Point parameter returned by OnMove.
    If the movement to the calculated point is not needed, set the Handled parameter to True inside the OnMove implementation.
    AfterMove The method is executed after each tool movement when the cycle path is formed, even if the movement has been canceled in OnMove.
    Input parameters: MoveType (TNCPocketCycleMoveType) - movement type, see the description above; Point (TNC3DPoint) - coordinates of the movement point; Feed (TNCFeedType) - feed type.
    No output parameters.
    If some commands must be added after a movement, add them to the method implementation.
    In this article