F
3-
-1
6A
D
16
-C
ha
nn
el
A
na
lo
g
In
pu
t
5--24
F3--16AD 16-Channel Analog Input
The example below shows how to scale input data from an F3--04ADS Analog
module in the 20--27/120--127 address slot. This module must be placed in a 16 bit
slot in order to work.
_On
LDF
K8
X120
SHFL
K8
ORF
K8
X20
ANDD
Kfff
This loads the upper byte of the analog data from
the module.
The ORF X20 brings the lower byte of data from
the module into the accumulator. At this time there
is a full word of data from the analog module in the
accumulator.
Load the data
MUL
K2000
Rung 3 scales a 0 to 200 range of a transducer
over the 4096 counts. The raw analog value is
loaded to the accumulator from V3001
(Channel #1).
DIV
K4096
OUT
V3010
It is then multiplied by 2000. The additional zero
provides a higher degree of resolution.
It is then divided by 4096, which is the resolution of
the module.
The scaled value is stored in V3010 with an
implied decimal.
SP1
SHFL K8 shifts the data to the left eight places to
make room for the lower byte of data.
BCD
The ANDD Kfff masks off the twelve least
significant bits of data from the word. This is the
actual analog value.
The BCD command converts the data to BCD
format.
_On
SP1
LD
Channel 2
Analog Data
Register (BCD)
V3000
Scale the data
OUT
V2200
The scaled value is stored in V3010 with an
implied decimal.
This writes channel one analog data to
V3000 when bits X124, X125, X126
and X127 are as shown.
LD
V2200
Channel 1 Select Bit States
X125
X124
X126 X127
OUT
V3000
Scaling on a DL350
with a
Conventional
DL305 Base