Programming example

Programming Example

Measure in X and Y axes

; touch probe activation
T1 D1
M6
; deactivation of the zero offset
G53
 
; positioning to the starting point
G0 X-50 Y-50
Z-10
 
#VAR
  ; input parameters:
  V.L.MeasDistX        = 10
  V.L.MeasDistY        = 10
  V.L.ZeroOffsetNumber = 54
  V.L.PositioningX     = 15
  V.L.PositioningY     = 20
 
  ; output variables:
  V.CYC.SysRetX
  V.CYC.SysRetY
#ENDVAR
 
;cycle call
L CYCLE [NAME="SysMeasWcs4.ecy"     \
        @P4  = V.L.MeasDistX        \
        @P5  = V.L.MeasDistY        \
        @P7  = V.L.ZeroOffsetNumber \
        @P17 = V.L.PositioningX     \
        @P18 = V.L.PositioningY     \
        ]
 
; 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]
 
G0 Z10
M30

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