How-to’s
Section 5-1
308
5-1-6-6 Using registration in application programs
There is one axis command (
REGIST
), and two axis parameters (
MARK
and
REG_POS
). With these commands and parameter, you can control and use
the registration functionality in BASIC programs.
•
REGIST
captures the axis position when a registration signal is detected.
The available settings depend on the axis type. Refer to section 4-2-200.
•
MARK
is a flag that signals whether the position has been captured or not.
For the second registration input of the
Encoder Interface
, the parameter
MARKB
is also available. For more information, refer to sections 4-2-152
and 4-2-153.
•
REG_POS
holds the captured axis position. Only if the
MARK
flag signals
that the position was captured successfully, you can regard the
REG_POS
value as valid. For the second registration input of the
Encoder Interface
, the
parameter
REG_POSB
is also available. For more information, refer to
sections 4-2-198 and 4-2-199.
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
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
Summary of Contents for trajexia CJ1W-MCH72
Page 69: ...Specifications Section 2 4 58...
Page 83: ...FINS commands Section 3 4 72...
Page 147: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Page 277: ...All BASIC commands Section 4 2 266...
Page 371: ...360 Index...
Page 373: ...362...