Programming example

Programing Example

prg_example

Measuring a workpiece

; touch probe activation

T1 D1

 

; deactivation of the zero offset

G53

 

; positioning to the starting point

G00 X50 Y20

G00 Z10

 

#VAR

  ;input parameters

  V.L.SpigotDiameter   = 20

  V.L.ZeroOffsetNumber = 54

  V.L.SafetyDistance   = 3

  V.L.StartAngle       = 20

  V.L.IncrementalAngle = 70

  V.L.CrossOver        = 5

 

  ;output variables

  V.CYC.SysRetX

  V.CYC.SysRetY

  V.CYC.SysRetDiameter

#ENDVAR

 

;cycle call

L CYCLE[NAME="SysMeasWcs38.ecy"     \

          @P2=V.L.SpigotDiameter    \

          @P7=V.L.ZeroOffsetNumber  \

          @P13=V.L.SafetyDistance   \

          @P14=V.L.StartAngle       \

          @P15=V.L.IncrementalAngle \

          @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]

 

G00 Z0

 

M30

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