DL205 Analog Manual, 7th Edition Rev. D
3-20
Chapter 3: F2-04AD-2 , F2-04AD-2L, 4-Channel Analog Voltage Input
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Using 2’s Complement for the DL230, DL240, DL250-1, and the
DL260 CPUs (Multiplexing)
The 2’s complement data format may be required to display negative values on some operator
interface devices. It could also be used to simplify data averaging on bipolar signals.
The example shows two channels, but these steps can be repeated for all four channels if
necessary.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
b
C
D
This instructionmasks thechannelidentification bits.
Without this,the values used will notbecorrect,so
do not forget to include it.
Loadsthe complete datawordintothe accumulator.
TheV-memorylocation dependsonthe I/O
configuration.See Appendix Afor thememorymap.
LD
V40401
ANDD
KFFF
X36
X36 X34 X35
StoreChannel 1
OUT
V2000
When themoduleis not busyand X34 and X35are
off, channel 1 dataisstoredinV2000. C0 is resetto
indicate that channel 1’svalue is positive.
SET
C0
X37
RST
C0
If X37is on, then the datavalue representsa
negative voltage. C0 is settoindicatethat channel
1’svalue is negative.
X36 X34 X35
StoreChannel 2
OUT
V2001
When themoduleis not busyand X34isonand X35
is off, channel2dataisstoredinV2001.C1isreset
to indicate channel2’s valueis positive.
SET
C1
X37
RST
C1
If X37ison, then the datavalue representsa
negative voltage. C1 is settoindicate that channel
2’svalue is negative.
INV
ADDD
K1
OUTD
V2040
INV
ADDD
K1
OUTD
V2042
X36 X34 X35
X36 X34 X35
Invert thebit pattern in theaccumulator.
Invert thebit pattern in theaccumulator.
BCD
Channel1dataisindoublewordstarting at V2040 .
BCD
Channel2dataisindoublewordstarting at V2042 .