Programmierbeispiel
Programmierbeispiel
Winkelmessung in X-Achse (C-Achse)
; touchprobe activtion
T1 D1
; deactivation of the zero offset
G53
; positioning to the starting point
G0 X0 Y0
G0 Z5
#VAR
;input parameters
V.L.MeasDistX = 10
V.L.ZeroOffsetNumber = 54
V.L.TargetAngle = 15
V.L.PositioningY = 10
V.L.PrePosZ = 5
V.L.StartPrePosZ = -15
;output variables
V.CYC.SysRetC
#ENDVAR
; Using zero offset
;cycle call
L CYCLE [NAME="SysMeasWcs19.ecy" \
@P4 = V.L.MeasDistX \
@P7 = V.L.ZeroOffsetNumber\
@P12 = V.L.TargetAngle \
@P18 = V.L.PositioningY \
@P19 = V.L.PrePosZ \
@P20 = V.L.StartPrePosZ ]
;print result
#FILE NAME [MSG="SysMeasWcsResult.txt"]
#MSG SAVE ["V.CYC.SysRetC =%f", V.CYC.SysRetC]
;GV.L.ZeroOffsetNumber
;G00 C0
;:
M30
;set #CS rotation around the Z-axis
;cycle call
L CYCLE [NAME="SysMeasWcs19.ecy" \
@P4 = V.L.MeasDistX \
@P18 = V.L.PositioningY \
@P19 = V.L.PrePosZ \
@P20 = V.L.StartPrePosZ ]
;print result
#FILE NAME [MSG="SysMeasWcsResult.txt"]
#MSG SAVE ["V.CYC.SysRetC =%f", V.CYC.SysRetC]
#CS ON [0,0,0,0,0,V.CYC.SysRetC]
;:
#CS Off
M30
Ein weiteres Beispiel zur Handhabung der SysMeasWcs-Zyklen ist im Übersichtskapitel im Unterpunkt Programmierung zu finden.