Supported IOWR/IORD-Instructions
Section 4-5
86
4-5-3
Special data
4-5-3-1
Captured Counter Value
The Counter Value can be captured into the Capture Register by using the “Cap-
ture Counter Value bit” in CIO (refer to section 3-4
for more
information). For this purpose every Counter is equipped with a Capture Register
inside the Counter Unit. If you want to use the captured Counter Value in the PLC
ladder program you have to use the IORD-instruction that reads the value from the
Capture Register of the specific Counter.
c = Counter Number (1, 2, 3 or 4)
Example:
The Counter Unit is assigned Machine Number 8. You want to read the Captured
Counter Value of Counter 1 and write it to D0300 in the PLC memory.
4-5-3-2
Counter Value
The Counter Value of every Counter can be overwritten and read by using the
IOWR- and IORD-instructions, during actual operation of the Unit.
c = Counter Number (1, 2, 3 or 4)
Example:
The Counter Unit is assigned Machine Number 5. You want to overwrite the Coun-
ter Value of Counter 2 with 500 (= 01F4 (hex)).
Item
IOWR
IORD
Control Code
No. of
Words
CC1
CC2
Captured Counter
Value
N
Y
cC
02
2
IORD(222)
#1C02
CC1= 1C (= Counter 1), CC2= 02
#00020008
S= #0008 (Machine Number) and S+1= #0002 (# words)
D0300
D= D0300 (write Captured Counter Value to D0300 and
D0301)
Item
IOWR
IORD
Control Code
No. of
Words
CC1
CC2
Counter Value
Y
Y
cC
01
2
IOWR(223)
#2C01
CC1= 2C (= Counter 2), CC2= 01
D0100
S= D0100 (= new Counter Value = #000001F4)
#00020005
D= #0005 (Machine Number) and D+1 = #0002 (# words)