7 -3 A NALOG I NPUT D ATA R E P R E S E N TAT I O N
7 -3 A NALOG I NPUT D ATA R E P R E S E N TAT I O N
Field devices that provide an analog output as their signal (analog sensors or transducers) are usually connected to transmitters, which in turn, send the analog signal to the module. A transducer converts a field device’s variable (i.e., pressure, temperature, etc.) into a very low-level electrical signal (current or voltage) that can be amplified by a transmitter and then input into the analog interface (see Figure 7-6).
Physical
0 to 10 Volts 1C
DC Signal
Transducer
Transmitter
2 Signal Common
2C 3
3C Volts DC
4 10 4C
Time Analog
Input Module
Figure 7-6. Conversion of an analog signal by a transmitter and transducer.
Due to the many types of transducers available, analog input modules have several standard electrical input ratings. Table 7-2 lists the standard current and voltage ratings for analog interfaces. Note that analog interfaces can be either unipolar (positive voltage only—i.e., 0 to +5 VDC) or bipolar (nega- tive and positive voltages—i.e., –5 to +5 VDC).
Input Interfaces
4–20 mA 0 to +1 volts DC 0 to +5 volts DC 0 to +10 volts DC 1 to +5 volts DC
± 5 volts DC ±
10 volts DC
Table 7-2. Typical analog input interface ratings.
As mentioned earlier, an analog input module transforms an analog input signal via a sensor/transmitter unit into a discrete value that is readily understandable by man and machine (see Figure 7-7). This transformed value is the digital equivalent of the variable analog signal (e.g., pressure in psi)
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
S ECTION Components The Analog C HAPTER 2 and Systems
Input/Output System 7
measured by the field device. The field sensing device sends a very low-level current or voltage analog input to the transmitter. The transmitter (sometimes incorporated in the same unit as the sensor) sends this information to the input module as an amplified current or voltage proportional to the signal being measured. Next, the analog input interface digitizes the current or voltage by converting it into an equivalent binary number. The interface then sends the digitized signal to the controller. Thus, the binary value that the PLC receives is the digital equivalent of the incoming analog signal.
Analog input
Discrete
variable signal
value to PLC in binary or BCD (counts)
Physical
Sensor
Analog To
Input Processor
Senses
Low-level
Amplified voltage Digitized
physical
voltage of
or current value
signal
current
compatible with (counts) analog input interface
Figure 7-7. Transformation of an analog signal into a binary or BCD value.
An analog-to-digital converter (A/D or ADC) performs the signal conver- sion in an analog input module. The converter divides, or digitizes, the input signal into many digital counts, which represent the magnitude of the current or voltage. This division of the input signal is called resolution. The resolution of the module indicates how many parts the module’s A/D will divide the input signal into; it is given as a function of how many bits the A/D uses during conversion. For example, if an A/D breaks down an input signal
using 12 bits or 4096 parts (i.e., 2 12 = 4096) as shown in Figure 7-8, it has a 12-bit resolution (i.e., a 12-bit binary number with a value ranging from 0000 to 4095 decimal will represent the signal). In this case, the manufacturer could then use the remaining bits (bits 14–17) as status monitoring bits, representing module conditions such as active, OK, channel operating, etc.
An A/D converter transfers its digital-equivalent values to the processor, which in turn, makes them available for use in register or word locations. The format of these values varies according to the format used by the PLC; however, the most common formats are binary and BCD. In BCD format, the module or processor must perform an extra linearity computation to provide
a valid BCD number. Some PLCs also offer direct scale conversion of the input signal to equivalent
engineering units (0 to 9999). Table 7-3 illustrates the conversion of psi values into engineering units and their decimal equivalents. The module
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
S ECTION Components The Analog C HAPTER 2 and Systems
Input/Output System 7
Analog Input
(voltage or Bit 7 current from
transmitter/ Analog-to-
Bit 8
transducer)
Digital Converter
Bit 9 Bit 10 Bit 11
PLC Register
Figure 7-8. An analog-to-digital converter with 12-bit resolution.
Pressure Analog Voltage Digital Representation Digital Representation
psi
Input
Engineering Units Engr. Units
Decimal Scale
0000-9999
0-4095
0 0V 0000 000 50 1V 1000 100
Table 7-3. Psi values translated into decimal equivalents and engineering units.
interprets the incoming 0 to 500 psi signal variable as a voltage ranging from
0 to 10 VDC. It then converts this voltage into an equivalent decimal value.
A decimal value of 0 corresponds to 0 psi, while a decimal value of 4095 corresponds to 500 psi. The following examples illustrate how an A/D computes equivalent analog counts for an analog field signal.
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
S ECTION Components The Analog C HAPTER 2 and Systems
Input/Output System 7
E X AM PLE 7 -2
An input module, which is connected to a temperature transducer, has an A/D with a 12-bit resolution (see Figure 7-9). When the temperature transducer receives a valid signal from the process (100 to 600 ° C), it provides, via a transmitter, a +1 to +5 VDC signal compatible with the analog input module.
Sensor and transmitter in one unit
Temp ˚ C Sensor
Process
Analog To PLC
Temp Range
Voltage Counts
100 ˚ C 1 VDC 600 ˚ C 5 VDC
4095 Figure 7-9. An A/D and an analog input module connected to a temperature-
sensing device.
(a) Find the equivalent voltage change for each count change (the voltage change per degree Celsius change) and the equivalent number of counts per degree Celsius, assuming that the input module transforms the data into a linear 0 to 4095 counts, and (b) find the same values for a module with a 10-bit resolution.
S OLU T I ON
(a) The relationship between temperature, voltage signal, and module counts is:
The changes ( ∆ ) in temperature, voltage, and input counts are 500 ° C, 4 VDC, and 4095 counts. Therefore, the voltage change for a 1 ° C temperature change is:
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
S ECTION Components The Analog C HAPTER 2 and Systems
Input/Output System 7
The change in voltage for each input count is: ∆ 4095 counts = ∆ 4 VDC
Therefore, the corresponding number of counts per degree Celsius is:
∆ 500 °= C ∆ 4095 counts 4095 counts
1 °= C = . 8 19 counts
(b)
A 10-bit resolution A/D will digitize the unipolar input signal into 1024 counts (i.e., 2 10 = 1024 counts, ranging from 0000 to 1023). The relationship between temperature, voltage signal, and counts is:
The changes in temperature, voltage, and counts are 500 ° C, 4 VDC, and 1023 counts. The voltage change per degree will be the same as in part (a) and is:
∆ 500 °= C ∆ 4 VDC 4 VDC
1 °= C = 80 . mVDC
500 The change in voltage per input count is: ∆ 1023 counts = ∆ 4 VDC
Thus, the corresponding number of counts per degree Celsius is:
∆ 500 °= C ∆ 1023 counts 1023 counts
1 °= C = . 2 046 counts
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
S ECTION Components The Analog C HAPTER 2 and Systems
Input/Output System 7
E X AM PLE 7 -3
A temperature transducer/transmitter (see Figure 7-10) provides a 0– 10 VDC voltage signal that is proportional to the temperature variable being measured. The temperature measurement ranges between 0
and 1000 °
C. The analog input module accepts a 0–10 VDC unipolar signal range and converts it to a range of 0–4095 counts. The process application where this signal is being used detects low and high alarms at 100 °
C and 500 °
C, respectively.
1000 ° C
4095 counts
Transducer 0–10 Volts DC
Input A/D
C to 1000 ° C Signal Return
Common 0 counts Analog Input
Module
0 ° C time
Figure 7-10. Temperature transducer/transmitter connected to an input module.
Find (a) the relationship (i.e., equation of the line) between the input variable signal (temperature) and the counts being measured by the PLC module and (b) the equivalent number of counts for each of the alarm temperatures specified.
S OLU T I ON
(a) Figure 7-11 shows the relationship between counts and the input signal in volts and degrees Celsius. Line Y describes the numerical relationship between the input signal and the number of counts (assuming a linear relationship).
˚C
line Y ˚C = mx counts + b
Alarm Detection Range ˚C
Alarm Count Detection Range
Figure 7-11. Relationship between counts and input signal.
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
S ECTION Components The Analog C HAPTER 2 and Systems
Input/Output System 7
To find the relationship between temperature and counts, find the numerical representation of the equation for line Y . This equation takes the form Y = mX + b (see Appendix E), where m is the slope of the line and is described by:
Y 2 − Y 1 ° C 2 −° C 1 1000 0 − 1000
= X 2 − X 1 count 2 − count 1 4095 0 − 4095
and Y 2 , Y 1 , X 2 , and X 1 are known points. The value b is the value of Y,
or °
C, when X, or counts, equals 0. This value can be computed as:
b = Y ° C − mX counts
where Y and X are values at known points (i.e., at 0 ° C and 0 counts).
When X is at 0 counts, Y is at 0 ° C; therefore: 1000
b =− 0 0 4095
Substituting the derived values for m and b into the equation Y = mX
+ b produces the equation of line Y : Y = mX + b
X counts + 0
X counts 4095
Using 4095 counts and 1000 °
C as the X and Y values when comput- ing b would have derived the same equation (try it as an exercise).
(b) Based on the equation of line Y , the number of counts for each alarm range is:
X counts
X counts =
4095 ( Y ° C )
So, for the Y ° C values of 100 °
C and 500 °
C, the X values are:
X counts at 100 C ° =
X counts at 500 C ° =
= 2047 5 . counts
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
S ECTION Components The Analog C HAPTER 2 and Systems
Input/Output System 7
Thus, the count value for 100 °
C is 409.5 counts and for 500 ° C is 2047.5 counts. Since count values must be whole numbers, rounding these values off yields 410 and 2048 counts, respectively. Therefore, at a count of 410, the low-level temperature alarm would be enabled; and at a count of 2048, the high-level temperature alarm would be enabled.
Another method for solving this problem is to determine the number of
counts that are equivalent to 1 °
C. A change of 1000 ° C per 4095 counts
can be expressed as:
∆ counts
max counts − min counts
= 4. 095 ∆ degrees max degrees − min degrees 1000 − 0
Therefore, each degree is equivalent to 4.095 counts. The count value
for 500 °
C would be (500)(4.095) = 2047.5 and for 100 ° C would be (100)(4.095) = 409.5. Rounding off these values yields 2048 and 410 counts, respectively—the same values we computed before. If the counts had not started at 0, an offset count addition would have been necessary for computing the number of counts per degree.