Examples and tips
PROGRAMMING MANUAL
293
R
e
vi
si
o
n
1
.0
fig. 34
The picture gives the sequence of executing the commands and the
registrations of the sample program below.
BASE(N)
REGIST(0)
WAIT UNTIL MARK=0
loop:
WAIT UNTIL MARK=-1
PRINT "Position captured in: "; REG_POS
REGIST(0)
WAIT UNTIL MARK=0
GOTO loop
Registration and windowing function
The windowing function enables for registration to occur only within a
specified range of axis positions. This function is selected by giving the right
value as an argument for the
REGIST
command. The windowing function is
controlled by two axis parameters,
OPEN_WIN
and
CLOSE_WIN
. For more
information on
REGIST
,
OPEN_WIN
and
CLOSE_WIN
, refer to sections
3.2.241, 3.2.219 and 3.2.56.
There are two types of windowing:
fig. 35
•
Inclusive windowing allows the registration to occur only within the
specified window of axis positions. With this windowing function,
registration events are ignored if the axis measured position is less than
the
OPEN_WIN
axis parameter or greater than the
CLOSE_WIN
parameter.
•
Exclusive windowing allows the registration to occur only outside the
specified window of axis positions. With this windowing function, the
registration events are ignored if the axis measured position is greater
than the
OPEN_WIN
axis parameter or less than the
CLOSE_WIN
parameter.
When the windowing function is used, the internal process is as follows:
1.
REGIST
+ window is executed in the program.
2.
MARK
= 0 and the latch is triggered.
Position
t
Registration Input
REG_POS=xxx
The trigger is active
MARK=0
REGIST(0)
REGIST(0)
MARK=-1
MARK=-1
MARK=0
MARK=-1
REG_POS=Pos1
REG_POS=Pos1
The trigger is active
If the trigger is
not active,
the registration is
ignored
The position
information is
available
0
10
20
30
40
OUTSIDE THE WINDOW
INSIDE THE WINDOW
OPEN WIN=20
CLOSE WIN=40
OUTSIDE
MARK=TRUE
REG_POS=27