# Programmierbeispiel

Berechnungszyklus

; creation of return variables

#VAR

V.CYC.SysRetCenterX

V.CYC.SysRetCenterY

V.CYC.SysRetCenterZ

V.CYC.SysRetNormalX

V.CYC.SysRetNormalY

V.CYC.SysRetNormalZ

V.CYC.SysRetRadius

V.CYC.SysRetRadVariance

#ENDVAR

; calculation of unit circle in the XY-plane with Z=1

L CYCLE [NAME=SysCalcPlaneCircle.ecy \

@P50 = 1 @P60 = 0 @P70 = 1 \

@P51 = 0 @P61 = 1 @P71 = 1 \

@P52 = -1 @P62 = 0 @P72 = 1 \

@P53 = 0 @P63 = -1 @P73 = 1 ]

; print result

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

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

#MSG SAVE ["Center X = %f", V.CYC.SysRetCenterX ]

#MSG SAVE ["Center Y = %f", V.CYC.SysRetCenterY ]

#MSG SAVE ["Center Z = %f", V.CYC.SysRetCenterZ ]

#MSG SAVE ["Normal X = %f", V.CYC.SysRetNormalX ]

#MSG SAVE ["Normal Y = %f", V.CYC.SysRetNormalY ]

#MSG SAVE ["Normal Z = %f", V.CYC.SysRetNormalZ ]

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

M30