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 instruction masks the channel identification bits.
Without this, the values used will not be correct, so
do not forget to include it.
Loads the complete data word into the accumulator.
The V-memory location depends on the I/O
configuration. See Appendix A for the memory map.
Load data when module is not busy.
LD
V40401
ANDD
KFFF
X36
X36
X34
X35
Store Channel 1
OUT
V2000
When the module is not busy and X34 and X35 are
off, channel 1 data is stored in V2000. C0 is reset to
indicate that channel 1’s value is positive.
SET
C0
X37
RST
C0
If X37 is on, then the data value represents a
negative voltage. C0 is set to indicate that channel
1’s value is negative.
X36
X34
X35
Store Channel 2
OUT
V2001
When the module is not busy and X34 is on and X35
is off, channel 2 data is stored in V2001. C1 is reset
to indicate channel 2’s value is positive.
SET
C1
X37
RST
C1
If X37 is on, then the data value represents a
negative voltage. C1 is set to indicate that channel
2’s value is negative.
INV
ADDD
K1
OUTD
V2040
INV
ADDD
K1
OUTD
V2042
X36
X34
X35
X36
X34
X35
Invert the bit pattern in the accumulator.
Invert the bit pattern in the accumulator.
BCD
Channel 1 data is in double word starting at V2040.
BCD
Channel 2 data is in double word starting at V2042.
Содержание DL205
Страница 1: ...DL205 Analog I O Manual Manual Number D2 ANLG M ...
Страница 2: ...Notes ...
Страница 6: ...Notes ...