Programming example

Programing Example

prg_example

Inner diameter with 3 points

; touch probe activation

T1 D1

 

; deactivation of the zero offset

G53

 

; positioning to the starting point

G0 X0 Y0

G0 Z-10

 

#VAR

  ;input parameters

  V.L.HoleDiameter     = 40

  V.L.ZeroOffsetNumber = 54

  V.L.SafetyDistance   = 5

  V.L.FirstAngle       = 30

  V.L.SecondAngle      = 150

  V.L.ThirdAngle       = 270

  V.L.CrossOver        = 10

 

  ;output variables

  V.CYC.SysRetX

  V.CYC.SysRetY

  V.CYC.SysRetDiameter

#ENDVAR

 

;cycle call

L CYCLE [NAME="SysMeasWcs9.ecy"\

        @P2=V.L.HoleDiameter\

        @P7=V.L.ZeroOffsetNumber\

        @P13=V.L.SafetyDistance\

        @P14=V.L.FirstAngle\

        @P15=V.L.SecondAngle\

        @P16=V.L.ThirdAngle\

        @P33=V.L.CrossOver]

 

; print result

#FILE NAME [MSG="SysMeasWcsResult.txt"]

#MSG SAVE ["V.CYC.SysRetX        =%f", V.CYC.SysRetX       ]

#MSG SAVE ["V.CYC.SysRetY        =%f", V.CYC.SysRetY       ]

#MSG SAVE ["V.CYC.SysRetDiameter =%f", V.CYC.SysRetDiameter]

 

G0 Z10

M30

Another example for handling SysMeasWcs cycles is contained in the Overview section in the subsection Programming.