4-5
Section
Analog Input Functions
83
When mean value processing is used together with the peak value function, the
mean value will be held.
To specify whether or not mean value processing is to be used, and to specify the
number of history buffers for mean data processing, use a Peripheral Device to
make the settings in DM m+6 and DM m+7 as shown in the following table.
DM word
Function
Set value
DM (m+6)
Input 1 mean value processing
0000:
No mean value processing
0001:
Mean value processing with 2 buffers
0002:
Mean value processing with 4 buffers
DM (m+7)
Input 2 mean value processing
0002:
Mean value processing with 4 buffers
0003:
Mean value processing with 8 buffers
0004:
Mean value processing with 16 buffers
For the DM word addresses, m = 1000 + 100 x unit number (Units #A to #F = Unit
numbers 10 to 15).
Note
After making the DM settings from a Peripheral Device, it will be necessary to
either power up the PC again or turn ON the Special I/O Unit Restart Bit in order
to transfer the contents of the DM settings to the Special I/O Unit. For details re-
garding the Special I/O Unit Restart Bit, refer to
4-9-4 Restarting Special I/O
Units
.
The history buffer operational means are calculated as shown below. (In this ex-
ample there are four buffers.)
1, 2, 3...
1. With the first cycle, the data is stored with Data 1 being in all the history buff-
ers.
(Mean value
processing)
Conversion value
Data 1
Data 1
Data 1
Data 1
Mean value = (Data 1 + Data 1 + Data 1 + Data 1)
B
4
2. With the second cycle, the data is stored with Data 2 being in the first history
buffer.
(Mean value
processing)
Conversion value
Data 2
Data 1
Data 1
Data 1
Mean value = (Data 2 + Data 1 + Data 1 + Data 1)
B
4
3. With the third cycle, the data is stored with Data 3 being in the first history
buffer.
(Mean value
processing)
Conversion value
Data 3
Data 2
Data 1
Data 1
Mean value = (Data 3 + Data 2 + Data 1 + Data 1)
B
4