
807
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
R
Offset
Contents of R (2011, signed binary)
∆
Y (0FA0 Hex)
Contents of S (D00000, signed BCD)
Max. conversion
Min. conversion
P1:
P1+1:
P1+2:
P1+3:
P1+4:
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
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...