Programming example

Programing Example

prg_example

Predrill contour

This example describes predrilling of a contour pocket defined in the NC program.

The first cycle call activates predrilling. In addition to the feedrate for drilling, the parameters used for pocket milling must be transferred to this cycle in order to calculate the plunge points of the milling cycle.

After predrilling, a tool change takes place before the contour pocket is milled.

 

#VAR

  V.L.SurfacePosition = 0        ( Z position of workpiece surface )

  V.L.RetractionPlane = 100      ( Z position of retraction plane )

  V.L.SafetyClearance = 10       ( relative value of safety clearance )

 

  ; Parameter pre drilling cycle  (SysMillContourPreDrilling)

  V.L.DrillFeed            = 200  ( drilling feedrate in Z )

  V.L.RadiusReferenceCycle = 2.5  ( tool radius of reference cycle (D5))

  V.L.ReferenceCycle       = 1    ( reference cycle = pocket milling )

  V.L.NumberOfFeeds        = 3    ( number of feeds )

  V.L.DrillMachiningMode   = 2    ( drill machining mode )

  V.L.ReturnClearance      = .5   ( return clr. for chip breaking/evac.)

 

  ; Parameter reference cycle     (SysMillContourPocket)

  V.L.FeedRateZ       = 1000      ( plunging feedrate )

  V.L.Direction       = 0         ( up cut milling )

  V.L.DepthOfPocket   = 20        ( depth of pocket )

  V.L.MaxIncrementZ   = 10        ( maximum infeed in Z )

  V.L.MaxIncrementXY  = 2.2       ( maximum infeed in XY )

  V.L.PlungingModeZ   = 1         ( plunging mode 1 )

  V.L.ContourID       = 1         (identification number pocket contour)

#ENDVAR

 

G0 G90 ZV.L.RetractionPlane F2000

 

; contour definition:

#CONTOUR BEGIN[ID = 1]

G1 G90 X60 Y0

G1 G91 Y40

G1 G91 X-20

G1 G90 X20 Y60

G1 X0 Y40

G161 G03 X0 Y0 I0 J20

G1 X60

#CONTOUR END

 

T6 D6                             ( Tool data )

M6                                ( Tool change )

G90 G54 S1000 M03 F5000       ( Technology data )

 

G00 Z100                          ( Go to z start position )

G00 X0 Y0                         ( Go to centre of circle )

 

; pre drilling call:

L CYCLE [NAME = SysMillContourPreDrilling.ecy   \

        @P1   = V.L.SurfacePosition             \

        @P2   = V.L.RetractionPlane             \

        @P3   = V.L.SafetyClearance             \

        @P4   = V.L.DepthOfPocket               \

        @P6   = V.L.MaxIncrementXY              \

        @P11  = V.L.NumberOfFeeds               \

        @P31  = V.L.DrillMachiningMode          \

        @P35  = V.L.ReferenceCycle              \

        @P61  = V.L.ReturnClearance             \

        @P130 = V.L.RadiusReferenceCycle        \

        @P132 = V.L.DrillFeed                   \

        @P50  = V.L.ContourID                   \

        ]

 

T8 D8                             ( Tool data, radius = 2.5 )

M6                                ( Tool change )

G90 S6000 M03 F5000               ( Technology data )

 

; polynomial contouring for smooth movements

#CONTOUR MODE [DEV, PATH_DEV = V.G.WZ_AKT.R / 100]

G261

 

; reference cycle call:

L CYCLE [NAME = SysMillContourPocket.ecy        \

        @P1  = V.L.SurfacePosition              \

        @P2  = V.L.RetractionPlane              \

        @P3  = V.L.SafetyClearance              \

        @P4  = V.L.DepthOfPocket                \

        @P5  = V.L.MaxIncrementZ                \

        @P6  = V.L.MaxIncrementXY               \

        @P21 = V.L.FeedRateZ                    \

        @P31 = "Roughing"                       \

        @P32 = V.L.PlungingModeZ                \

        @P50 = V.L.ContourID                    \

        ]

 

G260

M30