F
3--
16
A
D
16
-C
ha
nn
el
A
na
lo
g
In
pu
t
5--25
F3--16AD 16-Channel Analog Input
If you use 4--20mA signals you can easily check for broken transmitter conditions.
Since you have to use the 0--20mA range and the lowest signal for the 4--20mA
transmitter is 4mA, the lowest digital value for the signal is not 0, but instead is 819.
If the transmitter is working properly the smallest value you should ever see is 819. If
you see a value of less than about 750 (allowing for tolerance), then you know the
transmitter is broken.
374
DSTR3
R011
F53
Read the data
This rung loads the four most significant data bits into
the accumulator from Register 011 on every scan.
DOUT1
R501
F61
DOUT
R400
F60
Store channel 1
Temporarily store the bits to Register 501.
DSTR1
R001
F51
This rung loads the eight least significant data bits
into the accumulator from Register 001.
DOUT1
R500
F61
Temporarily store the bits to Register 500. Since
the most significant bits were loaded into 501, now
R500 and R501 contain all twelve bits in order.
DSTR
R500
F50
BCD
F86
Now that all the bits are stored, load all twelve bits
into the accumulator.
Math operations are performed in BCD. This
instruction converts the binary data to BCD. (You
can omit this step if your application does not
require the conversion.)
DSTR2
R011
F52
This rung loads the channel ID bits into the
accumulator from Register 011 on every scan.
BCD
F86
Convert the channel ID status to BCD. We’ll use
relational contacts later to make the chanel
selection much easier.)
DOUT
R600
F60
Store the channel ID in R600.
Read the channel ID
The DOUT instruction copies the accumulator data
to R400 and R401. Since the data is still in the
accumulator, we can compare it against a
constant. Since the minimum value for a 4mA
signal is 819 (minus the module tolerance), we can
choose a value for the compare. We picked 100,
but you could choose something else from 0 to
about 750.
Flags 773 and 774 are used with the Compare
instruction. In this example if the analog value is
less than or equal to 100, then output 040 is turned
on.
You may want to latch 040 to catch intermittent
broken transmitters.
CMP
K0100
F70
773
OUT
040
Broken transmitter indicator on channel 1
774
114 115
117
116
114 115
117
116
374
Broken Transmitter
Detection