![Mitsubishi Electric melsec q00ucpu User Manual Download Page 583](http://html.mh-extra.com/html/mitsubishi-electric/melsec-q00ucpu/melsec-q00ucpu_user-manual_239147583.webp)
App
-
39
2) Subroutine program
• In the subroutine program, ASCII codes specified by an argument are added to the input data area and
the completion status is checked.
•
Specify the following arguments for the subroutine program
.
First argument
ASCII code input from the input module (K2Xn)
(Input)
Second argument
Number of digits to be input
(Input)
Third argument
Indirect address of the input data area
(Input)
Fourth argument
Bit device to be turned on when input is completed
(Output)
Figure App.18 Sample program
N
umer
i
c
entry
i
s
ended
w
hen
the
at
-
comp
l
et
i
on
on
s
i
gna
l i
s
on
or
0D
H i
s
i
nput
.
Addresses
of
the
i
nput
data
area
are
saved
i
n
the
w
ork
dev
i
ces
.
T
he
1st
to
4
th
d
i
g
i
t
numera
l
s
i
n
(
i
nput
data
area
+
2)
are
sh
i
fted
for
one
d
i
g
i
t
to
the
l
eft
.
N
umera
l
entered
i
n
ASC
II
code
i
s
converted
i
nto
one
numera
l
i
n
B
IN
data
us
i
ng
the
H
AB
IN
i
nstruct
i
on
.
T
he
5th
to
8th
d
i
g
i
t
numera
l
s
i
n
(
i
nput
data
area
+
1)
are
sh
i
fted
for
one
d
i
g
i
t
to
the
l
eft
and
the
converted
numera
l i
s
set
to
the
8th
d
i
g
i
t
.
T
he
number
of
d
i
g
i
ts
to
be
i
nput
i
n
(
i
nput
data
area
+
0)
i
s
i
ncremented
by
one
.
T
he
at
-
comp
l
et
i
on
on
s
i
gna
l
i
s
turned
on
w
hen
the
i
nput
process
i
ng
for
spec
i
f
i
ed
d
i
g
i
ts
i
s
comp
l
eted
.