Writing the Control Program .................................................................................. 5-14
Chapter
Chapter
Chapter
5
5
5
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
V
C
C
C
CH8
0V
C
CH3
CH5
C
F2-08
2
IN
10-30VDC
5mA
A
0
C
+/
C
OG
A
8C
Module Specifications
NOTE: A re-designed F2-08AD-2 with a single circuit board design was released in 2009. The jumper link location is
different. See Setting the Module Jumpers on pages 5-5 and 5-6. Also, some specifications were changed on page 5-3.
Otherwise, the re-designed module functions the same as the prior design.
The F2-08AD-2 Analog Voltage Input module provides several
hardware features:
• Analog inputs are optically isolated from the PLC logic.
• The module has a removable terminal block so
the module can be easily removed or changed
without disconnecting the wiring.
• With a D2-240, D2-250-1, D2-260 or D2-262
CPU, all channels can be updated in one scan.
Firmware Requirements:
To use this module, D2-230 CPUs must have firmware version
1.6 or later. To use the pointer method of writing values, D2-240
CPUs require firmware version 2.2 or later. All versions of the
D2-250-1 and D2-260 CPU’s firmware support this module and
the pointer method.
Analog Input Configuration Requirements
The F2-08AD-2 Analog Input requires 16 discrete input points.
The module can be installed in any slot of a DL205 system. The
available power budget and discrete I/O points are the limiting
factors. Check the user manual for the CPU model and I/O base
being used for more information regarding power budget and
number of local, local expansion or remote I/O points.
INANALOG
F2-08AD-2
10-30VDC
5mA
0V
+24V
+24
H1+
CH1+
H2+
CH2+
+
CH3+
CH4+
H4+
+
CH5+
CH6+
H6+
H7+
CH7+
CH8+
ANALOG IN
NALOG IN
-5.010VD
0-5.0 - 10VDC
-5, +/-10VD
+/-5, +/-10VDC
AD-
NAL
8CH
+
F2-08AD-2
H
5-2
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
The following tables provide the specifications for the F2–08AD–2 Analog Input Module.
Review these specifications to make sure the module meets your application requirements.
Input Specifications
Number of Channels
Input Ranges
Resolution
Step Response
Crosstalk
Active Low-pass Filtering
Input Impedance
Maximum Continuous Overload
Linearity Error (End to End)
Input Stability
Full Scale Calibration Error
(Offset error not included)
Offset Calibration Error
Maximum Inaccuracy
Accuracy vs. Temperature
8, single ended (one common)
0–5 V, 0–10 V, ±5V, ±10V
12 bit (1 in 4096) unipolar (0 – 4095)
13 bit (1 in 8192) bipolar (– 4095 – +4095)
1.0 ms (* 4 ms) – 95% of full step change
–70dB, 1 count maximum
–3 dB @ 200Hz (– 6dB per octave)
Greater than 20Mq
±75VDC
±0.025% of span (±1 count maximum unipolar)
(±2 count maximum bipolar)
±1 count
±3 counts maximum
±1 count maximum, @ 0VDC
±0.1% @ 25°C
±0.3% 0–60°C (32–140°F)
±50ppm/°C maximum full scale calibration
(Including maximum offset change of 2 counts)
General Specifications
PLC Update Rate
Data Acquisition Time
Digital Inputs
Input points required
Power Budget Requirement
External Power Supply
Operating Temperature
Storage Temperature
Relative Humidity
Environmental air
Vibration
Shock
Noise Immunity
NOTE: Values in parenthesis with an asterisk are for older modules with two circuit board design and date codes 0609D4
and prior. Values not in parenthesis are for single circuit board models with date code 0709E1 and above.
1 channel per scan maximum (D2-230 CPU)
8 channels per scan maximum
12 binary data bits, 1 sign bit 3 channel ID bits,
1 diagnostic bit
16 point (X) input module
100mA (* 60mA) maximum, 5VDC (supplied by base)
5mA, 10–30 VDC (*80mA, 18-26.4 VDC)
0°C–60°C (32°F to 140°F)
-20°C to 70°C (-4°F to 158°F)
5–95% (non-condensing)
No corrosive gases permitted
MIL STD 810C 514.2
MIL STD 810C 516.2
NEMA ICS3-304
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-3
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
7
F2-08AD-2
0
Correct!
0
7
7
0
7
0
Incorrect
Special Placement Requirements (D2-230 and Remote I/O Bases)
Even though the module can be placed in any slot, it is important to examine the configuration
if a D2-230 CPU is used, as can be seen in the section about Writing the Program, located in
this chapter. V-memory locations are used to extract the analog data. If the module is placed so
the input points do not start on a V-memory boundary, the instructions cannot access the data.
This also applies when placing this module in a remote base using a D2-RSSS in the CPU slot.
Slot 0Slot 1Slot2 Slot 3Slot 4
8pt
8pt
Input
Input
X0
X10
--
--
X7
X17
Input
X20
--
X37
16pt
16pt16pt
InputOutput
X40
Y0
--
--
X57
Y17
V40400V40402
Data is correctly entered so input
V40401
BSLBSM
points start on a V-memory boundary.
X
3
F2-08AD-2
Slot 0Slot 1Slot2 Slot 3Slot 4
8pt
Input
X0
X7
16pt
Input
X10
--
--
X27
Input
X30
--
X47
16pt
InputOutput
X50
--
X67
16pt16pt
Y0
Y17
X
2
--
Data is split over two locations, so instructions cannot access data from a D2-230.
V40401
X
X
3
To use the V-memory references required for a D2-230 CPU, the first input address assigned
3
X
2
BSLBSM
X
X
2
1
V40400
X7X
1
BSLBSM
X
0
to the module must be one of the following X locations. The table also shows the V-memory
addresses that correspond to these X locations.
There are two jumpers, labeled +1, +2, and +4 that are used to select the number of channels
that will be used. Use the figures below to locate the jumpers on the module. The module is set
from the factory for eight channel operation (all jumpers installed).
Unused channels are not processed. For example, if only channels 1 through 3 are selected,
then channels 4 through 8 will not be active. The following table shows how to place the
jumpers to select the number of channels.
No. of Channels +1 +2 +4
1 No No No
1, 2 Yes No No
1, 2, 3 No Yes No
1, 2, 3, 4 Yes Yes No
1, 2, 3, 4, 5 No No Yes
1, 2, 3, 4, 5, 6 Yes No Yes
1, 2, 3, 4, 5, 6, 7 No Yes Yes
1, 2, 3, 4, 5, 6, 7, 8 Yes Yes Yes
Jumper location on modules having
Date Code 0609D4 and previous
(two circuit board design)
+4
+2
+1
For example, to select all 8 channel operation,
leave all jumpers installed. To select 1
channel, remove all three jumpers.
Note that removed jumpers can be stored on
a single post to prevent from losing them.
Yes = jumper installed
No = jumper removed
Jumper location on modules having
Date Code 0709E1 and above
(single circuit board design)
Use jumpers +1, +2 and
+4 to select number of
channels.
+1
+2
+4
These jumpers are located on the motherboard,
the one with the black D-shell style backplane
connector.
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-5
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Jumper
Selecting the Input Voltage
There is another jumper, labeled J3 that is used to select between the 5V ranges and the 10V
ranges See the figures below to locate the jumper on the module being used. The module
comes from the factory set for 10V operation (jumper is removed and is stored on one of the
pins).
NOTE: Install jumper J3 for 0–5 V or W5V operation.
Remove J3, or store on a single pin, for 0 to 10V or W10V operation.
Jumper J3 location on modules having
Date Code 0609D4 and previous
(two circuit board design)
J3
Jumper J3 is located on the smaller circuit
board, which is on top of the motherboard.
Install J3 for 0–5 V or W5V operation.
Remove J3, or store on a single pin, for
0–10V or W10V operation.
Jumper J3 location on modules having
Date Code 0709E1 and above
(single circuit board design)
J3
Install J3 for 0–5 V or W5V operation.
Remove J3, or store on a single pin, for
0–10V or W10V operation.
5-6
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Connecting the Field Wiring
Wiring Guidelines
Your company may have guidelines for wiring and cable installation. If so, check them
before starting the installation. Here are some general things to consider:
• Use the shortest wiring route whenever possible.
• Use shielded wiring and ground the shield at the transmitter source.
Do not ground the shield at both the module and the source.
• Do not run the signal wiring next to large motors, high current
switches, or transformers. This may cause noise problems.
• Route the wiring through an approved cable housing to minimize
the risk of accidental damage. Check local and national codes
to choose the correct method for your application.
User Power Supply Requirements
The F2-08AD-2 module requires at least one field-side power supply. The same or separate
power sources can be used for the module supply and the voltage transmitter supply. The
module requires 10–30 VDC, at 5mA, from the external power supply.
The DL205 AC bases have a built-in 24VDC power supply that provide up to 300mA of
current. This can be used instead of a separate supply. Check the power budget to be safe.
It is desirable in some situations to power the transmitters separately in a location remote
from the PLC. This will work as long as the transmitter supply meets the voltage and current
requirements, and that the transmitter and the module supply minus (-) side are connected
together.
WARNING: If the 24VDC base power supply is used, Be sure to calculate the power budget. Exceeding
the power budget can cause unpredictable system operation that can lead to a risk of personal injury or
damage to equipment.
The DL205 base has a switching type power supply. As a result of switching noise, W3–5
counts of instability may be noticed in the analog input data if this power supply is used. If this
is unacceptable, try using one of the following.
1. Use a separate linear power supply.
2. Connect the 24VDC common to the frame ground, which is the screw
terminal marked on the screw terminal marked “G” on the base.
By using these methods, the input stability is rated at W1 count.
Unused inputs should be shorted together and connected to common.
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-7
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Wiring Diagram
The F2-08AD-2 module has a removable connector to simplify wiring the module. Just squeeze
the top and bottom retaining clips and gently pull the connector from the module. Use the
following diagram to connect the field wiring
24 VDC
-
+
0 VDC
0 V
+
+
+
+
+
+
+
+
CH1
3-wire
Voltage
Transmitter
CH 2
2-wire
Voltage
Transmitter
CH 3
4-wire
+
Voltage
Transmitter
-
CH 4
3-wire
Voltage
Transmitter
See NOTE 1
+
+
-
+
-
+
-
+
+
-
24VDC
CH1
CH2
CH3
CH4
CH5
CH6
CH7
CH8
Retaining clip
Analog Multiplexer
AD C
INANALOG
F2-08AD-2
10-30VDC
5mA
0V
+24V
CH1+
CH2+
CH3+
CH4+
CH5+
CH6+
CH7+
CH8+
ANALOG IN0-5.0 - 10VDC+/-5, +/-10VDC
8CH
5-8
Retaining clip
NOTE: Connect unused channels (CH5+, CH6+, CH7+, CH8+ in this diagram) to common (0VDC).
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Module Operation
Channel Scanning Sequence (Multiplexing) for a D2-230 CPU
Before beginning to write the control program, it is important to take a few minutes to
understand how the module processes and represents the analog signals.
Depending on the type of CPU being used, the F2-08AD-2 module can supply different
amounts of data per scan. The D2-230 can obtain one channel of data per CPU scan. Since
there are eight channels, it can take up to eight scans to get data for all channels. Once all
channels have been scanned the process starts over with channel 1. Unused channels are not
processed, so if only two channels are selected, each channel will be updated every other scan.
The multiplexing method can also be used for the D2-240, D2-250-1, D2-260 and D2-262
CPUs.
Scan
ReadInputs
Execute ApplicationProgram
Read the data
Store data
WritetoOutputs
Scan N
Scan N+1
(repeat forch. 3--6)
Scan N+6
Scan N+7
Scan N+8
System With
DL230CPU
Channel1
Channel2
Channel7
Channel8
Channel1
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-9
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Channel Scanning Sequence (Pointer method) for
D2-240, D2-250-1, D2-260 or D2-262 CPUs
If either a D2-240, a D2-250-1, a D2-260 or a D2-262 CPU are used, all eight channels of
input data can be collected in one scan. This is because the D2-240, D2-250-, D2-260 and
D2-262 CPUs support special V-memory locations that are used to manage the data transfer
which is discussed in more detail in the section on Writing the Control Program later in this
chapter.
Scan
ReadInputs
Execute ApplicationProgram
Read the data
Store data
WritetoOutputs
Scan N
Scan N+1
Scan N+2
Scan N+3
Scan N+4
System With
DL240, D2-250--1,
D2-260 or D2-262
CPU
Ch 1, 2, 3, ...8
Ch 1, 2, 3, ...8
Ch 1, 2, 3, ...8
Ch 1, 2, 3, ...8
Ch 1, 2, 3, ...8
Analog Module Updates
Even though the channel updates to the CPU are synchronous with the CPU scan, the module
asynchronously monitors the analog transmitter signal and converts the signal to a 12-bit
binary representation. This enables the module to continuously provide accurate measurements
without slowing down the discrete control logic in the RLL program.
For the vast majority of applications, the values are updated much faster than the signal
changes. However, in some applications, the update time can be important. The module takes
approximately one millisecond to sense 95% of the change in the analog signal.
5-10
NOTE: This is not the amount of time required to convert the signal to a digital representation. The conversion to the digital
representation takes only a few microseconds. Many manufacturers list the conversion time, but it is the settling time of the
filter that really determines the update time.
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
7
F2-08AD-2
0
6
5
4
Understanding the Input Assignments
It was mentioned earlier in this chapter that the F2-08AD-2 module appears as a 16-point
discrete input module to the CPU. These points can be used to obtain:
• An indication of which channel is active
• The digital representation of the analog signal
• Module diagnostic information
Since all input points are automatically mapped into V-memory, it is very easy to determine the
location of the data word that will be assigned to the module.
Slot 0Slot1Slot 2Slot3Slot 4
8pt
Input
X0
X7
8pt
Input
X10
-X17
Input
X20
--
X37
--
16pt
InputOutput
X40
X57
16pt16pt
Y0
--
--
Y17
V40400V40402
V40401
X
X
X
X
3
3
3
3
Data Bits
V40500
BSLBSM
X
2
Within these word locations, the individual bits represent specific information about the analog
signal.
Analog Data Bits
The first twelve bits represent the analog data in binary
format.
Bit Value Bit Value
0 1 6 64
1 2 7 128
1
5
2 4 8 256
3 8 9 512
4 16 10 1024
5 32 11 2048
V40401
= databits
BSLBSM
01413121110987654321
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-11
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
V40401
Active Channel Indicator Inputs
Three of the inputs are binary-encoded to
indicate the active channel (remember, the
V-memory bits are mapped directly to discrete
inputs). The inputs automatically turn on and
off to indicate the current channel for each
scan.
The MSB input bit is the broken transmitter/
no 24V indicator and the sign indicator.
If the bit is on and the data is zero, there is no
24V input power or the terminal block is loose
or missing. If the data is not 0 (zero), the input
represents the sign bit.
V40401
X
X
X
3
3
3
6
5
4
=channel inputs
X
3
7
=diagnosticinput/signbit
BSLBSM
X
2
0
BSLBSM
X
2
0
5-12
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Module Resolution
Since the module has 12-bit unipolar resolution,
the analog signal is converted into 4096 counts
ranging from 0–4095 (212). For example, with
a 0–10V scale, a 0V signal would be 0, and a
10V signal would be 4095. This is equivalent to
a binary value of 0000 0000 0000 to 1111 1111
1111, or 000 to FFF hexadecimal. The diagram
shows how this relates to each signal range. The
bipolar ranges utilize a sign bit to provide 13-bit
resolution. A value of 4095 can represent the
upper limit of either side of the range. Use the
sign bit to determine negative values.
Unipolar
Ranges
+V
0V
04095
Unipolar Resolution
Bipolar Resolution
HorL=highorlow limit of therange
+V
0V
-- V
Bipolar
Ranges
H–L
=
4095
H–L
=
8191
04095-- 4095
Voltage Range
0V to +10V
-10V to +10V
0V to + 5V
-5V to + 5V
Signal Span
(H – L)
10V40952.44 mV
20V81912.44 mV
5V40951.22 mV
10V81911.22 mV
Divide By
Smallest Detectable
Change
Each count can also be expressed in terms of the signal level by using the equation shown on
the facing page. The following table shows the smallest detectable signal change that will result
in one LSB change in the data value for each input signal range.
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-13
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
incoming data.
Writing the Control Program
Reading Values: Pointer Method and Multiplexing
There are two methods of reading values:
1. The pointer method
2. Multiplexing
The multiplexing method must be used when using a D2-230 CPU. The multiplexing method
must also be used with remote I/O modules (the pointer method will not work). Either
method can be used with the D2-240, D2-250-1, D2-260 and D2-262 CPUs, but for ease of
programming it is strongly recommended to use the pointer method.
Pointer Method for D2-240, D2-250-1, D2-260 and D2-262 CPUs
The DL205 series has special V-memory locations assigned to each base slot that will greatly
simplify the programming requirements. These V-memory locations allow you to:
• Specify the data format
• Specify the number of channels to scan
• Specify the storage locations
NOTE: D2-240 CPUs with firmware release version 2.2 or later support this method. D2-250 CPUs with firmware release
version 1.06 or later support this method. If the D2-230 example needs to be used, module placement in the base is very
important. Review the section earlier in this chapter for guidelines.
5-14
The example program shows how to setup these locations. Place this rung anywhere in the
ladder program, or in the initial stage if stage programming instructions are being used. This is
all that is required to read the data into V-memory locations. Once the data is in V-memory,
math can be used on the data, compare the data against preset values, and so forth. V2000 is
used in the example but any user V-memory location can be used. In this example the module
is installed in slot 2. Be sure to use the V-memory locations for the module placement. The
pointer method automatically converts values to BCD (depending on the LD statement in the
ladder logic).
SP0
LD
00
08K0088
K
OUT
V7662
LDA
O2000
OUT
V7672
LD
-or-
Loadsaconstant that specifies the numberofchannelstoscan and
thedataformat.The upperbyte, most significant nibble (MSN)
selects the dataformat(i.e. 0=BCD, 8=Binary), theLSN selects the
numberofchannels(i.e. 1, 2, 3, 4, 5, 6, 7, or 8).
Special V-memory location assignedtoslot2that contains the
numberofchannelsto scan.
This loads an octalvalue forthe firstV-memorylocationthat will be
used to storethe incoming data. Forexample, theO2000enter ed
herewoulddesignate thefollowing addresses.
Ch1--V2000, Ch2--V2001, Ch3--V2002,Ch4 -- V2003
Ch5-V2004, Ch6-V2005, Ch7-V2006,Ch8 -V2007
Theoctal address(O2000)isstoredhere. V7672isassignedtoslot
2 and acts as a pointer,whichmeans theCPU will usethe octal
value in this location to determine exactlywhere to storethe
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
The tables below show the special V-memory locations used by the D2-240, D2-250-1,
D2-260 and D2-262 CPUs for the base and local expansion base I/O slots. Slot 0 (zero) is the
module next to the CPU or D2-CM module. Slot 1 is the module two places from the CPU or
D2-CM, and so on. Remember, the CPU only examines the pointer values at these locations
after a mode transition. Also, if you use the D2-230 (multiplexing) method, verify that these
addresses in the CPU are 0 (zero).
The Table below applies to the D2-240, D2-250-1, D2-260 and D2-262 CPU base.
CPU Base: Analog Input Module Slot-Dependent V-memory Locations
Slot
No. of Channels
Storage Pointer
The Table below applies to the D2-250-1, D2-260 or the D2-262 CPU base 1.
Expansion Base D2-CM #1: Analog Input Module Slot-Dependent V-memory Locations
Slot
No. of Channels
Storage Pointer
The Table below applies to the D2-250-1, D2-260 or the D2-262 CPU base 2.
Expansion Base D2-CM #2: Analog Input Module Slot-Dependent V-memory Locations
Using Bipolar Ranges (Pointer Method) for
D2-240, D2-250-1, D2-260 and D2-262 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 D2-240 or D2-250 CPU, the last input cannot
be used to show the sign for each channel (X37 in the previous examples). This is because the
D2-240, D2-250-1, D2-260 and D2-262 reads all eight 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 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.
5-16
SP1
V2000K8001
Check Channel2
SP1
V2001K8001
LD
V2000
ANDD
K7FFF
OUT
V2020
²
LD
V2001
ANDD
K7FFF
OUT
V2021
²
Load channel 1datafromV-memoryintothe
accumulator. Remember,the data canbe negative.
Contact SP1 is always on.
This instruction masks thesignbit of theBCD dataifit
is set. Withoutthis step, negative values will not be
correct,sodo not forget to include it.
Putthe actual signal value in V2020. Nowyou canuse
thedatanormally.
C1
Channel 1datais negativewhenC1ison(avalue of -- 1
OUT
reads as 8001,--2 is 8002, etc.).
Load channel 2fromV-memoryintothe accumulator.
Remember, the datacan be negative.Contact SP1 is
always on.
This instruction masks thesignbit of theBCD data, if it
is set. Withoutthis step, negative values will not be
correct,sodo not forget to include it.
Putthe actual signal value in V2021. Nowyou canuse
thedatanormally.
C2
Channel 2datais negativewhenC2ison(avalue of -- 1
OUT
reads as 8001,--2 is 8002, etc.).
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Reading Values (Multiplexing) for
D2-230, D2-240, D2-250-1, D2-260 and D2-262 CPUs
The D2-230 CPU does not have the special V-memory locations which will allow data transfer
to be automatically enabled. Since all channels are multiplexed into a single data word, the
control program must be setup to determine which channel is being read. Since the module
appears as X input points to the CPU, it is very easy to use the active channel status bits to
determine which channel is being monitored.
NOTE: This example is for a module installed as shown in the previous examples. The addresses used would be different
if the module is installed in a different I/O arrangement. The rungs can be placed anywhere in the program, or if stage
programming is being used, place them in a stage that is always active.
This instruction masks thechannel identification
bits. Without this,the values used will not be
correct so do notforget to include it.
It is usually easier to perform math operationsin
BCD, so it is besttoconvert thedatatoBCD
immediately. Youcan leave out this instructionif
your application does not require it.
When X34, X35 and X36are off, channel1data
is stored in V2000.
When X34ison, X35and X36are off, and
broken transmitterdetectisoff,channel2data
is stored in V2001.
When X35 and X36are on and X34isoff,
channel7dataisstoredinV2006.
When X34, X35 and X36are on, channel8data
is stored in V2007.
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-17
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
StoreChannel 1
LoadData
2’svalue is negative.
Single Channel Selected
The single channel program makes it easy to determine which channel has been selected.
X36X34X35
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 D2-230 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.
SP1
StoreChannel 1
StoreChannel 2
LD
V40401
ANDD
KFFF
BCD
OUT
V2000
LD
V40401
ANDD
KFFF
BCD
X36X34X35
X36X34 X35
X37
X37
OUT
V2000
OUT
V2001
Loadsthe complete datawordintothe accumulator.
TheV-memoryloc ation depends on the I/O
configuration. SeeAppendix Afor thememorymap.
This instruction masksthe channelidentification bits.
Without this,the values used will not be correct, so do
not forget to include it.
It is usually easier to perform math operationsinBCD.
So it is besttoconvertthe datatoBCD immediately.
Youcan leave out this instruction if your application
does notrequire it.
When themoduleis not busy, andX34 andX35 are
off, channel1dataisstoredinV2000.
Loadsthe complete datawordintothe
accumulator. TheV-memorylocation depends
on the I/O configuration. SeeAppendixAforthe
memory map.
This instructionmasks thechannel identification
bits. Without this ,the values used will not be
correct,sodo not forget to include it.
It is usually easier to perform math operationsin
BCD, so it is besttoconvert thedat atoBCD
immediately. Youcan leave out this instructionif
your application does not require it.
When themoduleisnot busy, andX34, X35 and
X36are off, channel1dataisstoredinV2000.C0
is resettoindic atechannel1’s value is positive.
C0
RST
C0
If X37is on, then thedatavalue representsa
SET
negative voltage.C0isset to indicate channel
1’svalue is negative.
When themoduleisnot busy, andX34 is on and
X35 and X36are off, channel 2dataisstoredin
V2001.C1isreset to indicate channel2’s value
C1
is positive.
RST
C1
If X37is on, then thedatavalue representsa
negative voltage.C1isset to indicate channel
SET
5-18
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Using 2’s Complement (Multiplexing) for
D2-230, D2-240, D2-250-1, D2-260 and D2-262 CPUs
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 eight channels if
necessary.
This instructionmasks thechannelidentification bits
Without this,the values used will notbecorrect,so
do not forget to include it.
When themoduleis not busy, and X34, X35 and
X36are off, channel1dataisstoredinV2000.C0
is resettoindicate that channel 1’svalue is positive.
C0
RST
C0
If X37ison, then the datavalue representsa
negative v oltage. C0 is settoindicat ethat
SET
channel1’s value is negative.
Invert thebit pattern in theaccumulator.
Channel1dataisindoublewordstarting at V2040.
When themoduleis not busy, and X34ison and
X35and X36are off, channel 2dataisstoredin
V2001.C1isreset to indicate that channel2’s
C1
value is positive.
RST
C1
If X37ison, then thedatavalue representsa
negative v oltage. C1 is settoindicate that
SET
channel2’s value is negative.
Invert thebit pattern in theaccumulator.
X36X34X35
BCD
ADDD
K1
OUT
V2042
Channel2dataisindoublewordstarting at V2042.
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-19
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Multiplexing method
Analog Power Failure Detection
The analog module has a microcontroller which can diagnose analog input circuit problems. A
ladder rung can be added to program to detect these problems. This rung shows an input point
that would be assigned if the module was used as shown in the previous examples. A different
point would be used if the module was installed in a different I/O configuration.
V2000K0=X37
C0
OUT
Pointers method
V2000 K8000
=
C0
OUT
Scaling the Input Data
Most applications usually require measurements in
engineering units which provides more meaningful data.
This is accomplished by using the conversion formula
shown.
Adjustments may be needed to the formula depending on
the scale being used for the engineering units.
For example, if pressure (psi) is to be measured from
0.0–99.9 then multiply the value by 10 in order to
imply a decimal place when viewing the value with the
programming software or with a handheld programmer.
Notice how the calculations differ when the multiplier is used.
Analog Value of 2024, slightly less than half scale, should yield 49.4 psi.
V-memory locationV2000 holds
channel 1data. Whenadatavalue
of zero is returned and inputX37 is
on,then theanalogcircuitry is not
operating properly.
V-memory locationV2000 holds
channel 1data. When a datavalue
of 8000 is returned,then the analog
circuitry is not operatingproperly.
Units = A
4095
U = Engineering Units
A = Analog Value (0 – 4095)
H = High limit of the engineering
unit range
L = Low limit of the engineering
unit range
H – L
DL205 Analog I/O Manual, 7th Edition, Rev. G
5-20
Example without multiplier Example with multiplier
Units = A
4095
Units = 2024
4095
H – L
100 – 0
Units = 49
Units = 10A
4095
Units = 20240
4095
Units = 494
H – L
100 – 0
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
The Conversion Program
The following example shows how to write the program to perform the engineering unit
conversion. This example assumes the raw input data read at V2000 is in BCD format.
NOTE: This example uses SP1, which is always on, but any permissive contact such as, X, C, etc., can be used.
SP1
LD
V2000
MUL
K1000
DIV
K4095
OUT
V2010
When SP1 is on, load channel1datatothe accumulator.
Multiply theaccumulator by 1000(to startthe c onv ersion).
Divide theaccumulator by 4095.
Storethe result in V2010.
Analog and Digital Value Conversions
Sometimes it is useful to be able to quickly convert between the signal levels and the digital
values. This is especially helpful during machine startup or troubleshooting. Remember, that
this module does not operate like other versions of analog input modules. The bipolar ranges
use 0-4095 for both positive and negative voltages. The sign bit allows this, which actually
provides better resolution than those modules that do not offer a sign bit. The following table
provides formulas to make this conversion easier.
Range If the digital value is known
0–5 V
±5V
0–10 V
±10V
5D
A =
4095
5D
A =
4095
If the analog signal level is
known.
4095
D =
D = 4095
(A)
5
ABS(A)
10
As an example, if the range being used is ±10V and
the measured signal is 6V, use the formula to the
right to determine the digital value that is stored in
the V-memory location that contains the data.
DL205 Analog I/O Manual, 7th Edition, Rev. G
4095
D =
(A)
10
4095
D =
(6V)
10
D = (409.5) (6)
D = 2457
5-21
Chapter 5: F2-08AD-2, 8-Ch. Analog Voltage Input
Filtering Input Noise for D2-250-1, D2-260 and D2-262 CPUs
Add the following logic to filter and smooth analog input noise in D2-250-1, D2-260 and
D2-262 CPUs. This is especially useful when using PID loops. Noise can be generated by the
field device and or induced by field wiring.
In the following example, the analog value in BCD is first converted to a binary number.
Memory location V1400 is the designated work space in this example. The MULR instruction
is the filter factor, which can be from 0.1–0.9. The example uses 0.2. A smaller filter factor
increases filtering. A higher precision value can be used, but it is not generally needed. The
filtered value is then converted back to binary and then to BCD. The filtered value is stored in
location V1402 for use in your application or PID loop.
NOTE: Please review intelligent instructions (IBox) in Chapter 5 of D2-USER-M, which simplify this and
other functions. The IBox instructions are supported by the D2-250-1, D2-260 and D2-262.
NOTE: Be careful not to do a multiple number conversion on a value. For example, if you are using the
pointer method to get the analog value, it is in BCD and must be converted to binary. However, if you are
using the conventional method of reading analog and are masking the first twelve bits, then it is already in
binary and no conversion using the BIN instruction is needed.
SP1
LD
V2000
BIN
BTOR
SUBR
V1400
MULR
R0.2
ADDR
V1400
OUTD
V1400
RTOB
BCD
OUT
V1402
Loadsthe analog signal, whichisaBCDvalue
and has beenloadedfromV-memorylocation
V2000,intothe accumulator.Contact SP1 is
always on.
Converts theBCD value in theaccumulator to
binary. Remember,thisinstruc tion is not
neededifthe analog value is originally
broughtinasabinary number.
Converts thebinar yvalue in theaccumulator
toarealnumber.
Subtractsthe real numberstoredinlocation
V1400 from thereal numberinthe accumulator,
and stores theresultinthe accumulator.V1400
is thedesignatedworkspaceinthisexample.
Multipliesthe real number in the
accumulatorby0.2 (the filter factor),
and stores theresultinthe
accumulator.This is thefiltered value.
Adds thereal numberstoredin
locationV1400 to therealnumber
filtered valueinthe accumulator, and
stores theresult in theaccumulator.
Copies thevalue in theaccumulator to
location V1400 .
Converts thereal number in the
accumulatortoabinaryvalue, and
stores theresult in theaccumulator.
Converts thebinaryvalue in theaccumulator
to aBCD number.Note: TheBCD instruction
is not needed forPID loop PV (loopPVisa
binary number).
Loads theBCD number filtered valuefrom
theaccumulator intolocationV1402touse in
your applicationorPID loop.
5-22
DL205 Analog I/O Manual, 7th Edition, Rev. G
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.