Omron SYSMAC CJ Operation Manual page 242

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

Advertisement

All BASIC commands
230
/i
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.
Section 4-2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cj1w-mch72

Table of Contents