Skip to main content

6.2. Automatic Calibration JOB file

6.2. Automatic Calibration JOB file

 

The following shows the entire example of the automatic calibration JOB file described in Chapter 4. Refer to Chapter 4 for the detailed description.

 

Program File Format Version: 1.6 MechType: 127(HA020-03) TotalAxis: 6 AuxAxis: 0

     '_Pick-it Auto Calibration

     '_Pick-it Mode

     DIM liStatusErr AS Integer

     DIM liRunMode AS Integer

     DIM liIdleMode AS Integer

     DIM liCalibMode AS Integer

     '_Pick-it Status

     DIM liFCPOK AS Integer

     DIM liFCPFail AS Integer

     DIM liObjFound AS Integer

     DIM liNoObj AS Integer

     DIM liNoImgCap AS Integer

     DIM liCFGOK AS Integer

     DIM liCFGFail AS Integer

     DIM liSVSOK AS Integer

     DIM liSVSFail AS Integer

     '_Pick-it Type

     DIM liSquare AS Integer

     DIM liRectangle AS Integer

     DIM liCircle AS Integer

     DIM liEllipse AS Integer

     DIM liCylinder AS Integer

     DIM liSphere AS Integer

     DIM liPointCloud AS Integer

     DIM liBlob AS Integer

     '_

     liStatusErr=-1

     liRunMode=0

     liIdleMode=1

     liCalibMode=2

     '_

     liFCPOK=10

     liFCPFail=11

     liObjFound=20

     liNoObj=21

     liNoImgCap=21

     liCFGOK=40

     liCFGFail=41

     liSVSOK=50

     liSVSFail=51

     '_

     liSquare=21

     liRectangle=22

     liCircle=23

     liEllipse=24

     liCylinder=32

     liSphere=33

     liPointCloud=35

     liBlob=50

     '_

     ENET1.IP="192.168.1.11"

     ENET1.RPORT=5001

     ENET1.LPORT=5001

     ENET1.OPEN 1

     CLR_RBUF ENET1

     DELAY 1

     '_

     '_

     PICKIT.ITF ENET1,CNX=0,WAIT=10 'Response wait time set to 10 seconds

     V1%=1 'Pose designation variable

     '_

   1 PICKIT.CHK

     IF PICKIT.STATUS=liCalibMode THEN 3 ELSE 99

   3 DELAY 0.5

S1   MOVE P,P[V1%],S=60%,A=3,T=0

     PICKIT.FCP

     IF PICKIT.STATUS=liStatusErr THEN 99 ELSE 7

   7 IF PICKIT.STATUS=liFCPOK THEN

     V1%=V1%+1

     ELSEIF PICKIT.STATUS=liFCPFail THEN

     V1%=V1%

     ENDIF

     IF V1%>5 THEN 99 ELSE 3

  99 END