2-5
Section
Using the Functions
22
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
2-7-4 Restarting Special I/O
Units
.
2-5-2 Reading Conversion Values
Analog input conversion values are stored for each input number, in IR words
n+1 through n+8.
Word
Function
Stored value
n+1
Input 1 conversion value
16-bit binary data
n+2
Input 2 conversion value
y
n+3
Input 3 conversion value
n+4
Input 4 conversion value
n+5
Input 5 conversion value
n+6
Input 6 conversion value
n+7
Input 7 conversion value
n+8
Input 8 conversion value
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)
101
DM0001
Input condition
Conversion data in IR word
101 (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)
#0004
101
DM0001
Input condition
Conversion data in IR words
101 to 104 (input numbers 1
to 4) is read to DM 0001
through DM 0004.
For details regarding conversion value scaling, refer to page 118,
Sample Pro-
gram 5: Scaling Function
.
Example 1
Example 2