Specifications

BASIC commands
PROGRAMMING MANUAL 154
Revision 5.0
fig. 50/i
ENCODER
SENSOR
GLUE APPLICATOR
Example A machine adds glue to the top of a box. To do this, it must switch output 8. It
must detect the rising edge (appearance) and the falling edge (end) of a box.
Also, the MPOS must be set to zero when the Z position is detected.
reg=6 'select registration mode 6 (rising edge R, rising edge Z)
REGIST(reg)
FORWARD
WHILE IN(2)=OFF
IF MARKB THEN 'on a Z mark mpos is reset to zero
OFFPOS=-REG_POSB
REGIST(reg)
ELSEIF MARK THEN 'on R input output 8 is toggled
IF reg=6 THEN
'select registration mode 8 (falling edge R, rising edge Z)
reg=8
OP(8,ON)
ELSE
reg=6
OP(8,OFF)
ENDIF
REGIST(reg)
ENDIF
WEND
CANCEL
See also AXIS, MARK, MARKB, REG_POS, REG_POSB, OPEN_WIN, CLOSE_WIN.