Calculation Of Average Value: S.ave - Mitsubishi Electric MELSEC Q Series Programming Manual

Motion controller
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 SEQUENCE INSTRUCTIONS FOR MOTION CPU

5.4.35 Calculation of average value: S.AVE

Setting
data
X
Y
M
(S)
(D)
[Setting data]
[Function]
[Error]
Bit device
SM
F
T
C
D
[Instruction]
Command
S.AVE
Setting data
(S)
(D)
Number of data or number of the devices where the number of data are
n
(1) This instruction calculates the mean of 16-bit BIN data stored in n-point devices
starting from the device specified by (S), and then stores the result into the device
specified by (D).
(S)
(S)+1
(S)+2
(S)+(n-3)
(S)+(n-2)
(S)+(n-1)
(2) If the value calculated is not integer, this instruction will drop the number of
decimal places.
(3) If the value specified by n is 0, the instruction will be not processed.
(Setting range: 1 to 32767)
(4) Corresponds to the "MEAN" instruction of the PLC CPU.
The value specified in n is other than 0 to 32767 or the points specified in n exceed
those of the corresponding device specified in (S), sequence program error occurs.
Safety observation warnings (SM24) are turned ON and error code (SD32): 10, detail
code (SD33): 8016H are stored.
Usable device
Word device
W
T
C
SD
Z
S.AVE
(S)
Head number of the devices where the data to be averaged are stored
Head number of the devices where the average will be stored
Average value
n
5 - 77
Constant
Pointer
Level
K
H
P
N
(D)
n
Description
(BIN16 bits)
(BIN 16 bits)
stored (BIN 16 bits)
(D)
0
Digit
desig-
Index
nation
: Usable

Advertisement

Table of Contents
loading

Table of Contents