DL205 Analog Manual, 7th Edition Rev. D
3-17
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 Bipolar Ranges (Pointer Method) for the DL240, DL250-1
and DL260 CPUs
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. With the DL240/250 CPU, the last input cannot be
used to show the sign for each channel (X37 in the previous examples). This is because the
DL240/250-1/260 reads all four channels in one scan. Therefore, if X37 were used, the last
channel read would just be monitored and the sign would not be able to be determined for the
previous three channels. A simple solution is if the value read is greater than or equal to 8001
the value is negative.
The sign bit is the most significant bit, which combines 8000 with the data value. If the value
is greater than or equal to 8001, only the most significant bit and the active channel bits will
need to be masked to determine the actual data value.
The following program shows how to accomplish this. Since a negative value is always meant
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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
b
C
D
SP1
OUT
C1
LD
V2000
OUT
V2020
Load channel 1 data from V-memory into the
accumulator. Remember, the data can be negative.
Contact SP1 is always on.
Put the actual signal value in V2020. Now you can use
the data normally.
ANDD
K7FFF
This instruction masks the sign bit of the BCD data if it
is set. Without this step, negative values will not be
correct, so do not forget to include it.
V2000
K8001
Check Channel 1
Channel 1 data is negative when C1 is on (a value of --1
reads as 8001, --2 is 8002, etc.).
²
Check Channel 2
SP1
OUT
C2
LD
V2001
OUT
V2021
Load channel 2 from V-memory into the accumulator.
Remember, the data can be negative. Contact SP1 is
always on.
Put the actual signal value in V2021. Now you can use
the data normally.
ANDD
K7FFF
This instruction masks the sign bit of the BCD data if it
is set. Without this step, negative values will not be
correct, so do not forget to include it.
V2001
K8001
Channel 2 data is negative when C2 is on (a value of --1
reads as 8001, --2 is 8002, etc.).
²
Summary of Contents for DL205
Page 1: ...DL205 Analog I O Manual Manual Number D2 ANLG M ...
Page 2: ...Notes ...
Page 6: ...Notes ...