123
Program Examples with IORD Instruction
Section 10-4
10-4 Program Examples with IORD Instruction
Note
After writing programs, make sure that the programs work properly.
Example 1: Unit 0 in Linear Mode
In the following example, the data of ranges 0 and 1 is read from DM 0000.
Example 2: Unit 0 in Linear Mode
In the following example, the first word number of a block of words storing the
data transferred is read.
Example 3: Unit 0 in Linear Mode
In the following example, data changed with data transfer or the IOWR instruc-
tion is read from High-speed Counter Unit to the DM area of the PC.
The data will be read when the IORD instruction has been executed.
Bit 25506 will be turned ON when the IORD instruction is executed with no
errors and turned OFF if an error results.
xxxxx
25506
@IORD
#0000
#0010
D0000
10606
10607
Operating Unit Busy
Data of ranges
0 and 1 is read
from DM 0000.
Error
Start
xxxxx
25506
@IORD
#CC03
#0001
D0000
10606
10607
Operating Unit Busy
Error
The data of
word address
03 is read
because the
first word
number is set
to DM word
m+3.
Start
xxxxx
25506
@IORD
#CC15
#0080
D6015
10606
10607
Operating
Unit Busy
Error
The data of
ranges 0 to
15 is read
from
DM 6015 to
DM 6094.
to
to
DM 1000
DM 1015
DM 1094
DM 6000
DM 6015
DM 6094
Initial settings
Monitor area
Range 0
Range 0
Range 15
Range 15
Start
Содержание C200H-CT021
Страница 1: ...C200H CT021 High speed Counter Unit Operation Manual Revised December 2000 ...
Страница 2: ...iv ...
Страница 4: ...vi ...