Configuring Remote Setpoint Offset for LOGO! 8 Analog Threshold Trigger
This reference describes how to expose the setpoint of a Siemens LOGO! 8 (0BA8 / 0BA8.FS4 / 0BA8.3) Analog Threshold Trigger (block B003) to a remote operator through the on-board Ethernet web server, smartphone browser, or networked HMI. The documented problem is a typical garage-heating control loop: a 0–10 V potentiometer feeds the threshold block, a PI controller drives a PWM block that switches a heating element, and the user wants to bias the setpoint from a smartphone without reposting the program.
Three independent techniques are covered end-to-end:
- Replace the potentiometer with a VM (Variable Memory) word edited through the LOGO! web server.
- Keep the potentiometer and add a remote offset using a Math block summed with the analog input.
- Provide local/remote editing through a Message Text with cursor keys when no analog wiring is available.
All formulas, address ranges, web-server permissions, and PI/PWM tuning values are sourced from the LOGO!Soft Comfort Online Help — Analog Threshold Trigger (B003) manual entry.
1. Hardware and Software Prerequisites
| Item | Minimum Specification | Notes |
|---|---|---|
| Base module | LOGO! 8 0BA8 or 0BA8.FS4 with Ethernet | Order numbers 6ED1052-1xxx08-0BA0 series; verify the suffix "08" for the first-generation 0BA8 hardware |
| Firmware | FS4 or later (FW ≥ 1.81.01 recommended) | Web server access for VM words is stable from FS4; FS5/FS6 add the Web Editor V2.0 and Web Editor V2.5 with custom HTML pages |
| LOGO!Soft Comfort | ≥ V8.3 (build 1.81.01) | Earlier V8.0 / V8.1 releases expose the same blocks but cannot program modules running FS4 firmware |
| Analog input source | AI1…AI4 on base; AI5…AI8 with AM2 / AM2 RTD expansion | 0–10 V at 24 V supply; 0/4–20 mA on AI7/AI8 with 2-wire transmitter on the AM2 module |
| Ethernet infrastructure | Static IP, DHCP reservation, or DDNS | Default IP 192.168.0.1, subnet 255.255.255.0; web server listens on TCP 80 |
| Browser | Any modern smartphone browser | JavaScript not required; the LOGO! serves static HTML forms |
2. Analog Threshold Trigger Internals
The Analog Threshold Trigger is block B003 in the LOGO! function-block library. It scales the raw analog input, compares the result against an ON threshold (On) and an OFF threshold (Off), and sets output Q when the scaled value crosses On. The block reference describes the relationship between the raw signal Ax, the Gain, and the Offset as:
(Ax × Gain) + Offset = Actual value Ax
Per the LOGO!Soft Comfort Online Help entry for B003:
- Ax — raw analog value at the input, expressed in the LOGO! normalized scale of 0…1000 (units are pre-scaled; 0 corresponds to 0 V / 0 mA / 0 °C, 1000 corresponds to 10 V / 20 mA / 100 °C depending on sensor type).
- Gain — dimensionless multiplier applied to Ax. Default 1.00; range 0.00…10.00 (effective up to 1000.00 in firmware > FS4).
- Offset — additive constant applied after the gain, in the same normalized units. Default 0; range ±1000.
- On / Off — switch-on and switch-off thresholds in the same normalized units.
This additive Offset is the only parameter exposed to the user that mathematically performs the bias the original poster wanted. Unfortunately the Offset field of B003 is a program constant — it cannot be written to from the web server at runtime, because web-server editing is restricted to VM (Variable Memory) words and to the digital/analog marker and network inputs that the program explicitly exposes.
Two architectural options follow from this constraint:
- Build the offset outside the threshold block, in user logic, using a block whose input is web-editable.
- Replace the threshold input altogether with a web-editable word.
3. Method 1 — Replace the Potentiometer with a Web-Editable VM Word
This is the cleanest path when the potentiometer is the only manual control surface. It removes AI1 from the control loop and feeds the Analog Threshold Trigger directly from a Variable Memory word scaled to the same engineering range.
3.1 Step-by-step
- In LOGO!Soft Comfort, insert Special → Memory → Variable Memory (B293) or reuse an existing free VM address (e.g.
VW100). - Open the VM word's Properties dialog, switch to the Web server tab, and tick Visible and Editable. Set the engineering range to match the physical sensor: 0…50 °C, 0…100 %, or 0…1000 ppm.
- Delete the connection from AI1 (the potentiometer) to the Analog Threshold Trigger.
- Connect the output of the Variable Memory block to the Ax input of the Analog Threshold Trigger.
- Set Gain = 1.00, Offset = 0 inside B003 — they are no longer needed because VM is already in engineering units.
- Compile and download. Verify the value is editable from
http://<LOGO_IP>/as the new Setpoint.
Default visibility and editability per VM address depend on the firmware:
| Firmware | Web-Editable VM Range | Notes |
|---|---|---|
| 0BA8 FS1 (early) | VW0…VW7 (only) | Severely limited; some early units have no web VM editing at all |
| 0BA8 FS4 (≥ 1.81.01) | VW0…VW127 | 128 web-editable 16-bit words; reset-retained if marked retentive |
| 0BA8.3 FS6 (Web Editor V2.5) | VW0…VW849 (gated by project) | Editable word count and persistence configurable per variable |
3.2 Verification
- Open the LOGO! web page from a PC, then from a smartphone on the same LAN. Change the value of VW100 and confirm that the on-line value updates on the LOGO! display and that the heating element reacts within the PI loop's response time.
- Power-cycle the LOGO! and confirm the value is retained (only retained VM words survive; the default retention is off for most blocks).
4. Method 2 — Sum a Remote Offset with the Potentiometer
Use this method when the local potentiometer must remain a hard-wired manual fallback (for example, a garage with no smartphone signal). The remote offset is added to the scaled potentiometer value before it reaches the threshold block.
4.1 Block sequence
- AI1 (potentiometer, 0–10 V) → Analog Input Scaling → scaled value 0…500 (representing 0.0…50.0 °C × 10).
- VM word
VW200marked web-editable, range −50…+50 (representing ±5.0 °C trim). - Math instruction (B008 with operator +) adds the scaled AI1 value and VW200.
- Result of the Math block feeds the Ax input of the Analog Threshold Trigger.
- Optional: clamp the result with Analog Watchdog (B004) or a Min/Max (B015) to keep it within the sensor's valid range.
4.2 SVG control flow
4.3 Math block parameter table
| Parameter | Value | Reason |
|---|---|---|
| Operator 1 (B008 first input) | AI1 scaled | 0…500 (0.0…50.0 °C × 10) |
| Operator 2 (B008 second input) | VW200 | ±50 (±5.0 °C trim) |
| Gain1 / Gain2 | 1.00 / 1.00 | No re-scaling needed |
| Output range | −32768…+32767 | Math block is signed |
| Clamp to | 0…500 | Use B015 Min/Max to enforce sensor envelope |
On a smartphone the user opens http://<LOGO_IP>/, navigates to Variables, edits VW200 from 0 to +40 (i.e. +4.0 °C), and the threshold block now compares the live potentiometer value plus 4.0 °C against On/Off.
5. Method 3 — Message Text with Cursor Keys (No Analog Hardware)
The original poster's response from another engineer pointed at this technique. Drop the potentiometer entirely, expose a single Message Text on the LOGO! display, and wire the LOGO! cursor keys (inputs I1/I2/I3/I4 typically, or the front-panel Esc / OK / < / > keys) to a counter that drives a VM word.
5.1 Program structure
- Up/Down keys (e.g. I5 and I6 wired to the LOGO! display cursor buttons) feed an Up/Down Counter (B004 in the binary family, or Analog Counter B008 in the analog family).
- Counter output writes to VM word
VW300(marked web-editable, range 0…500 representing 0…50 °C). - Add hysteresis to the up/down by 1 per keypress with a 200 ms debounce (use an on-delay B004 to filter bounce).
- Message Text B013 displays the live setpoint on the LOGO! built-in screen with the format
SP = 23.5 °C. Enable Bar graph if you want a visual indicator.
5.2 Why this works remotely
The same Message Text values are also visible in the LOGO! web server under Messages. With the LOGO! 8.3 firmware and Web Editor V2.5, you can publish a custom HTML form that writes to VW300, so a smartphone browser becomes a second input device in addition to the physical keys.
6. LOGO! Web Server Configuration
Access the on-board web server by entering the LOGO!'s IP address in a browser. Default URL is http://192.168.0.1/. The home page shows system information, I/O status, and the list of user-defined variables that have been flagged visible.
6.1 Authentication and access list
- 0BA8 FS1–FS4: Single user/password pair stored in the LOGO! Tools menu, transmitted Base64-encoded (not encrypted) over HTTP. There is exactly one account.
- 0BA8.3 (FS6) with Web Editor V2.5: Up to four access levels (read-only, operator, service, admin) with per-variable read/write permissions, and a self-signed TLS certificate can be uploaded for HTTPS.
6.2 Marking variables as visible/editable
- Open the block in LOGO!Soft Comfort's FBD editor.
- Right-click → Properties → Web server tab.
- Select Variable: read/write. Optionally enable Retain for persistence across power cycles.
- Repeat for every block whose value should be exposed.
- Download the program to the LOGO! and restart.
7. PI and PWM Loop Tuning Notes
When the setpoint is editable from outside, the control loop must tolerate step changes of up to ±5 °C without saturating. The factory defaults for the PI controller in LOGO! (block B018) are typically KC = 1.0, TI = 30 s, DIR = +. For a slow thermal mass like a garage:
| Parameter | Suggested Initial Value | Reason |
|---|---|---|
| KC (proportional gain) | 2.0 | Heaters are slow; higher KC reduces time-to-setpoint |
| TI (integral action time) | 120 s | Suppresses wind-up from large setpoint steps |
| PV min / max | 0 / 50 °C | Matches the AI scaling used in Method 1/2 |
| PWM period (B016) | 20 s | Avoids thermal cycling wear on contactor |
| Output lower limit | 0 % | No cooling branch in this loop |
| Output upper limit | 100 % | Full duty when far below setpoint |
8. Remote Network Access
8.1 Static IP versus DHCP reservation
On a 0BA8 module the IP address, subnet mask, and gateway are set in LOGO! → Network → Ethernet. A static IP outside the DHCP range is the safest option for a fixed-location garage controller.
8.2 Reaching the LOGO! from the internet
Three approaches in increasing order of operational security:
- Router port-forwarding: Forward external TCP 8080 to LOGO! TCP 80. Acceptable for hobby use, but the LOGO! web server's clear-text authentication is exposed to the public internet.
- Reverse proxy with TLS: Place a small Linux box, a Raspberry Pi, or an OpenWrt router in front of the LOGO! and terminate HTTPS. The proxy validates client certificates.
- VPN: WireGuard or OpenVPN on the same router, smartphone connects via the VPN. The LOGO! is not reachable from the public internet at all.
8.3 SVG network topology
9. Verification and Commissioning Procedure
- Build the program per Method 1, 2, or 3. Compile without errors in LOGO!Soft Comfort.
- Connect a PC to the LOGO! Ethernet port. Use the Online view to confirm that AI1 and the chosen VM word report sensible values.
- From a phone on the same Wi-Fi, open
http://<LOGO_IP>/, log in, and change VW100 (or VW200, or VW300 depending on method). Confirm the value persists after a power cycle if retain is enabled. - Force a 5 °C step change in the setpoint and observe the PI/PWM duty cycle. The PWM block output should rise smoothly to 100 % then taper off within a few minutes; no oscillation means the KC and TI are reasonable.
- Verify that the LOGO! built-in display still updates the message text within 200 ms of a web edit — this confirms the on-board web server is publishing the changed value to the runtime.
- If remote access is enabled, verify from the public internet that the LOGO! page loads and that the credentials are rejected without TLS / VPN context.
10. Troubleshooting Matrix
| Symptom | Likely Cause | Resolution |
|---|---|---|
| VM word not visible in the web server | Web-server tab not enabled on the block | Open block Properties → Web server → tick Visible; re-download |
| Web edit accepted but value reverts on cycle | Retain bit not set on the VM block | Properties → Parameter → VM retention = On |
| Setpoint works from PC, not from phone on same LAN | Phone on guest VLAN; AP isolation | Move phone to same SSID, or add firewall rule |
| Phone works on Wi-Fi, fails over LTE | TCP 80 not forwarded, or ISP CGNAT | Configure port forwarding; if CGNAT, switch to VPN |
| Threshold toggles wildly with small setpoint steps | On/Off hysteresis too tight | Set hysteresis ≥ 0.2 °C; verify the input is debounced |
| AI1 reading is 0 in the program but the LOGO! display shows a voltage | AI1 disabled or wired to wrong terminal | Check wiring to I7 / I8 (0BA8 base analog); the analog inputs share terminals with digital I7/I8 |
| Math block overflows when offset is large | Sum outside signed 16-bit range | Clamp with B015 Min/Max to sensor envelope; use Math B008 in 32-bit mode if available |
| Web page throws 401 even with correct password | Browser session expired or URL has trailing slash variant | Clear cookies; re-enter password; verify the LOGO! user in Tools → User |
11. Field-Proven Caveats
- The LOGO! 0BA8 web server caches the HTML for ~1 s. Changes made through the website appear in the program on the next scan, but the page itself may show the old value briefly.
- VM words are volatile by default; the engineer must enable retention explicitly, otherwise the user-set offset is lost at every power-up.
- Do not use a 0BA8 FS1 unit for this application. The early firmware limits web-editable variables to the first eight VM addresses and the web server is intermittently unstable on the first-revision hardware.
- Analog inputs on the 0BA8 base share physical pins with digital inputs I7/I8. If the wiring is reused for the potentiometer and a digital sensor, the inputs will interact. Plan the terminal assignments before commissioning.
- The Analog Threshold Trigger's On threshold is the setpoint; the Off threshold is independent and forms a hysteresis pair. Do not modify On to attempt a remote trim — that is exactly what causes the setpoint to drift unintentionally when other engineers touch the project.
Can I edit the Offset field of the Analog Threshold Trigger from the LOGO! web server?
No. The Offset, Gain, On, and Off parameters of block B003 are program constants baked into the LOGO!Soft Comfort project. The web server can only modify Variable Memory (VM) words and exposed block parameters. Implement the offset outside the threshold block — in a Math or scaling block fed from a web-editable VM word — as shown in Method 2.
What is the difference between Gain and Offset on the Analog Threshold Trigger?
Gain multiplies the raw input Ax, Offset adds a constant after the multiplication, and the result is compared against On/Off. The formula from the LOGO!Soft Comfort online help is (Ax × Gain) + Offset = Actual value Ax. Use Gain to linearize a non-linear sensor, use Offset to bias the entire scaled curve by a fixed amount.
How many VM words can the LOGO! 8 expose on its web server?
On firmware 0BA8 FS4, up to 128 web-editable VM words (VW0…VW127). On 0BA8.3 with Web Editor V2.5, the limit is determined by the custom project and is typically several hundred. Each VM word is 16 bits, signed, range −32768…+32767.
Can I access the LOGO! web server from the internet without a static public IP?
Yes, using a Dynamic DNS service (DynDNS, No-IP, or a router-embedded DDNS client) combined with port forwarding, or — preferred — through a VPN. The LOGO! web server itself has no DNS client, so the DDNS hostname must be resolved by the home router and mapped to the LOGO!'s private IP.
What is the resolution and accuracy of an analog input on LOGO! 8?
On a 0BA8 base module the analog inputs AI1 and AI2 are 10-bit (0…1023 over 0…10 V) on early revisions, 12-bit (0…4095) on FS4 and later hardware. The on-board scaling engine operates internally at 16-bit signed precision, so quantization noise is well below the typical thermocouple or RTD noise floor when an AM2 RTD expansion is used.