8.22 RBUFW (Write to Ring Buffer, Calculation of Total Value and Moving
Example 3) When data is written six times by the RBUFW instruction with the buffer
size of 5
[S]...DT20
[D]
DT0
DT1
[D+1]
[D+2]
DT2
[D+3]
DT3
[D+4]
DT4
SF 5.22E+01
[D+5]
DT5
[D+6]
DT6
[D+7]
DT7
[D+8]
DT8
[D+9]
DT9
[D+10]
DT10
[D+11]
DT11
[S]
DT20
■
Flag operations
Name
SR7
SR8
(ER)
WUME-FP7CPUPGR-12
[D]...DT0
U 5
U 5
K 261
U 0
K 33
K 67
K 54
K 52
K 55
K 70
Description
To be set in the case of out-of-range in indirect access (index modification).
To be set when [D] (buffer size) is larger than 30000, or [D] (buffer size) is 0.
To be set when [D+1] (stored data amount) is larger than [D] (buffer size).
To be set when [D+6] (write pointer) is greater than or equal to [D] (buffer size).
To be set when the buffer area exceeds the upper limit of a specified device.
[D]
DT0
U 5
[D+1]
DT1
U 5
[D+2]
DT2
K 298
[D+3]
DT3
[D+4]
DT4
SF 5.96E+01
[D+5]
DT5
[D+6]
DT6
U 1
[D+7]
DT7
K 70
K 67
[D+8]
DT8
K 54
[D+9]
DT9
[D+10]
DT10
K 52
K 55
[D+11]
DT11
Average Value)
Buffer size
Amount of stored data
Total value
Moving average value
Write pointer
0th
First
Second
Third
Fourth
8-49