Service manual

3. GIN
This command enters data.
The syntax differs
in
the
automatic handshaking mode and
manual mode.
Format
1 applies
to
the
automatic hand-
shaking mode input command, and
Format
2 applies
to
the
manual mode
input
command.
Format1)GIN
X,
N,
CC,
DJ
X Channel number
(0,
1)
N Variable
for
inputting
data
C
End
code
1
D End code 2
This command
(Format
1)
is
used
in
the automatic hand-
shaking
mode.
The
GIN
command inputs data
to
variable N
unitl
end codes
are read
(will
be described shortly)
as
designated
by
the
character strings C and D for a channel as designated
by
the
numeric expression
X.
The end codes are
not
input
to
the
variable
N.
If
the
area
for
variable N overflows, ERR 0 R 205 occurs.
The NULL code has no effect and
is
not
input
to
the
variable. For character strings C and
D,
only the first
character
is
valid as an end code.
o End code
When one end code
is
specified
(,D
is
omitted), data
is
input until
the
end code as designated
by
the
charac-
ter
string C
is
met.
Whe
two
end codes are specified, data
is
input until
one of
the
end codes as designated by character strings
Cor
D
is
met.
In
this case,
if
the
end code as designated
by character string C
is
met,
the
succeeding
statement
will
be executed next.
If
the
end code as designated by
character string D
is
met,
the
statement
in
the
subsequent program step will be executed next.
Example)
10
GIN
O,A$,CHR$
&7F ,CHR$ 8.00:GO
TO
10
20
DISP
"A$=";A$
This program inputs data
to
the character variable
A$
until
the
DEL
(delete) code
(Le.
CHR$ & 7F)
or
CR
(carriage
return) code
(Le.
CHR$ &
OD)
is
met.
Upon input of
the
DEL code
the
statement 'GO TO 10' will
be executed next,
or
upon input of
the
CR
code,
the
state-
ment 'DISP
"A$="
;A$'
in
the subseqQent program step
will be executed next.
Note 1
J Null code
is
invalid
to
input even
in
@-type
character variables.
Note 2) For input data
in
negative logic as specified by
the
GSET command, complementary
data
(having
an inverted polarity)
will be input.
Note 3) The data
of
253
bytes
or
less
is
available
to
input
at
a tirm, more bytes
of
data
input invite error
(ERROR 125).
Note 4)
If
CHR$ &01 through
&1F
and CHR$ &81
through &9F
is
specified as
the
end code
in
the
7-bit code system,
the
end code
is
detected using
7·bit
data
irrespective
of
the
SI/SO state. If
CHR$
&20
through
&7F
and
CHR$ &AO through
&F F
is
specified as
the
end code,
the
end code
is
detected using
the
SI/SO
state
and 7-bit data.
5
MZ-lE02
Format
2)
GIN
X,
E,
A
X Channel number (0,
11
E : Type
of
signals
D
........
Data signals
C
........
Control signals
A:
Numeric variable for inputting
data
(SYNTAX)
- - . -
-,
I
GIN-.-~ch".r.c'.r
f,\
~
I
l...cD-J-=-~~
I
I _ 1 _ _ _
.~
Format2
of
the
GIN command
is
used
in
manual mode.
The GIN command inputs the logical level (ON
or
high,
and OFF
or
low)
of
a signal as designated by
the
character
string E
to
the
numeric variable A as binary
data
for
the
channel as designated by
the
numeric expression
X.
Binary data produced by this
command
will have
the
magni-
tude
of
1,2,4,8,
16, 32,
64
or
128,
or
any sum
of
these
values depending on
the
bit position
in
the
ON state (high
level), irrespective
of
the
logical polarity specified by
the
GSET command. Bit positions
in
the
OFF
state
(Iow level)
give a value
of
O.
o Magnitude
of
bit positions
in
the
ON
state
(high level):
11,19..................
1
12,110
.................
2
13,111
.................
4
14,112
..................
8
15
......................
16
16
'"
...................
32
17
......................
64
18
......................
128
The
range
of
magnitude
of
data signals
is
0
to
255, and
that
of control signals
is
0
to
15.
4. GOUT
This command
output
data.
Syntax
1 and 2 apply"to operation
in
automatic
handshak-
ing mode, and
Format
3 applies
to
operation
in manual
mode.
Format
1)
GOUT
X,
(y
C > C; )
X
Channel number (0, 1)
Y Numeric data
to
be
output
C Character data
to
be
output
1 (SYNTAX)
,
GOUT
,-dD-.,c,-~
'-.1
___
_
Format
1
of
the
GOUT
command
is
used
in
automatic
handshaking mode.
The
GOUT command
outputs
numeric data designated by
the
numeric expression,
or
literal data designated by
the
character string C
to
a channel designated by
the
numeric
expression
X.
With a semicolon attached
at
the
end
of
the
last numeric expression
or
literal string, no
CR
code
(CHR$
&OD)
nor
LF
code (CHR$
&OA)
is
output
following
the
output
of
data. Conversely, if a semicolon
is
omitted
at
the
end
of
the
last numeric expression
or
literal string, a
CR
code
and an
LF
code are
output
automatically follow·
ing
the
output
of
data.