5-16
Chapter
5
SPECIFICA
TIONS
[Robot program]
1st unit’s RCX40
‘INIT ROUTINE
RESET
SO2()
RESET
SO4()
RESET
DO4()
A=101
‘MAIN ROUTINE
MOVE
P,P100,Z=0
GOSUB
*PICK
*ST1:
MOVE
P,P[A],Z=0
GOSUB
*PLACE
MOVE
P,P100,Z=0
SO(41)=1
WAIT
SI(41)=1
SO(41)=0
WAIT
SI(41)=0
SO(23,22,21,20)=A-100
SO(40)=1
WAIT
SI(40)=1
SO(40)=0
WAIT
SI(40)=0
SO(23,22,21,20)=0
GOSUB
*PICK
WAIT
SI(42)=1
SO(42)=1
WAIT
SI(42)=0
SO(42)=0
A=A+1
IF A>108 THEN
A=101
DO(47)=1
WAIT
DI(47)=1
DO(47)=0
ENDIF
GOTO
*ST1
HALT
‘SUB ROUTINE FOR PICK
*PICK:
DO(40)=1
DRIVE(3,P121),S=20
WAIT
ARM(3)
DO(40)=0
DELAY
500
RETURN
‘‘SUB ROUTINE FOR PLACE
*PLACE:
DRIVE(3,P122),S=20
WAIT
ARM(3)
DO(40)=1
DELAY
500
RETURN
2nd unit’s RCX142
‘INIT ROUTINE
RESET
SO2()
RESET
SO4()
RESET
DO4()
B=201
‘MAIN ROUTINE
MOVE
P,P200,Z=0
GOSUB
*PICK
*ST2:
WAIT
SI(41)=1
SO(41)=1
WAIT
SI(41)=0
SO(41)=0
WAIT
SI(40)=1
B=SI(23,22,21,20)
SO(40)=1
WAIT
SI(40)=0
SO(40)=0
B=B+200
MOVE
P,P[B],Z=0
GOSUB
*PLACE
MOVE
P,P200,Z=0
SO(42)=1
WAIT
SI(42)=1
SO(42)=0
WAIT
SI(42)=0
GOSUB
*PICK
GOTO
*ST2
HALT
‘SUB ROUTINE FOR PICK
*PICK:
DO(40)=1
DRIVE(3,P221),S=20
WAIT
ARM(3)
DO(40)=0
DELAY
500
RETURN
‘SUB ROUTINE FOR PLACE
*PLACE:
DRIVE(3,P222),S=20
WAIT
ARM(3)
DO(40)=1
DELAY
500
RETURN
4. Sample program
Summary of Contents for RCX series
Page 1: ...User s Manual ENGLISH E E78 Ver 1 08 CC Link YAMAHA NETWORK BOARD RCX series ...
Page 2: ......
Page 12: ......
Page 22: ......
Page 34: ...2 12 MEMO ...
Page 36: ......
Page 50: ......
Page 60: ......
Page 81: ...Chapter 6 APPENDIX Contents 1 Term definition 6 1 ...
Page 82: ......