Overview
Compute the arithmetic mean of two PT100 resistance-temperature detectors on a Siemens LOGO! 8 base module with an AM2 RTD expansion. The default PT100 input block on the AM2 locks Gain and Offset, which limits the resolution of downstream math and blocks direct averaging at the smallest integer step. The workaround documented here puts the AM2 input into No sensor mode and applies a two-amplifier cascade to restore 0.25 °C resolution, then computes (A3 + A4) / 2 with a comparator (subtractor) and a divide-by-two amplifier.
The approach is field-proven for solar heating control and any 2-zone average temperature application. It applies to LOGO! 0BA7 and 0BA8 base modules with the AM2 RTD (catalog 6ED1055-1MD00-0BA2) or any AM2 RTD variant that supports PT100/PT1000. The technique extends to PT1000 with adjusted integer range and to NTC sensors by replacing the scaling constants.
Prerequisites
- LOGO! 8 base module (0BA7 or later) with a free AM2 slot on the I/O bus
- AM2 RTD expansion (Siemens 6ED1055-1MD00-0BA2 or equivalent)
- Two PT100 Class A or Class B sensors, 100.00 Ω at 0 °C, α = 0.00385 /°C per IEC 60751
- LOGO!Soft Comfort V8.x for programming and offline simulation
- Twisted, shielded 3-wire cable per sensor (recommended for runs longer than 2 m)
- 24 V DC power supply, properly grounded at the LOGO! PE terminal
- Wire ferrules, screwdriver, calibration source (precision decade or 100.00 Ω reference)
AM2 RTD Module and PT100 Wiring
The AM2 RTD accepts two input channels. Each channel uses three terminals: U+, U-, and M+. The M terminal is the sense return used for 3-wire RTD connection to cancel lead resistance. Use 3-wire PT100 whenever the cable run exceeds 2 m; use 2-wire only for short pigtail leads terminated at the AM2 block.
Standard 3-wire PT100 color code (per IEC 60751 and the Texas Instruments SBAA275 RTD measurement guide):
- Two red leads (one current injection, one voltage sense, both connected to the same element side) → U+ and U+ on the AM2 terminal pair
- One white lead (the second voltage sense on the opposite element side) → M+ on the AM2 terminal pair
AM2 terminal assignments (per the Siemens LOGO! 8 System Manual, entry ID 109751654):
- Channel 1: U1+ (terminal 1), U1- (terminal 2), M1+ (terminal 3)
- Channel 2: U2+ (terminal 4), U2- (terminal 5), M2+ (terminal 6)
Tie the cable shield to ground at the LOGO! PE terminal only, not at the sensor end, to avoid ground loops. Route the RTD cable at least 200 mm away from VFD output cables and any 230 V AC wiring to reject coupled noise. For runs longer than 10 m, specify 4-wire PT100 and tie one sense lead to the U- terminal on the AM2 (the AM2 accepts 4-wire by design).
PT100 Sensor Physics
A PT100 is a platinum resistance thermometer with 100.00 Ω at 0 °C and a near-linear positive temperature coefficient of approximately 0.385 Ω/°C. The Callendar-Van Dusen equation (covered in TI SBAA275) defines the resistance-temperature relationship. For temperatures above 0 °C:
R(T) = R0 · (1 + A·T + B·T²)
with A = 3.9083 × 10⁻³ °C⁻¹, B = -5.775 × 10⁻⁷ °C⁻², and R0 = 100 Ω. A 0.25 °C step at 0 °C equals 0.0963 Ω, well within the AM2 RTD's measurement resolution. The Fluke PT100 calculator converts any resistance across the 18.52 Ω (-200 °C) to 390.48 Ω (+850 °C) span to the equivalent temperature per IEC 60751.
Class A tolerance is ±(0.15 + 0.002·|T|) °C, Class B is ±(0.30 + 0.005·|T|) °C. For solar heating where 1 °C error is acceptable, Class B is the typical choice. Specify 4-wire PT100 if the cable is longer than 10 m or if sub-0.5 °C accuracy is required.
Why the Default PT100 Input Block Limits You
When the AM2 input is configured to PT100 in LOGO!Soft Comfort, the Gain and Offset fields are greyed out. The block internally hardcodes Gain = 2.5 and Offset = -500 to map the raw 0-1000 input span to -500 to +2000, which the PT100 view formats as -50.0 °C to +200.0 °C. The internal integer step is 1 count = 0.25 °C, which is the best resolution the AM2 RTD provides.
The problem surfaces the moment you route that signal into a downstream arithmetic block. A single amplifier with Gain = 0.5 to compute the mean produces 1250 (representing 125.0 °C for a 250.0 °C average) — but if the two source values differ by an odd number of 0.25 °C counts, the half-step is lost and the output granularity degrades to 0.5 °C. The fixed-point integer engine in the LOGO! truncates the lower bit whenever the cascade multiplies or divides.
Switching the AM2 input block to No sensor mode exposes the Gain and Offset parameters. The raw 0-1000 input value (which the AM2 RTD hardware still produces internally across -50 °C to +200 °C) is now available at the analog input pin without the block-level scaling. You regain the ability to apply user scaling and to preserve 0.25 °C resolution through downstream math by inserting your own gain stages.
Workaround Architecture
The signal flow is:
- AM2 input AI1 (raw 0-1000) → Amplifier 1 (Gain = 10, Offset = 0) → intermediate 0-10000
- Intermediate → Amplifier 2 (Gain = 2.5, Offset = -5000) → final -5000 to +20000
- Final value formatted with 2 decimal places = -50.00 °C to +200.00 °C
- Repeat steps 1-2 for AI2 to produce the second temperature in the same scale
- Invert one scaled value with a Gain = -1 amplifier, add the two with a comparator, then divide by 2 with a final amplifier to obtain (A1 + A2) / 2
The cascade is necessary because a single amplifier cannot reach the required scale factor of 25 with sufficient offset (-5000) without overflowing the LOGO! amplifier block's 16-bit signed integer range. Splitting the gain into 10 × 2.5 = 25 keeps the intermediate value in 0-10000, well inside the integer headroom, and avoids the rounding observed when the gain and offset are collapsed into a single block.
For the mean, use a comparator block with Ax = scaled AI1 and Ay = scaled AI2 routed through a Gain = -1 amplifier to invert the sign. The comparator output becomes (A1 - (-A2)) = (A1 + A2). The final amplifier with Gain = 0.5 produces (A1 + A2) / 2.
Step-by-Step Configuration
Step 1: Configure the AM2 inputs
In LOGO!Soft Comfort, double-click the AM2 input block on the network. For both AI1 and AI2, set:
- Sensor type: No sensor
- Smoothing: 2 (default; equivalent to a first-order low-pass with τ ≈ 2 AM2 cycles ≈ 100 ms)
The input pin now exposes the raw 0-1000 RTD-converted value. This is the same value the PT100 mode would have scaled internally; you have simply taken ownership of the scaling chain.
Step 2: Insert the first amplifier for AI1
Drop an Analog Amplifier block on AI1. Configure:
- Gain:
10.00 - Offset:
0 - Output range: -10000 to +20000 (allow the integer range to cover the cascade)
The output represents 0 to 10000, formatted with 1 decimal place as 0.0 to 1000.0. This is a pre-scaling stage and is not yet a temperature. Its sole purpose is to multiply the 0-1000 raw value into the 0-10000 range so the second amplifier has more integer headroom for the offset subtraction.
Step 3: Insert the second amplifier for AI1
Route the output of the first amplifier into a second Analog Amplifier. Configure:
- Gain:
2.50 - Offset:
-5000 - Output range: -5000 to +20000
- Display format: 2 decimal places (configure in the LOGO! display message block, not in the amplifier)
The output represents -50.00 °C to +200.00 °C with 0.25 °C integer resolution. Display this value in a LOGO! display message or push it to a tag for the SCADA layer.
Step 4: Repeat for AI2
Duplicate the two-amplifier cascade on AI2 with identical Gain and Offset values. The second temperature value is now in the same scale as the first.
Step 5: Compute the mean
Drop a Gain = -1 amplifier on the scaled AI2 value to invert its sign. Then drop a Comparator block configured as a subtractor:
- Function: A > B (used here purely for the arithmetic output, not the threshold)
- Ax: scaled AI1 (output of the second amplifier on channel 1)
- Ay: scaled AI2 routed through the Gain = -1 amplifier
- Threshold: 0 (unused in arithmetic mode)
The comparator output is (A1 + A2). Route this into a final Analog Amplifier with Gain = 0.5. The result is (A1 + A2) / 2 with 0.25 °C resolution. On 0BA7 or later firmware, the entire cascade can be replaced by a single Math Instruction block with the formula (Ax + Ay) / 2, where Ax and Ay are the two scaled temperature values.
Step 6: Optional digital filter
For solar heating, the temperature changes slowly. Apply an additional analog amplifier with Gain = 0.1 followed by a hysteresis comparator to attenuate noise and debounce downstream switching. If the application requires faster response (e.g., a 95 °C safety cutout), reduce the AM2 smoothing from 2 to 1 to minimize lag.
Commissioning and Verification
With the program loaded and the LOGO! in RUN:
- Disconnect the PT100 from AI1 and short-circuit the U1+ and U1- terminals at the AM2. The scaled value should read approximately -50.00 °C (the AM2 may report 0 counts and the cascade will produce -5000 = -50.00 °C). If the value is +200.00 °C, reverse the input polarity.
- Connect a 100.00 Ω precision decade in place of the PT100. The display should read 0.00 °C ± 0.25 °C. The LOGO! AM2 RTD does not expose a user calibration offset, so for sub-0.25 °C accuracy apply a software correction with a final amplifier offset.
- Connect a 138.51 Ω decade (representing 100 °C per IEC 60751). The display should read 100.00 °C ± 0.5 °C. The combined error is the AM2 RTD error (±0.5 °C typical) plus the amplifier cascade quantization (±0.25 °C).
- Repeat steps 1-3 for AI2.
- Verify the mean by setting both sensors to identical temperatures. The mean value should match the input within ±0.25 °C. Then offset the sensors by 0.5 °C (one at 100.00 Ω, the other at 100.00 Ω + 0.193 Ω ≈ 0.5 °C) and confirm the mean shifts by 0.25 °C, not 0.5 °C. If the shift is 0.5 °C, the cascade is collapsing the lower bit and you must split the mean computation across two stages.
- Verify the mean is symmetric: swap the two sensor connections and confirm the mean does not change.
LOGO!Soft Comfort Simulation Caveats
The LOGO!Soft Comfort offline simulator does not model the AM2 RTD hardware. The AI1 and AI2 input pins in simulation accept any integer in the 0-1000 range, but if you have wired the first amplifier with Gain = 10 and Offset = 0, you can drive the input directly with 0-1000 in simulation and the cascade works. If the simulator forces the input pin to clamp at 0-1000 regardless of the simulation signal, use an analog flag (M flag) or a numeric constant in the input slot to drive the test.
The 2-amplifier cascade does not have a separate parameter for input range in the AM2 block; the simulator uses the AM2's No sensor range, which is 0-1000 for the integer value. Driving the simulation input with negative values is permitted and will be reflected through the cascade as expected. The simulator also does not enforce the AM2 update time, so cascade response is instantaneous — confirm timing behavior on the real hardware.
Troubleshooting Matrix
| Symptom | Probable cause | Fix |
|---|---|---|
| AI1 reads -50.00 °C regardless of sensor | Open circuit / broken sensor lead | Check wiring; verify 100 Ω at the AM2 terminals with the sensor disconnected |
| AI1 reads +200.00 °C regardless of sensor | Sensor shorted or wiring reversed | Reverse U+ and U- leads; check for shorts between conductors |
| AI1 value jumps ±1 °C randomly | Electrical noise coupled into RTD leads | Use shielded twisted pair, ground shield at LOGO! PE only; increase AM2 smoothing from 2 to 8 |
| Mean value is half of expected | Wrong sign on the Gain = -1 inverter | Verify comparator Ax and Ay wiring; in simulation step the inputs by +1 and confirm direction |
| Mean value matches neither input | Comparator in threshold mode instead of arithmetic subtractor | Use a Math Instruction block on 0BA7+ or rebuild with the amplifier cascade |
| AI1 reads integer multiples of 0.5 °C only | Cascade missing the second amplifier, or Gain set wrong | Verify first amp Gain = 10, second amp Gain = 2.5; do not collapse into one stage |
| LOGO!Soft Comfort simulator shows --- on AI1 | AM2 not detected in the I/O configuration | Add the AM2 RTD in the hardware catalog, drag it to the bus, and re-download the program |
| AI1 value drifts over time | Self-heating of the PT100 element from excitation current | Reduce AM2 smoothing to 1; verify excitation current is 1 mA or less per IEC 60751 |
| Mean value correct at room temp, wrong at high temp | AM2 RTD input exceeds +200 °C and saturates | Verify the process temperature is within the AM2 range; if not, use a transmitter with 4-20 mA output |
| AI1 value frozen at -5000 regardless of sensor resistance | AM2 RTD module not seated properly or firmware mismatch | Power-cycle the LOGO!; check the AM2 firmware version in the device web server matches the LOGO!Soft Comfort project |
Specifications and Limits
| Parameter | Value |
|---|---|
| AM2 RTD catalog number | 6ED1055-1MD00-0BA2 |
| AM2 input channels | 2 (AI1, AI2) |
| Supported RTD types | PT100, PT1000 (Ni1000 optional via firmware) |
| Temperature range (PT100) | -50 °C to +200 °C (250 °C span) |
| Native resolution | 0.25 °C (1 count per LSB) |
| AM2 RTD accuracy at 25 °C ambient | ±0.5 °C typical, ±1.0 °C max |
| RTD connection | 2-wire or 3-wire (4-wire supported by tying one sense to U-) |
| Excitation current | ≈ 1 mA (per IEC 60751 self-heating limit) |
| AM2 update time per channel | ≈ 50 ms |
| LOGO! cycle time | ≈ 8-20 ms typical, depends on program |
| Cascade output range | -5000 to +20000 integer |
| Final display format | -50.00 °C to +200.00 °C (2 decimal places) |
| Cascade math resolution | 0.25 °C (1 count per LSB after the divide by 2) |
| Mean computation blocks required | 4 amplifiers + 1 comparator (or 1 math instruction on 0BA7+) |
| Maximum lead resistance (3-wire) | 10 Ω per lead (per AM2 datasheet) |
| Operating temperature (AM2 module) | 0 °C to +55 °C |
PT1000 Variant
For PT1000 sensors the AM2 RTD applies a 10× higher resistance measurement, which does not change the temperature calculation but does change the integer range. The cascade becomes Gain = 10 / Gain = 0.25 / Offset = -500, producing -500 to +2000 (-50.0 °C to +200.0 °C) with 1 decimal place. For 0.25 °C resolution on PT1000, add a third amplifier with Gain = 4 before the final divide-by-2. The reference resistance of 1000.00 Ω at 0 °C and the same α = 0.00385 /°C apply per IEC 60751.
Why does the AM2 PT100 block hide Gain and Offset?
Siemens hardcodes Gain = 2.5 and Offset = -500 in the PT100 mode so the displayed value matches the temperature directly. The lockout prevents user error but also prevents you from doing your own scaling. Select No sensor mode to expose both parameters and take ownership of the scaling chain.
Can I use one amplifier block with Gain = 25 instead of the cascade?
Mathematically yes, but the LOGO! amplifier block uses 16-bit signed integer math. A single-stage Gain = 25 with Offset = -5000 leaves no headroom for the negative half of the offset and rounds the result. The two-stage 10 × 2.5 cascade keeps the intermediate value in 0-10000, well inside the integer range, and preserves 0.25 °C resolution through the divide-by-2 mean computation.
Does the workaround work on LOGO! 0BA6 or earlier?
Yes, with a caveat. The amplifier + comparator cascade is supported on 0BA6 and earlier. The Math Instruction block (one-block (Ax + Ay) / 2) requires 0BA7 or later firmware. On 0BA6 you must build the mean from the explicit two-amplifier + comparator chain as described in Step 5.
What smoothing value should I use on the AM2 input?
For solar heating with slow temperature changes, use smoothing = 8 (the LOGO! default low-pass equivalent to ~8-cycle exponential average). For faster response (e.g., a safety cutout at 95 °C), use smoothing = 2. The AM2 update time is 50 ms per channel, so smoothing = 2 introduces about 100 ms of lag; smoothing = 8 introduces 400 ms.
How do I expand this to 4 or more PT100 sensors?
Add a second AM2 RTD module to the bus (each AM2 takes 2 channels) and repeat the two-amplifier cascade on AI3 and AI4. For the mean of 4 sensors, sum them with a chain of comparators in add mode, then divide by 4 with two cascaded Gain = 0.5 amplifiers. On 0BA7+ firmware, a single Math Instruction block with (Ax + Ay + Az + Aw) / 4 replaces the comparator chain.