Programming example

Programing Example

prg_example

Measure angle between drilled hole and spigot (C axis)

; touch probe activation

T1 D1

 

; deactivation of the zero offset

G53

 

; positioning to the starting point

G0 X0 Y0 Z5

 

#VAR

  ;input parameters

  V.L.HoleDiameter     = 20

  V.L.ZeroOffsetNumber = 54

  V.L.SafetyDistance   = 2

  V.L.PositioningX     = 50

  V.L.PositioningY     = 20

  V.L.PositioningZ     = 10

  V.L.MeasDepth        = -15

  V.L.SpigotDiameter   = 30

  V.L.CrossOver        = 10

 

  ;output variables

  V.CYC.SysRetC

#ENDVAR

 

;cycle call

L CYCLE [NAME="SysMeasWcs23.ecy"  \

        @P2=V.L.HoleDiameter    \

        @P7=V.L.ZeroOffsetNumber\

        @P13=V.L.SafetyDistance \

        @P17=V.L.PositioningX   \

        @P18=V.L.PositioningY   \

        @P19=V.L.PositioningZ   \

        @P22=V.L.MeasDepth      \

        @P29=V.L.SpigotDiameter \

        @P33=V.L.CrossOver      ]

 

; print result

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

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

 

M30

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