Service manual
The GBIT command verifies the logical
level
of a pin
de-
signated by
the
numeric expression Y for an input signal
designated by
the
character string C for a channel designat-
ed by
the
numeric expression
X,
and assigns
"1"
to
numeric
variable A if
the
state
is
ON
(high level) or assigns
"0"
to
numeric variable A if
the
state
is
OFF (Iow level).
If
(X, J
is
omitted, a signal on channel 0
is
verified.
Example)
10
GBIT
"IC",2.A
20
IF
A=l
THEN
"ERR"
This program checks signal
111
on channel 0, and branches
the
program
to
line iabel
"ERR"
if
the signal
is
ON
(high
level).
Forma(2)
GBIT
[X,
1
C,
Y,
Z
X Channel number (0,
11
C : Type
of
signals
OD
.......
Output
data signals
OC
.......
Output
control signals
Y
Pin
number
0
.........
01,09
1
.........
02,010
2
.........
03,
011
3
.........
04,012
4
.........
05
5
.........
06
6
.........
07
7
.........
08
Z Set of signals
0
.........
OFF (Iow
level)
1
.........
ON
(high
level)
When
the
character string C indicates
that
the
signal
is
an
output
data signal, this command sets a pin designated
by
the
numeric expression Y
to
ON
(high level)
if
the
magni-
tude
of
the
numeric expression Z
is
"1",
or sets
the
pin
to
OFF (Iow level)
if
Z
is
"0".
When
the
character string C indicates
that
the
signal
is
an
output
control signal, setup of the
DIP
switch on
the
inter-
face board functions inversely.
If
(X,)
is
omitted, a signal
on
channel 0
is
set.
Example)
10
GBIT
"OC",O,l
This program sets signal
09
on channel 0
to
ON
(high level)
if
DIP
switch 1 on
the
interface
PC
board
is
set
to
OFF.
If
the
DIP switch 1
is
set
to
ON,
the
pin
is
set
to
OFF (Iow
level).
7
MZ·lE02
6. A SIMPLE PROGRAMMING
EXAMPLE
Example
11
Sample program describing
data
transfer with automatic
handshaking mode using two sets of main unit Model
3500
series.
10
GMOOE
u,
"0",
"Pt",
"8
'
................
Sets
the
mode (Output port).
20
A$:='·
SHARP
J 30 GOUT
O,A$I
............
·······Output
character date
"SHARP".
\40
GOUT
0,
CHR$
&FF;
.
···············Output
ending code
"CHR$
&FF".
50
GMOOE
0,"
1··,
"A",
"8"·
.
······Sets
the
mode (Input port).
"'()
r,
1
NO.
B$.
CHR$ &FF
............•.•.•.
'Input
character data.
L
~g ~~6P
A$;8$
10
(i,IOOE
0,"1··,",,"","8"···
.
···Setsthe
mode
(Jnputport).
2u
GIN
U,A$,(.Hf($
8.FF····
········lnput
character data.
38
GMOOE
0,
"0",
"A··,
"8
'·················Sets
the
mode (Output
portl.
40
i3$",··tlode 1-350L)··
j50
GOUT
0,13$1
.....•...•
··············Output
character data "Modal-3500".
160
GOUT
0,
(;Hf($ &FF
1"
···················Output
ending code
"CHR$
&FF".
70
01SI-'
A$;8$
80
END
Execution results
"SHARP Model-3500"
is
displayed
onto
the both
of
CRT A side and B side.
Cable connecting table
When executing program, use
the
cable corresponded
as
follows.
Side A
Side 8
Signal
Contact
Contact
name
No.
No.
01
1
25
02
3
27
03
5
29
04
7
31
05
9
33
06
11
35
07
I
13
37
_08
J.
_~
39
09
: ..
_-'-'--
><
41
OlD
:
19
__
43
11
2~
__
1
12
?~_
3
~-----,--?9
__
--.~
5
__
14
31
---
7
15
~3
__
~--
9
_.
16
35
- -
11
17
37
13
_.~8
39
-
...
~
15
19
41
...><--.
17
110
43
19
o
All
GND (ground)
contacts
must
be
connected
with
those
of
partner.
o Unused
contacts
are
open.
,
Signal
name
11
12
13
14
15
16
17
18
19
110
01
02
03
04
05
06
07
08
09
010