F
3--
16
A
D
16
-C
ha
nn
el
A
na
lo
g
In
pu
t
5--17
F3--16AD 16-Channel Analog Input
The example below shows how to read multiple channels on an F3--16AD Analog
module in the X0 address of the D3--XX--1 base.
_On
LD
VX0
This rung loads the upper byte of analog data from
the module.
SP1
SHFR
K12
SHFL K12 shifts the word to the right twelve
places.
OUT
V1400
Puts the four channel select bits in the lower nibble
(four bits) of word V1400. This will increment once
with each scan from 0 to F.
_On
LDF
X0
This rung loads the twelve bits of analog data to
the module and converts it to BCD. It is the OUT to
V1401.
SP1
BCD
OUT
V1401
The analog data (in BCD format) is then stored in
the Holding Register, V1401.
Channel Selection Data
LD
V1401
Rungs 3--18 compare the count of the chennel select bits. When the corresponding bits are true, the
channel data for that channel is stored in the proper V-memory location. For sixteen channels of
analog data, the module will require sixteen scans in order to update all channels.
V1400
OUT
V2000
=
K0
K12
This convertsthe data to BCD.
Channel #1 Data
Channel Selection Data
LD
V1401
V1400
OUT
V2001
=
K1
Channel #2 Data
Channel Selection Data
LD
V1401
V1400
OUT
V2002
=
K2
Channel #3 Data
DL350 with a
D3--XX--1 Base