EasyManua.ls Logo

Omron trajexia CJ1W-MCH72 - Page 104

Omron trajexia CJ1W-MCH72
374 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
All BASIC commands Section 4-2
93
/i
Example Pieces are placed randomly onto a belt that moves continuously. Fur-
ther along the line they are transferred to a second flighted belt. A
detection system indicates if a piece is in front of or behind its nominal
position, and how far.
expected=2000 ' sets expected position
BASE(0)
ADDAX(1)
CONNECT(1,2) ' continuous geared connection to flighted belt
REPEAT
GOSUB getoffset ' get offset to apply
MOVE(offset) AXIS(1) ' make correcting move on virtual axis
UNTIL IN(2)=OFF ' repeat until stop signal on input 2
RAPIDSTOP
ADDAX(-1) ' clear ADDAX connection
STOP
getoffset: ' sub routine to register the position of the
' piece and calculate the offset
BASE(0)
REGIST(3)
WAIT UNTIL MARK
seenat=REG_POS
offset=expected-seenat
RETURN
Axis 0 in this example is connected to the encoder of the second con-
veyor. A superimposed MOVE on axis 1 is used to apply offsets.
R AXIS 0
AXIS 0
AXIS 1
ENCODER
AXIS 2

Related product manuals