Programming example

Programing Example

prg_example

Measuring a sphere

; touch probe activation

T1 D1

M6

; deactivation of the zero offset

G53

 

; positioning to the starting point

G00 X100 Y300 Z200

G00 Z10

 

#VAR

  ;input parameters

  V.L.MeasDistZ        = 100

  V.L.ZeroOffsetNumber = 56

  V.L.SafetyDistance   = 100

  V.L.StartAngle       = 90

  V.L.IncrementalAngle = 45

  V.L.CrossOver        = 100

  V.L.PathDefinition   = 1

  V.L.SphereDiameter   = 400

 

  ;output variables

  V.CYC.SysRetX

  V.CYC.SysRetY

  V.CYC.SysRetZ

  V.CYC.SysRetDiameter

#ENDVAR

 

;cycle call

L CYCLE [NAME="SysMeasWcs40.ecy"  @P6  = V.L.MeasDistZ         \

                                  @P7  = V.L.ZeroOffsetNumber  \

                                  @P13 = V.L.SafetyDistance    \

                                  @P14 = V.L.StartAngle        \

                                  @P15 = V.L.IncrementalAngle  \

                                  @P33 = V.L.CrossOver         \

                                  @P64 = V.L.PathDefinition    \

                                  @P87 = V.L.SphereDiameter    ]

 

; 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.SysRetZ        =%f", V.CYC.SysRetZ       ]

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

 

M30

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