DL205 Analog Manual, 7th Edition Rev. D
3-19
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
Single Channel Selected
The single channel program makes it easy to determine which channel has been selected.
Using Bipolar Ranges (Multiplexing)
Some additional logic is needed with bipolar ranges to determine whether the value being
returned represents a positive voltage or a negative voltage. For example, the direction of a
motor may be needed to be known. Since the DL230 only reads one channel per scan, the last
input can be used to show the sign (X37 in the examples).
The following program shows how to accomplish this. Since a negative value is always needed
to be known, these rungs should be placed before any other operations that use the data, such
as math instructions, scaling operations, and so forth. Also, if stage programming instructions
are being used, place these rungs in a stage that is always active. Please note, this logic is only
needed for each channel that is using bipolar input signals. The following example only shows
two channels but the rungs can be repeated for all four channels if needed.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
b
C
D
It is usually easier to perform math operations in BCD,
so it is best to convert the data to BCD immediately.
You can leave out this instruction if your application
does not require it.
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.
Store channel 1 when module is not busy.
LD
V40401
ANDD
KFFF
BCD
OUT
V2000
When the module is not busy and X34 and X35 are off,
channel 1 data is stored in V2000.
X36
X34
X35
It is usually easier to perform math operations in
BCD, so it is best to convert the data to BCD
immediately. You can leave out this instruction if
your application does not require it.
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
BCD
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 channel one’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 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 that 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.
Summary of Contents for DL205
Page 1: ...DL205 Analog I O Manual Manual Number D2 ANLG M ...
Page 2: ...Notes ...
Page 6: ...Notes ...