6.2. 자동 교정 JOB 파일
6.2. 자동 교정 JOB 파일
4장에서 설명한 자동 교정 JOB 파일 예제의 전체 파일입니다. 동작 설명은 4장을 참조하시기 바랍니다.
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 '반응대기시간 10초 설정
V1%=1 '포즈 지정 변수
'_
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