DL205 Analog Manual, 7th Edition Rev. D
5-18
Chapter 5: F2-08AD-2, 8-Ch. 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 eight 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
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
LD
V40401
ANDD
KFFF
BCD
SP1
X36
X34
X35
Store Channel 1
OUT
V2000
When the module is not busy, and X34, X35 and
X36 are off, channel 1 data is stored in V2000. C0
is reset to indicate 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 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 and X36 are 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 channel
2’s value is negative.
Содержание DL205
Страница 1: ...DL205 Analog I O Manual Manual Number D2 ANLG M ...
Страница 2: ...Notes ...
Страница 6: ...Notes ...