Omron TJ2-MC64 - PROGRAMMING Programming Manual page 176

Hide thumbs Also See for TJ2-MC64 - PROGRAMMING:
Table of Contents

Advertisement

BASIC commands
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.
PROGRAMMING MANUAL
3.2.240 REG_POSB
/i
Type
Axis parameter (read-only)
Syntax
REG_POSB
Description
The REG_POSB parameter stores the position in user units at which the sec-
ondary registration event occurred.
Arguments
N/A
Example
No example.
See also
AXIS, MARKB, REGIST.
170

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-prtTj1-drtTj1-cortTj1-mlGrt1-ml2Tj1-fl02

Table of Contents