Programmierbeispiel
Programmierbeispiel
Automatisches Teach-In
; touchprobe activtion
T1 D1
; deactivation of the zero offset
G53
; positioning to the starting point
G0 G90 X1400 Y-65 Z735
#VAR
; input parameters:
V.L.MeasDistX = 30
V.L.MeasDistY = 30
V.L.MeasDistZ = 40
V.L.NumberCS = 2
V.L.PrePosX1 = 30
V.L.PrePosY1 = 30
V.L.PrePosZ1 = -25
V.L.PrePosX2 = 40
V.L.PrePosY2 = 40
V.L.PrePosX3 = 60
V.L.PrePosY3 = 50
; output variables:
V.CYC.SysRetX
V.CYC.SysRetY
V.CYC.SysRetZ
V.CYC.SysRetA
V.CYC.SysRetB
V.CYC.SysRetC
#ENDVAR
L CYCLE [NAME=SysMeasCs3.ecy @P4=V.L.MeasDistX @P5=V.L.MeasDistX \
@P6=V.L.MeasDistZ @P17=V.L.PrePosX1 \
@P18=V.L.PrePosY1 @P19=V.L.PrePosZ1 \
@P39=V.L.NumberCS @P41=V.L.PrePosX2 \
@P42=V.L.PrePosX3 @P43=V.L.PrePosY2 \
@P44=V.L.PrePosY3]
; print result
#FILE NAME [MSG="SysMeaCsResult.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.SysRetA =%f", V.CYC.SysRetA]
#MSG SAVE ["V.CYC.SysRetB =%f", V.CYC.SysRetB]
#MSG SAVE ["V.CYC.SysRetC =%f", V.CYC.SysRetC]
; calling the #CS by the soubroutine written in the cycle
L CS_BASE_2.bcs
; ... machining workpiece with measured coordinate system ....
#CS OFF
M30