![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268847.webp)
808
Data Control Instructions
Section 3-18
binary value of 0000 to 0FA0 for an Analog Output Unit. When CIO 000000
turns ON in the following example, the contents of D00000 is scaled using the
linear function defined by
∆
X (0200),
∆
Y (0FA0), and the offset (0). These val-
ues are contained in D00100 to D00102. The sign of the BCD value in
D00000 is indicated by the Carry Flag. The result is output to CIO 2011.
3-18-10 AVERAGE: AVG(195)
Purpose
Calculates the average value of an input word for the specified number of
cycles.
Ladder Symbol
Variations
Applicable Program Areas
Operands
N
:
Number of Cycles
The number of cycles must be between 0001 and 0040 hexadecimal (0 to 64
cycles).
R: Result Word and R+1: First Work Area Word
R will contain the average value after the specified number of cycles. R+1 pro-
vides information on the averaging process and R+2 to R+N+1 contain the
previous values of S as shown in the following diagram.
∆
X (0200)
∆
Y
∆
X
P1:
P1+1:
P1+2:
P1+3:
P1+4:
P1
R
Offset
Contents of R (2011, signed binary)
∆
Y (0FA0 Hex)
Contents of S (D00000, signed BCD)
Max. conversion
Min. conversion
S
N
R
AVG(195)
S
: Source word
N
: Number of cycles
R
: Result word
R+1
: First work area word
Variations
Executed Each Cycle for ON Condition
AVG(195)
Executed Once for Upward Differentiation
Not supported.
Executed Once for Downward Differentiation
Not supported.
Immediate Refreshing Specification
Not supported.
Block program
areas
Step program
areas
Subroutines
Interrupt tasks
Not allowed
OK
OK
OK
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...