Omron SYSMAC CJ Operation Manual page 105

Sysmac cj-series programmable controller motion control unit
Hide thumbs Also See for SYSMAC CJ:
Table of Contents

Advertisement

All BASIC commands
/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.
AXIS 0
ENCODER
AXIS 2
AXIS 1
R AXIS 0
Section 4-2
93

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cj1w-mch72

Table of Contents