BASIC commands
PROGRAMMING MANUAL
157
R
e
vi
si
o
n
1
.0
fig. 52
/i
3.2.215 ON
/i
3.2.216 ON.. GOSUB
/i
Example
A conveyor transports boxes. Labels must be applied onto these boxes. The
REGIST
function can capture the position at which the leading edge of the
box is seen. Then, the
OFFPOS
command can adjust the measured position
of the axis to make it 0 at that point. Thus, after the registration event has
occurred, the measured position (seen in
MPOS
) reflects the absolute dis-
tance from the start of the box. The mechanism that applies the label can take
advantage of the absolute position start mode of the
MOVELINK
or
CAMBOX
commands to apply the label.
BASE(conv)
REGIST(3)
WAIT UNTIL MARK
OFFPOS = -REG_POS ' Leading edge of box is now zero
See also
AXIS
,
DEFPOS
,
DPOS
,
MPOS
,
UNITS
.
Type
Constant (read-only)
Syntax
ON
Description
The
ON
constant returns the numerical value 1.
Arguments
N/A
Example
OP (lever,ON)
The above line sets the output named lever to
ON
.
See also
N/A
Type
Program control command
Syntax
ON expression GOSUB label [,label[,...]]