182
Improved Instructions
Section 7-14
7-14-3 AVG Instruction
Signed Average Value
Operation
Overview
All -V1 units, as well as CS1-H CPU units, can use "signed data" with AVG
instruction.
Explanation of Operations
Content of No. of Cycles for Calculating Average Value/Signed or
Unsigned Selection (N)
Content of storage words for average value/work data(D)
• Once the execution of AVG instruction starts, present values of word S
are stored at each cycle as previous values until the specified number of
cycles is reached. During this period, present values of word S are stored
in word D. When the execution of AVG reaches the number of times of
cycles specified in N, the average value (4-digit hexadecimal) is calcu-
lated and stored in word D. (Specifying 65 or larger values in N is invalid.
The unit will process it as the value 64.) After that, average values are cal-
Operand
Value
T
#0002
S
0000 0000 to 0FFF FFFF (Hex)
D
0000 to 3FFF (Hex)
S+1 CH
S CH
D CH
AVG
S
S: Average value-calculating word
N
N: No. of cycles for calculating average value/
signed or unsigned selection
D
D: First word address of storage location of
average value, work data
Bit
0: Unsigned average value operation
1: Signed average value operation
No. of times of calculating average value
(BCD 2 digits 01 to 64)
15
14
13
08
08
07
00
00
Value
0
0
Bit
0: Unsigned average value operation
1: Signed average value operation
15
14
13
08
08
07
00
00
Value
0
0
Average value
Work data
Previous value 1
Previous value 2
Previous value N
D
D+1
D+2
D+3
D+N+1
Content of work data
No. of times of calculating
average value (BCD 2 digits
01 to 64)
Содержание CS1W-HCA12-V1
Страница 2: ......
Страница 6: ...vi...
Страница 20: ...xx Conformance to EC Directives 7...
Страница 38: ...18 Models and System Configurations Section 1 2...
Страница 78: ...58 Fail safe Circuits Section 3 5...
Страница 138: ...118 AR Area Section 6 4...
Страница 204: ...184 Improved Instructions Section 7 14...
Страница 222: ...202 Cycle Time Section 8 3...
Страница 240: ...220 Troubleshooting Flowcharts Section 9 5...
Страница 244: ...224 Precautions when Using the CX Programmer Appendix A...
Страница 252: ......
Страница 253: ......