Skip to main content

4.8. Other Work Programs

4.8. Other Work Programs

 

The various work programs used in the CALL command in the example program are about the setting of the defaults of the parameters and the creation of the circle trajectory for measurement.

 

Program to set the defaults of the parameters:

 

'-- tool number to be corrected

giToolNrCorr=1

giToolNrOrig=25

'-- moving pattern parameter

giStPoseDir=0 '0:Y+, 1:X+, 2:Y-, 3:X-

gdRadius=20

gdMaxTrMov=20 'Max trnaslational moving distance

gdOscDist=30 'center - up,down distance

gdOrientLen=30 'Orientation Length

gdMoveSpeed=100 'Moving speed

END

 

Program to create a circle trajectory:

 

'-- copy current pose to the start pose --

gpStartP=P*

'-- calculate poses for circle

gpStartP.Z=gpStartP.Z - gdMaxTrMov

gpCirPose1=gpStartP

gpCirPose2=gpStartP

gpCirPose3=gpStartP

gpCirPose4=gpStartP

IF giStPoseDir=0 THEN

gpCirPose2.X=gpCirPose2.X - gdRadius

gpCirPose2.Y=gpCirPose2.Y - gdRadius

gpCirPose3.X=gpCirPose3.X - 0

gpCirPose3.Y=gpCirPose3.Y - gdRadius*2

gpCirPose4.X=gpCirPose4.X + gdRadius

gpCirPose4.Y=gpCirPose4.Y - gdRadius

ELSEIF giStPoseDir=1 THEN

gpCirPose2.X=gpCirPose2.X - gdRadius

gpCirPose2.Y=gpCirPose2.Y + gdRadius

gpCirPose3.X=gpCirPose3.X - gdRadius*2

gpCirPose3.Y=gpCirPose3.Y + 0

gpCirPose4.X=gpCirPose4.X - gdRadius

gpCirPose4.Y=gpCirPose4.Y - gdRadius

ELSEIF giStPoseDir=2 THEN

gpCirPose2.X=gpCirPose2.X + gdRadius

gpCirPose2.Y=gpCirPose2.Y + gdRadius

gpCirPose3.X=gpCirPose3.X + 0

gpCirPose3.Y=gpCirPose3.Y + gdRadius*2

gpCirPose4.X=gpCirPose4.X - gdRadius

gpCirPose4.Y=gpCirPose4.Y + gdRadius

ELSEIF giStPoseDir=3 THEN

gpCirPose2.X=gpCirPose2.X + gdRadius

gpCirPose2.Y=gpCirPose2.Y - gdRadius

gpCirPose3.X=gpCirPose3.X + gdRadius*2

gpCirPose3.Y=gpCirPose3.Y - 0

gpCirPose4.X=gpCirPose4.X + gdRadius

gpCirPose4.Y=gpCirPose4.Y + gdRadius

ENDIF

END