117
IORD and IOWR Instructions
Section 10-1
D: Destination Address
Set a data area of the PC that stores the data read from the High-speed
Counter Unit.
Example:
Set C to 0005, S to F005, and D to D0100 to read range 5 of Unit F from DM
0100 in linear or circular mode.
10-1-2 IOWR Instruction
C: Control Code
Examples:
Set C to 0005 to write range 5 in linear or circular mode.
Set C to 0019 to write counter preset value 19 in preset mode.
Set C to CC07 to write the maximum count value of counter 1 in circular mode
to words m+7 and m+8.
Destination Unit Number
and Number of Words
Set a destination unit number (0 to F) in bits 15 to 12.
Set in bits 11 to 00 the number of words to which data is written.
Control Code 00XX
A set of upper and lower limits in circular or linear mode uses five words.
Therefore a block of five words must be set.
A counter preset value in preset mode uses two words. Therefore a block of
two words must be set.
(@)IOWR
C
S
D
C: Control code
S: Source address
D: Destination unit number and number of words
Bits 15
to 08
Bits 07
to 00
Description
00
00 to 15
Ranges 0 to 15 are written in linear and circular modes.
00 to 19
Counter preset values 0 to 19 are written in preset mode.
CC
00 to 99
By specifying the word number of the DM area, data can be
written in a word range m to m+99 of the High-speed
Counter Unit.
F1
00
The present counter value of counter 1 is written. Set 00 in
bits 07 to 00.
F2
The present counter value of counter 2 is written. Set 00 in
bits 07 to 00.
F3
The present counter values of counters 1 and 2 are written.
Set 00 in bits 07 to 00.
EC
00
An error is cleared.
Control
Code
Destination unit number
and number of words
Number of words
Unit number (0 to F)
Содержание C200H-CT021
Страница 1: ...C200H CT021 High speed Counter Unit Operation Manual Revised December 2000 ...
Страница 2: ...iv ...
Страница 4: ...vi ...