![background image](http://html1.mh-extra.com/html/omron/sysmac-cj-series/sysmac-cj-series_operation-manual_743585105.webp)
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
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...