Introduction
The S7-300 system has a number of analog modules for connecting to sensors and/or loads/actuators.
Contents
In this chapter we describe the basic principles of analog technology and the analog modules of the S7-300:
Section 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 Contents Analog Value Representation Connecting Sensors/Transducers and Loads/Actuators to Analog Modules Fundamental Principles for the Use of Analog Modules Analog Input Module SM 331; AI 8 Analog Input Module SM 331; AI 2 Analog Output Module SM 332; AO 4 Analog Output Module SM 332; AO 2 Analog Input/Output Module SM 334; AO 4/AI 2 8/8Bit 12Bit 12Bit 12Bit 12Bit Page 4-2 4-16 4-33 4-51 4-62 4-73 4-80 4-87
4-1
Analog Modules
4.1
Analog Values
In all S7-300 analog modules, the analog value is represented in binary form in the same way. This chapter describes the analog values for all the measuring and/or output ranges you can use with your S7-300 analog modules.
4-2
Analog Modules
4.1.1
The CPU processes the analog values in binary form only. Analog input modules convert the analog process signal into digital form. Analog output modules convert the digital output value into an analog signal.
The digitized analog value is the same for both input and output values having the same nominal range. The analog values are represented as twos complement. Table 4-1 shows how the analog values of the analog modules are represented:
Table 4-1
Sign
The sign (S) of the analog value is always in bit number 15:
S 0 ) S 1 *
Resolutions of Less than 15 Bits If the resolution of an analog module has fewer than 15 bits, the analog value is entered left-justified in the accumulator. The lower-order bit positions not used are padded with zeros (0). Table 4-2 contains a bit pattern to show you how to write zeros (0) into the unassigned bit positions for a resolution with fewer than 15 bits.
Table 4-2 Bit Pattern of a 15-Bit and a 12-Bit Analog Value (Example) Analog Value 15 0 0 0 14 1 1 1 13 0 0 0 12 0 0 0 11 0 0 0 10 1 1 1 9 1 1 1 8 0 0 0 7 0 0 0 6 1 1 0 5 1 1 0 4 1 1 0 3 0 0 0 2 0 0 0 1 1 0 0 0 1 0 0
Resolution Number of bits 15-bit analog value (+ S) 12-bit analog value (+ S) 8-bit analog value (+ S)
4-3
Analog Modules
4.1.2
Introduction
The tables in this chapter contain the digitized analog values for the various measuring ranges of the analog modules. Table 4-3 shows you the binary representation of the analog values and the associated decimal and hexadecimal notation of the units of the analog values.
Tables 4-4 to 4-15 contain the digitized analog values for the various measuring ranges. Since the binary representation of the analog values is always the same, these tables only contain the measured values and the units. This makes the tables clearer and easier to read. You will find the binary representations corresponding to the measured values in Table 4-3.
Measured-Value Resolution
The resolution of the analog values may vary, depending on the analog module and the parameters assigned to it. For the resolutions < 15 bits, the bits marked with an x are set to 0. Note: This resolution does not apply to temperature values. The converted temperature values are the result of a conversion in the analog module (see Tables 4-8 to 4-15).
Table 4-3
Possible Resolutions of the Analog Values Units Decimal 128 64 32 16 8 4 2 1 Hexadecimal 80H 40H 20H 10H 8H 4H 2H 1H Analog Value High-Order Byte S0000000 S0000000 S0000000 S0000000 S0000000 S0000000 S0000000 S0000000 Low-Order Byte 1xxxxxxx 01xxxxxx 001xxxxx 0001xxxx 00001xxx 000001xx 0000001x 00000001
Resolution in Bits (+ S) 8 9 10 11 12 13 14 15
4-4
Analog Modules
Table 4-4 shows the representation of the digitized measured value for the voltage measuring ranges " 80 mV, " 250 mV, " 500 mV, " 1 V, "2.5 V.
Representation of the Digitized Measured Value of an Analog Input Module (Voltage Ranges) Measuring Range " 250 mV > 293.97 293.97 : 250.01 250.00 187.50 : 187.50 250.00 250.01 : 293.98 < 293.98 Measuring Range " 500 mV > 587.94 587.94 : 500.02 500.00 375.00 : 375.00 500.00 500.02 : 587.96 < 587.96 Measuring Range "1V > 1.175 1.175 : 1.00004 1.000 0.750 : 0.750 1.000 1.00004 : 1.175 < 1.175 Measuring Range " 2.5 V > 2.9397 2.9397 : 2.5001 2.500 1.875 : 1.875 2.500 2.5001 : 2.93398 < 2.93398 : 20736 27648 27649 : 32512 32768 Units Decimal 32767 32511 : 27649 27648 20736 : AF00H 9400H 93FFH : 8100H 8000H Underflow Underrange Hexadecimal 7FFFH 7EFFH : 6C01H 6C00H 5100H Nominal range Overrange Range Overflow
4-5
Analog Modules
S for the voltage measuring ranges " 5 V, " 10 V and S for the current measuring ranges " 10 mA, " 3.2 mA, " 20 mA.
Table 4-5
Representation of the Digitized Measured Value of an Analog Input Module (Voltage and Current Measuring Ranges) Measuring Range " 10 V " 10 mA > 11.7589 11.7589 : 10.0004 10.00 7.50 : 7.50 10.00 10.0004 : 11.759 < 11.759 Measuring Range " 3.2 mA > 3.7628 3.7628 : 3.2001 3.200 2.400 : 2.400 3.200 3.2001 : 3.7629 < 3.7629 Measuring Range " 20 mA > 23.515 23.515 : 20.0007 20.000 14.998 : 14.998 20.000 20.0007 : 23.516 < 23.516 Units Decimal 32767 32511 : 27649 27648 20736 : 20736 27648 27649 : 32512 32768 Hexadecimal 7FFFH 7EFFH : 6C01H 6C00H 5100H : AF00H 9400H 93FFH : 8100H 8000H Underflow Underrange Nominal range Overrange Overflow Range
Measuring Range "5V > 5.8794 5.8794 : 5.0002 5.00 3.75 : 3.75 5.00 5.0002 : 5.8796 < 5.8796
4-6
Analog Modules
S for the voltage measuring ranges 1 to 5 V and S for the current measuring ranges 0 to 20 mA, 4 to 20 mA.
Table 4-6
Representation of the Digitized Measured Value of an Analog Input Module (Voltage and Current Measuring Ranges) Measuring Range 0 20 mA A Measuring Range 4 t 20 mA A to Units Decimal 32767 32511 : 27649 27648 20736 : 0 1 : 4864 32768 Hexadecimal 7FFFH 7EFFH : 6C01H 6C00H 5100H : 0H FFFFH : ED00H 8000H Underflow Underrange Nominal range Overrange Overflow Range
Measuring Range 1t 5V to
> 5.7036 5.7036 : 5.0001 5.000 4.000 : 1.000 0.9999 : 0.2963 < 0.2963
> 23.515 23.515 : 20.0007 20.000 14.998 : 0.000 -0.0007 : 3.5185 <3.5185
> 22.810 22.810 : 20.0005 20.000 16.000 : 4.000 3.9995 : 1.1852 < 1.1852
4-7
Analog Modules
Table 4-7 shows the representation of the digitized measured value for resistance-type sensors with the measuring ranges 150 , 300 and 600 .
Representation of the Digitized Measured Value of an Analog Input Module (Resistance-Type Sensors) Measuring Range 300 > 352.767 352.767 : 300.011 300.000 225.000 : 0.000 Measuring Range 600 > 705.534 705.534 : 600.022 600.000 450.000 : 0.000 Units Decimal 32767 32511 : 27649 27648 20736 : 0 1 : 4864 Hexadecimal 7FFFH 7EFFH : 6C01H 6C00H 5100H : 0H FFFFH : ED00H 8000H Underflow Underrange Nominal range Overrange Overflow Range
32768
4-8
Analog Modules
Table 4-8 shows the representation of the digitized measured value for the standard temperature range of the Pt 100 sensor.
Table 4-8 Representation of the Digitized Measured Value of an Analog Input Module (Standard Temperature Range, Pt 100) Decimal Hexadecimal Range
Standard Temperature Range Pt 100 850 _C > 1000.0 1000.0 : 850.1 850.0 : 200.0 200.1 : 243.0 < 243.0
Overflow Overrange
Nominal range
Underrange Underflow
Table 4-9 shows the representation of the digitized measured value for the climate temperature range of the Pt 100 sensor.
Table 4-9 Representation of the Digitized Measured Value of an Analog Input Module (Climate Temperature Range, Pt 100) Decimal Hexadecimal Range
Climate Temperature Range Pt 100 130 _C > 155.00 155.00 : 130.01 130.00 : 120.00 120.01 : 145.00 < 145.00
Overflow Overrange
Nominal range
Underrange Underflow
4-9
Analog Modules
Table 4-10 shows the representation of the digitized measured value for the standard temperature range of the Ni 100 sensor.
Table 4-10 Representation of the Digitized Measured Value of an Analog Input Module (Standard Temperature Range, Ni 100) Decimal Hexadecimal Range
Standard Temperature Range Ni 100 250 _C >295.0 295.0 : 250.1 250.0 : 60.0 60.1 : 105.0 < 105,0
Overflow Overrange
Nominal range
Underrange Underflow
Table 4-11 shows the representation of the digitized measured value for the climate temperature range of the Ni 100 sensor.
Table 4-11 Representation of the Digitized Measured Value of an Analog Input Module (Climate Temperature Range, Ni 100) Decimal Hexadecimal Range
Climate Temperature Range Ni 100 250 _C >295.00 295.00 : 250.01 250.00 : 60.00 60.01 : 105.00 < 105.00
Overflow Overrange
Nominal range
Underrange Underflow
4-10
Analog Modules
Table 4-12 shows the representation of the digitized measured value for the temperature range, sensor type K.
Table 4-12 Representation of the Digitized Measured Value of an Analog Input Module (Temperature Range, Type K) Decimal Hexadecimal 7FFFH 3FSCH : 35A2H 3598H : F574H <F574H Underrange Nominal range Overrange Range
Overflow
In the case of incorrect wiring (e. g. polarity reversal or open inputs) or of a sensor error in the negative range (e. g. incorrect thermocouple type), the analog input module signals underflow below F0C5H and outputs 8000H.
Table 4-13 shows the representation of the digitized measured value for the temperature range, sensor type N.
Table 4-13 Representation of the Digitized Measured Value of an Analog Input Module (Temperature Range, Type N) Decimal Hexa decimal 7C8CH 3C8CH : 32D2H 32C8H : F574H <F574H Underrange Nominal range Overrange Range
Overflow
In the case of incorrect wiring (e. g. polarity reversal or open inputs) or of a sensor error in the negative range (e. g. incorrect thermocouple type), the analog input module signals underflow below F0C5H and outputs 8000H.
4-11
Analog Modules
Table 4-14 shows the representation of the digitized measured value for the temperature range, sensor type J.
Table 4-14 Representation of the Digitized Measured Value of an Analog Input Module (Temperature Range, Type J) Decimal Hexadecimal 7FFFH 38A4H : 2EEAH 2EE0H : F7CCH <F7CCH Underrange Nominal range Overrange Range
Overflow
In the case of incorrect wiring (e. g. polarity reversal or open inputs) or of a sensor error in the negative range (e. g. incorrect thermocouple type), the analog input module signals underflow below F0C5H and outputs 8000H.
Table 4-15 shows the representation of the digitized measured value for the temperature range, sensor type E.
Table 4-15 Representation of the Digitized Measured Value of an Analog Input Module (Temperature Ranges, Type E) Decimal Hexadecimal 7FFFH 2EE0H : 271AH 2710H : F574H <F574H Underrange Nominal range Overrange Range
Overflow
In the case of incorrect wiring (e. g. polarity reversal or open inputs) or of a sensor error in the negative range (e. g. incorrect thermocouple type), the analog input module signals underflow below F0C5H and outputs 8000H.
4-12
Analog Modules
Table 4-16 shows the representation of the digitized measured value for the temperature range, sensor type L.
Table 4-16 Representation of the Digitized Measured Value of an Analog Input Module (Temperature Range, Type L) Decimal Hexadecimal 7FFFH 2CECH : 2332H 2328H : F830H <F830H Underrange Nominal range Overrange Range
Overflow
In the case of incorrect wiring (e. g. polarity reversal or open inputs) or of a sensor error in the negative range (e. g. incorrect thermocouple type), the analog input module signals underflow below F0C5H and outputs 8000H.
The analog input/output module SM 334; AI 4/AO 2 8/8 Bit has the measuring ranges 0 to 10 V and 0 to 20 mA. In contrast to other analog modules, however, the analog input/output module SM 334 has a lower resolution and no negative measuring ranges. Please observe this when reading Tables 4-5 and 4-6.
4-13
Analog Modules
4.1.3
Tables 4-17 and 4-18 show the analog output ranges of the analog output module.
Table 4-17 shows the representation of the voltage output ranges 0 to 10 V, 1 to 5 V and " 10 V.
Representation of the Analog Output Range of the Analog Output Modules (Voltage Output Ranges) Output Range 1 to 5 V 0 5.8794 : 5.0002 5.0000 : 1.0000 :0.9999 0 0 : Output Range " 10 V 0 11.7589 : 10.0004 10.0000 : 0 Units Decimal >32511 32511 : 27649 27648 : 0 : 6912 6913 : 10.0000 10.0004 : 11.7589 0 27648 27649 : 32512 < 32512 Hexadecimal >7EFFH 7EFFH : 6C01H 6C00H : 0H : E500H E4FFH : 9400H 93FFH : 8100H <8100H Underflow Underrange Nomial range Overrange Overflow Range
4-14
Analog Modules
Table 4-18 shows the representation of the current output ranges 0 to 20 mA, 4 to 20 mA and " 20 mA.
Representation of the Analog Output Range of the Analog Output Modules (Current Output Ranges) Output Range 4 to 20 mA 0 22.81 : 20.005 20.000 : 4.000 3.9995 0 0 : 0 Output Range " 20 mA 0 23.515 : 20.0007 20.000 Units Decimal >32511 32511 : 27649 27648 : 0 : 6912 6913 : 20.000 27648 27649 : 23.515 0 : 32512 < 32512 Hexadecimal >7EFFH 7EFFH : 6C01H 6C00H : 0H : E500H E4FFH : 9400H 93FFH : 8100H <8100H Underflow Underrange Nominal range Overrange Overflow Range
The analog input/output module SM 334; AI 4/AO 2 8/8 Bit has the output ranges 0 to 10 V and 0 to 20 mA. In contrast to other analog modules, however, the analog input/output module SM 334 has a lower resolution and no overranges. Please observe this when reading Tables 4-17 and 4-18.
4-15