
Examples and tips
PROGRAMMING MANUAL
283
R
e
vi
si
o
n
1
.0
measurement units used in programming. Those parameters have influence
to the origin search, especially if an absolute encoder is used. For more
information on setting these parameters, see section 5.1.2.
Absolute switch origin search plus limit switches
fig. 26
The origin search function is performed by searching for an external limit
switch that is positioned absolutely and the position of which defines the
origin position. The example for this homing procedure is shown in the
figure.
fig. 27
The figure shows the possible scenarios for absolute origin search plus limit
switches. These scenarios depend on the position of the moving part when
the power comes on.
The program example that does this origin search sequence is given below.
'Absolute origin switch: IN0
'Left limit switch: IN1
'Right limit switch: IN2
BASE(0)
DATUM_IN=0
FWD_IN=2
REV_IN=1
SERVO=ON
WDOG=ON
DATUM(4)
WA(1)
WAIT UNTIL MTYPE=0 OR IN(1)=OFF
IF IN(1)=ON
FORWARD
ON OFF
OFF
min. limit switch
origin limit switch
moving part
max. limit switch
ON
OFF
ON
OFF
FORWARD
REVERSE
min limit switch
origin limit switch
max limit switch