![background image](http://html1.mh-extra.com/html/omron/sysmac-cj-series/sysmac-cj-series_operation-manual_743585320.webp)
How-to’s
Section 5-1
308
5-1-6-7 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-197.
•
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-149
and 4-2-150.
•
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-195 and 4-2-196.
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
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...