0110
00
(191)
WRIT 0001 D00010 0004
0000
01
A500
06
0110
00
Equals
Flag
CNT 0010 #0100
(090)
jINC D00000
(030)
jMOV 0002 *D00000
(191)
WRIT #0100 d00001 0003
0200
0200
0001
(041)
BSET #0000 D00000 D00100
0001
0200
0000
0000
0200
A500
A500
00
C0010
00
C0010
00
01
06
03
00
01
00
01
Error
Flag
Equals
Flag
D00001
to
D00100
CIO 0003
CIO 0002
Sensor: 000000
Sensor
PC
ASCII Unit
Printer or
other external
device
410
The following program section uses a self-holding bit to ensure that the write op-
eration is executed even if the Special I/O Unit (or Slave Rack) is busy when
WRIT(191) is executed. The type of programming is also effective when the read
operation requires more than one cycle. The Equals Flag, which turns ON when
the reading operation is completed, is used to end execution.
Address Instruction Operands
00000 LD 000000
00001 OR 011000
00002 WRIT(191)
0001
D00010
0004
00003 AND NOT A50006
00004 OUT 011000
Example 2 The following program section shows one way to pass data from a weighing sta-
tion on a conveyor line through an ASCII Unit to a printer or other external de-
vice. Data is input via CIO 0002, stored in D00001 through D00100, and output
via CIO 0003.
Address Instruction Operands
00000 LD 000000
00001 LD C0010
00002 CNT 0010
#0100
00003 LD 000000
00004
jINC(090)
D00000
00005
jMOV(030)
0002
*D00000
00006 LD C0010
00007 OR 020000
00008 AND NOT 020001
00009 OUT 020000
00010 WRIT(191)
#0100
D00001
0003
00011 AND A50006
00012 OUT 020001
00013 OUT 000100
00014 BSET(041)
#0000
D00000
D0010
00015 AND A50003
00016 OUT 000101
Special I/O Instructions Section 5-35