4-5
Section
Analog Input Functions
82
4-5-2 Reading Conversion Values
Analog input conversion values are stored for each input number, in IR words
n+5 and n+6.
Word
Function
Stored value
n+5
Input 1 conversion value
16-bit binary data
n+6
Input 2 conversion value
y
For the IR word addresses, n = 100 + 10 x unit number.
For Units #A to #F (10 to 15), n = 400 + 10 x (unit number – 10).
Use MOV(21) or XFER(70) to read conversion values in the user program.
In this example, the conversion data from only one input is read. (The unit num-
ber is #0.)
MOV(21)
105
DM0001
Input condition
Conversion data in IR word
105 (input number 1) is read
to DM 0001.
In this example, the conversion data from multiple inputs is read. (The unit num-
ber is #0.)
XFER(70)
#0002
105
DM0001
Input condition
Conversion data in IR words
105 and 106 (input numbers 1
and 2) is read to DM 0001
and DM 0002.
For details regarding conversion value scaling, refer to page 116,
Sample Pro-
gram 5: Scaling Function
.
4-5-3 Mean Value Processing
The Analog I/O Unit can compute the mean value of the conversion values of
analog inputs that have been previously sampled. Mean value processing in-
volves an operational mean value in the history buffers, so it has no affect on the
data refresh cycle. (The number of history buffers that can be set to use mean
value processing is 2, 4, 8, or 16.)
Conversion data
Buffer 1
Buffer 2
Buffer 3
Buffer 4
Buffer n
(Mean value
processing)
Conversion value
(Values stored in IR
words n+5 and n+6)
(Discarded)
When “n” number of history buffers are being used, the first conversion data will
be stored for all “n” number of history buffers immediately data conversion has
begun or after a disconnection is restored.
Example 1
Example 2