Omron SYSMAC CJ Operation Manual page 237

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

Advertisement

All BASIC commands
4-2-195 REG_POS
4-2-196 REG_POSB
/i
Type
Axis parameter (read-only)
Syntax
REG_POS
Description
The REG_POS parameter stores the position in user units at which the
primary registration event occurred.
Arguments
N/A
Example
A paper cutting machine uses a CAM profile shape to quickly draw
paper through servo driven rollers, and stop the paper so it can be cut.
The paper is printed with a registration mark. This mark is detected and
the length of the next sheet is adjusted by scaling the CAM profile with
the third parameter of the CAM command:
' Example Registration Program using CAM stretching:
' Set window open and close:
length=200
OPEN_WIN=10
CLOSE_WIN=length-10
GOSUB Initial
Loop:
TICKS=0' Set millisecond counter to 0
IF MARK THEN
offset=REG_POS
' This next line makes offset -ve if at end of sheet:
IF ABS(offset-length)<offset THEN offset=offset-length
PRINT "Mark seen at:"offset[5.1]
ELSE
offset=0
PRINT "Mark not seen"
ENDIF
' Reset registration prior to each move:
DEFPOS(0)
REGIST(3+768)' Allow mark at first 10mm/last 10mm of sheet
CAM(0,50,(length+offset*0.5)*cf,1000)
WAIT UNTIL TICKS<-500
GOTO Loop
Note: variable cf is a constant that is calculated depending on the draw
length of the machine per encoder edge.
See also
AXIS, MARK, REGIST.
/i
Type
Axis parameter (read-only)
Syntax
REG_POSB
Description
The REG_POSB parameter stores the position in user units at which
the secondary registration event occurred.
Arguments
N/A
Example
No example.
See also
AXIS, MARKB, REGIST.
Section 4-2
225

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cj1w-mch72

Table of Contents