Delta AS Series Programming Manual page 682

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

API
Instruction code
1224
FMEAN
Device
X
Y
M
S
n
D
Data
type
S
n
D
Symbol
Explanation
1.
This instruction adds up the single precision floating points in the n devices starting from the device specified by S,
divides the sum by the value in n, then stores the mean of the sum in D.
2.
For 16-bit instructions, the value in n must be between 1–256,
3.
Instruction flags: SM600 (zero flag), SM601 (borrow flag), SM602 (carry flag):
When the operation result is zero, SM600 is ON. Otherwise, it is OFF.
If the value while adding or the absolute result of the operation is less than the floating point number that can
be shown, the D=16#FF800000 and the borrow flag SM601 is ON.
If the value while adding or the absolute result of the operation is larger than the floating point number that can
be shown, the D=16#7F800000 and the carry flag SM602 is ON.
Example
When X0.0 is ON, the instruction adds the values of the 3 single precision floating points in (D1, D0), (D3, D2), (D5, D4)
and then divides the addition result by 3, then stores the result in (D11, D10).
Operand
P
S, D, n
S
T
C
HC
Pulse instruction
AS
S : First device
D : Device where the mean is stored
n : Number of devices
Ch ap te r 6 Ap pl ie d Instruc ti ons
Finding the mean of floating point numbers
D
FR
SM
SR
E
16-bit instruction
-
Function
K
16#
"$"
F
32-bit instruction
AS
6 - 4 0 3
6_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents