Overview: 0-10V Tank Level on LOGO!
A capacitive, ultrasonic, or hydrostatic level sensor that outputs 0-10 VDC is one of the most common analog signal sources encountered with a Siemens LOGO! logic module. The base unit and the analog expansion modules expose this range natively on AI1-AI4, and LOGO! Soft Comfort contains every math and display primitive required to convert the raw voltage into a 0-100 % fill reading, a bargraph, and an alarm message — without an external scaling resistor, a signal conditioner, or a separate HMI panel.
This reference walks through the complete path from wiring a level sensor on the LOGO! base unit's analog input to displaying a clean percentage value with a horizontal bargraph on the LOGO! built-in display. The 0BA6 (LOGO! 6) generation is the example, but the same procedure applies to 0BA7, 0BA8, and 0BA8.3 with the differences called out in a dedicated section. Official background reading is available on the Siemens LOGO! product page and the Siemens Industry Online Support portal.
Prerequisites
Before writing code, confirm the correct hardware, firmware, and software are on the bench:
- LOGO! base module with 0-10 V analog inputs (any 12/24 V logic variant). Siemens part numbers 6ED1052-1xxxxx and 6ED1052-2xxxxx cover the 0BA6 through 0BA8.3 generations.
- Level sensor with 0-10 VDC output. A 4-wire device (separate supply and signal) is preferred over a 3-wire to avoid ground loops.
- LOGO! Soft Comfort matching the base unit generation: V8.x for 0BA8/0BA8.3, V7.x for 0BA7, V6.x for 0BA6. A program authored in V8.4 can be downgraded, but matching the version avoids parameter-set warnings at download time.
- PC-to-LOGO! cable — Ethernet (RJ45) on 0BA8 and later, or the LOGO! PC cable (6ED1057-1AA00-0BA0, USB-to-RS232) on 0BA6/0BA7.
LOGO! Hardware Generations and Analog Input Specifications
Siemens has released four LOGO! generations that the field will still see in active panels. Analog input performance differs more than the brochures suggest, and a 1 % discrepancy between an older and a newer panel is almost always an ADC-resolution issue, not a wiring issue.
| Generation | Market name | Onboard AI | AI resolution | Display | Ethernet / Web |
|---|---|---|---|---|---|
| 0BA6 | LOGO! 6 | 2 × 0-10 V (AI1, AI2) | 10 bit (0-1000) | 6 lines × 16 chars, monochrome | No |
| 0BA7 | LOGO! 7 | 2 × 0-10 V (AI1, AI2) | 10 bit (0-1000) | 6 lines × 16 chars, monochrome | No |
| 0BA8 | LOGO! 8 | 4 × 0-10 V (AI1-AI4) | 12 bit (0-4095 internal, 0-1000 displayed) | 6 lines × 16 chars, backlit | Yes |
| 0BA8.3 | LOGO! 8.3 | 4 × 0-10 V (AI1-AI4) | 12 bit (0-4095 internal) | 6 lines × 16 chars, backlit | Yes (enhanced) |
AM2 analog modules (6ED1055-1MA00-0BA0 family) add two more channels at 0-10 V or 0/4-20 mA, with the same per-channel 10-bit resolution on 0BA6/0BA7 and 12-bit on 0BA8+. AM2 PT100 (6ED1055-1MD00-0BA0) is RTD-only and cannot be reconfigured to 0-10 V, so it is the wrong module for a voltage-output level probe.
Sensor Selection and 0-10V Wiring
Three sensor families dominate the 0-10 V tank-level use case:
- Hydrostatic submersible probes — natively 4-20 mA. A 250 Ω precision resistor at the LOGO! input converts to 1-5 V. For a true 0-10 V output, buy the 0-10 V variant or add a loop-powered 4-20 mA → 0-10 V signal conditioner (Phoenix Contact MINI MCR, WAGO 857, or similar).
- Capacitive rod probes with integrated 0-10 V transmitter head (Rechner, IFM, Balluff). 3- or 4-wire; supply usually 18-30 VDC.
- Ultrasonic distance sensors above the tank (Sick UM, ifm, Banner) configured for 0-10 V over the full tank height. These are inverted in software (full = 0 V, empty = 10 V) — see the offset section below.
Wiring rules that prevent 80 % of field callbacks:
- Use a twisted, shielded pair for the sensor cable. Ground the shield at the LOGO! panel end only.
- Route the analog cable at least 200 mm away from VFD output cables and relay contactor coils.
- Connect the sensor's signal ground to the LOGO! M terminal (terminal 7 on the base unit, labeled "M" or "GND"). On AM2 modules the equivalent terminals are labeled M1 and M2 — one per channel, internally tied to LOGO! 0 V.
- Do not ground the sensor signal at both ends. Two ground references will inject 50/60 Hz common-mode noise at the LOGO! ADC and the bargraph will visibly breathe at the line frequency.
Understanding the Scaling Math (0-10V → 0-100 %)
The LOGO! ADC returns an integer in the range 0-1000 for the 0-10 V span on every generation. To convert that into a percentage that can drive a bargraph with 100 segments and a numeric display, the multiplication is trivial:
Percent = ADC_value × 0.1 or, in amplifier form, Percent = Gain × ADC_value + Offset
Both are equivalent here because the natural span is 0-10 V → 0-100 % with no zero-suppression. The amplifier block parameters are Gain = 0.1 and Offset = 0. If the sensor is an ultrasonic that produces 10 V at empty and 0 V at full, the bargraph can be inverted in the display block, or the gain can be set to -0.1 and the offset to 100 (yielding 100 - 0.1 × ADC_value).
If the sensor needs zero-suppression (e.g., 1 V = 0 % tank height, 9 V = 100 %), the engineering is:
Percent = (ADC_value - 100) × 0.125
The Amplifier block in LOGO!Soft Comfort performs the linear transform y = A × x + B directly. The values can be entered as floats; the result is stored in a real-valued tag that the message text block can format with 0 decimal places by default, or 1 decimal place if 0.1 % resolution is desired. Internally the result is a 16-bit signed integer with the range -32768 to +32767, which is also the range the bargraph will accept as its source value.
Step-by-Step: Build the LOGO! Program in LOGO! Soft Comfort
- Open LOGO!Soft Comfort and select the matching base unit in the hardware catalog. For a 0BA6 with onboard 0-10 V AI, drag the "LOGO! 12/24RCE" or "LOGO! 24CE" into the diagram.
-
Add an Analog Input block (Inputs/Outputs → Analog → Analog Input). Assign it to
AI1. The block exposes a real-valued tag namedAI1(or the user-defined name). -
Add an Amplifier block (Analog → Analog Amplifier, block identifier "B001" or similar). Wire
AI1to its input. Set:- Gain = 0.1 (or 10 — see note below)
- Offset = 0
- Sensor type: 0-10 V (default on the amplifier block)
- Verify the math with the simulation tool. LOGO!Soft Comfort V6.1+ includes an on-screen simulation; in the simulator view, drag AI1 to 0.00 V and confirm the amplifier output reads 0. Drag to 10.00 V and confirm 100.0.
- Add a Message Text block (Special → Message Text). On 0BA6/0BA7 this is in the "Special functions" palette; on 0BA8/0BA8.3 it is in the same location with additional parameters.
- Insert the bargraph inside the message text by enabling the "Bargraph" property and binding it to the amplifier output tag. The bargraph width, orientation, and color depend on the generation; see the next section.
-
Add a second message text for the numeric percentage. Use the token
[Amp_Out]or whatever the amplifier output tag is named. The default format renders 3 significant figures; choose "1 decimal place" for engineering readability. - Wire the message text enable to a constant "1" (always on), or to a digital input if you want a button to toggle the screen.
- Download to the LOGO! via the LOGO! → PC connection dialog. On 0BA8/0BA8.3 this is over Ethernet; on 0BA6/0BA7 the USB PC cable is used.
- Switch the LOGO! into RUN mode and confirm the on-board display shows the bargraph and percentage. If the LOGO! is in STOP, the display shows "No Program" — that is normal and means the download is queued or failed.
Configuring the Message Text Block (Bargraph + Numeric)
On every generation the Message Text block supports the following layout primitives:
| Parameter | 0BA6 / 0BA7 | 0BA8 / 0BA8.3 |
|---|---|---|
| Maximum message texts | 30 | 50 |
| Lines per message text | 6 | 6 |
| Characters per line | 16 | 16 (Latin) / 8 (Asian wide char) |
| Concurrent visible messages | 4 | 4 (priority selectable) |
| Bargraph orientation | Horizontal, fills L→R | Horizontal L→R or R→L |
| Bargraph source | Analog value (0-1000) | Analog or real-valued tag (0-32767) |
| Bargraph colors | Monochrome only | Red / Yellow / Green thresholds |
Recommended message-text layout for a tank level display:
Line 1: TANK LEVEL
Line 2: [Bargraph: Amp_Out, 0-100, 16 chars wide]
Line 3: [Amp_Out] %
Line 4: Empty Full
Line 4 uses the "tick mark" mode of the bargraph to render an analog scale. On 0BA8 and later you can also switch Line 2 to a red bar for 80-100 % to flag an overfill risk without a second bargraph block.
If the LOGO! is the only HMI on the machine, also wire two Analog Threshold Trigger blocks to the same amplifier output:
- Trigger 1: ON at > 20 % (low-level alarm), latch with hysteresis 5 %
- Trigger 2: ON at > 90 % (high-level alarm), latch with hysteresis 2 %
Each threshold trigger enables a different message text — "LOW LEVEL — CHECK SUPPLY" and "HIGH LEVEL — CLOSE INLET" — so the operator is alerted without needing a separate panel.
Generation Differences: 0BA6 vs 0BA7 vs 0BA8 vs 0BA8.3
For a tank level display the procedure is identical, but the small differences matter when re-deploying across a fleet of machines:
- 0BA6 (LOGO! 6, 2009-2012): No web server, no Ethernet, no onboard SD card. The program can be written in LOGO!Soft Comfort V6.x and downloaded via the LOGO! PC cable (6ED1057-1AA00-0BA0) or stored on a LOGO! memory card (6ED1056-5...). Maximum 200 function blocks.
- 0BA7 (LOGO! 7, 2012-2014): Adds the LOGO! CSK (Comfort Small Key) option for operator password protection. Same 0-10 V AI range as 0BA6. Maximum 400 function blocks.
- 0BA8 (LOGO! 8, 2014-2019): Built-in Ethernet, 4 onboard analog inputs (0-10 V or 0/4-20 mA switchable per channel), 12-bit ADC, integrated web server, microSD slot, JSON/REST for custom dashboards. The amplifier block is rendered as "Analog Math" with a richer expression editor.
- 0BA8.3 (LOGO! 8.3, 2019+): Same hardware as 0BA8 but with an updated web server, MQTT publish support, and a redesigned message text palette. Programs written in V8.3.0+ of LOGO!Soft Comfort are NOT backward compatible to 0BA8 base units — they will refuse to download and the error in the bottom status bar reads "Target hardware not supported".
Filter, Damping, and Empty/Full Calibration
The amplifier block on 0BA8+ has a built-in digital low-pass filter. On 0BA6/0BA7, the same damping is achieved with a dedicated "Analog Filter" block (Analog → Filter / PT1). The default time constant of 0 seconds gives a step response; 0.5-2 seconds is typical for a tank where sloshing is the dominant noise source. For agitated tanks with a stirrer or pump-induced ripple, increase the time constant to 3-5 seconds and accept the additional lag on the display update.
Calibration sequence in the field:
- Drain the tank completely. Read the LOGO! display: it should show 0 % (or whatever the empty value is for the sensor).
- If the empty value is not exactly 0 %, adjust the Amplifier block Offset, not the Gain. The Offset moves the entire transfer curve up or down without changing its slope.
- Fill the tank to the maximum level. Read the display: it should show 100 %.
- If the full value is off, adjust the Gain. Do NOT touch the Offset after the empty calibration; the two adjustments are not independent and iterating between them is the wrong approach.
- Repeat steps 1-4 until both endpoints are within ±0.5 %.
For a hydrostatic probe that cannot be drained (it is already installed in a full well), use the "two-point calibration in software" approach:
- Read the ADC value at the current known level (e.g., 50 % per a sight glass). Note the value as
ADC_known. - Set Gain = 50 /
ADC_known, Offset = 0, and verify the display reads 50 %. - Move the level sensor mechanically (lift it out of the well) to the empty condition if possible, or use a second known level point to derive the Offset.
Verification, Commissioning, and Field Tuning
After the program is downloaded to the LOGO!, run the following verification sequence before signing off on the panel:
- Power-cycle the LOGO!. After the boot splash, the display should show the bargraph and percentage within 2 seconds.
- Disconnect the sensor from AI1. The display should read 0 % (the ADC defaults to 0 with the input floating, on most base units). This confirms the wiring is single-ended, not pulling the input to a phantom voltage.
- Apply a known voltage with a calibrator (WIKA CPH7000, Beamex MC6, or a battery plus a 10-turn pot) at the AI terminals: 2.500 V → 25 %, 5.000 V → 50 %, 7.500 V → 75 %.
- Toggle the ESC / OK buttons on the LOGO! to verify the message text can be scrolled to the next priority message. The next message in priority should be the low-level or high-level alarm if the threshold is met.
-
Check the LOGO! diagnostic buffer — on 0BA8+ this is under "Diagnostics → Buffer" in LOGO!Soft Comfort, or in the web UI at
http://<LOGO_IP>/. On 0BA6/0BA7 the buffer is not user-accessible; rely on the on-board LED and the "ERROR" message that flashes on the bottom of the display. - On 0BA8 / 0BA8.3, open the integrated web server and confirm the analog value is reported identically to the on-board display. A discrepancy of more than 1 % between the two indicates either a network drop or a stale web cache — both worth chasing.
Troubleshooting Matrix
| Symptom | Likely cause | Fix |
|---|---|---|
| Display reads 0 % at all times | Sensor wiring reversed (signal on M terminal, M on AI) | Swap the two signal wires; verify on display. |
| Display reads 100 % at all times | Sensor supply not energized; the ADC saturates with a floating input tied high through ESD diodes | Power the sensor; check fuse. |
| Display jitters ±3 % | Insufficient filtering, or 50/60 Hz common-mode | Add a PT1 filter block with T = 1.0 s; check shield grounding. |
| Display reads -32768 or 0 only with new sensor | Sensor type 0-20 mA selected on the Amplifier block, but sensor is 0-10 V | Open Amplifier properties and select "0-10 V" sensor type. |
| Bargraph full at 10 V, but percentage is wrong | Gain set to 100 (raw ADC scale) instead of 0.1 (percent scale) | Change Gain to 0.1. |
| Bargraph always black, never fills | Bargraph source bound to wrong tag, or to a digital I/O | Re-bind the bargraph to the Amplifier output tag. |
| Display freezes at one value, no update | LOGO! in STOP mode (programming error), or SD card write in progress | Switch to RUN via the LOGO!Soft Comfort "Online → Run" or hold the ESC key on the base unit for 3 s. |
| "No Program" on display | Program not yet downloaded, or download failed | Re-send the program; check cable. |
| Error code on display: "E33" or "E34" | 0BA6/0BA7 SD card access error | Re-seat the memory card or replace it. E33 = read, E34 = write. |
| Error code on display: "E14" | Sensor open / short-circuit detected by AM2 RTD module (irrelevant for 0-10 V use case) | Confirm correct module: AM2, not AM2 RTD. |
For deeper diagnostics, the LOGO!Soft Comfort "Online Test" view (Tools → Online Test) shows all analog values, block states, and message text active flags in real time. On 0BA8+ the same view is mirrored on the web server at http://<LOGO_IP>/status. Cross-check these values with the on-board display before reporting the field issue as a LOGO! fault — most of the time it is a sensor, a wire, or a parameter, not the controller.
Frequently Asked Questions (FAQ)
Why is my LOGO! bargraph filling from the wrong side?
On 0BA8 / 0BA8.3 the bargraph orientation parameter defaults to left-to-right but can be flipped to right-to-left in the message text properties. 0BA6 / 0BA7 only support left-to-right; if you need right-to-left, invert the tag value with a second amplifier at gain = -1 and offset = 100.
Can I display two tanks on the same LOGO! screen?
Yes. Assign AI1 to Tank A and AI2 to Tank B, run each through its own amplifier block, and create two message texts at different priority levels. The operator toggles between them with the cursor keys on the LOGO! base unit, and the four highest-priority message texts are visible concurrently.
My level sensor is 4-20 mA, not 0-10 V. Can I still use the same program?
You can, by adding a 250 Ω precision resistor across AI1 and M to convert 4-20 mA into 1-5 V. Then use the Amplifier block with sensor type "0-10 V" and set Gain = 6.25, Offset = -25 to recover the 0-100 % engineering range. Alternatively, switch the AI to current mode (0BA8 and later only) and use sensor type "4-20 mA" with the same Gain = 6.25, Offset = -25.
What is the maximum number of message texts I can show simultaneously?
Four. The four highest-priority message texts (out of up to 50 defined on 0BA8+, or 30 on 0BA6/0BA7) are displayed on the LOGO! 6-line screen at any one time. Priority is set per message text, 1 (highest) to 50 (lowest), and is configurable in the message-text properties dialog.
Why does my percentage read 0.0 % but the bargraph is at one segment?
The bargraph rounds down for display, while the numeric value is rounded to the configured decimal place. With 16 bargraph segments and 100 % full scale, one segment is 6.25 %; a value of 0.4 % will light one segment but read "0.0 %" on a one-decimal numeric tag. Increase the bargraph resolution by reducing the full-scale span, or change the numeric format to 2 decimal places.