Problem Statement
The project drives a blower on LOGO! output Q1 from a temperature input with a wide hysteresis: Q1 must switch ON when the process cools below 10 °C and switch OFF when the temperature exceeds 150 °C (an inverted control band often used where high temperature is the protective trip and low temperature is the demand signal). The bug surfaces during a planned plant shutdown: while the line is idle, the process cools, the off-threshold (10 °C) is reached, and Q1 pulls the blower ON even though no production order is open. The required behavior is a software "master enable" driven from outside the program - in LOGO! terminology, a Network Input (NI) flag - so an operator or upstream SCADA can hold Q1 OFF regardless of the threshold trigger.
The fix is a single AND block placed between the threshold trigger and Q1, gated by a Network Input. Once the AND gate is wired, setting NI1 = 0 forces Q1 OFF without any change to the threshold logic; setting NI1 = 1 returns the program to normal hysteresis control.
Prerequisites
- LOGO! 8 (6ED1052-1xx08-0BAx) or LOGO! 9 (6ED1052-2xx09-0BAx) base module with firmware ≥ 8.4 to ensure full NI / Modbus TCP support.
- LOGO!Soft Comfort V8.4 or later (project editing PC software).
- If the temperature sensor is PT100 / PT1000: LOGO! AM2 RTD expansion (6ED1055-1MD00-0BA2) or a LOGO! 8.3 BM with on-board PT100/PT1000 inputs.
- Network path to the LOGO! (Modbus TCP from an HMI/SCADA, S7-communication from a SIMATIC PLC, or operator toggle via the LOGO! onboard web server).
- Knowledge of the analog input scaling range configured on AI1 (PT100: -50 °C to +200 °C default on AM2 RTD).
LOGO! Hardware Configuration
| Function | LOGO! Module | SAP / MLFB |
|---|---|---|
| Base module (logic + web server + Modbus TCP) | LOGO! 8 BM 12/24 V | 6ED1052-1CC08-0BA1 |
| Base module (230 V supply variant) | LOGO! 8 BM 230 V | 6ED1052-1HB08-0BA1 |
| Base module with onboard PT100/PT1000 | LOGO! 8.3 BM | 6ED1052-1MD08-0BA1 |
| Digital output expansion (relay) | LOGO! DM8 12/24R | 6ED1055-1CB00-0BA2 |
| Analog input expansion (0-10 V / 4-20 mA) | LOGO! AM2 | 6ED1055-1MA00-0BA2 |
| RTD input expansion (PT100/PT1000) | LOGO! AM2 RTD | 6ED1055-1MD00-0BA2 |
According to the Siemens LOGO! Expansion Modules product page, the LOGO! 9 system supports up to 64 digital inputs, 60 digital outputs, 16 analog inputs and 16 analog outputs depending on configuration. This is relevant when expansion DM/AM modules are added: the NI count is not affected by expansion modules, but the I/O points used by the program (AI1 for temperature, Q1 for blower) must remain reachable from the base.
Threshold Trigger Behavior (Block B036)
LOGO!Soft Comfort's Analog Threshold Trigger (function block B036 in the FBD library) compares the incoming analog value against two setpoints and behaves like a Schmitt trigger:
- Output goes HIGH when the input rises above On threshold.
- Output goes LOW when the input falls below Off threshold.
- Between the two setpoints, the output retains its previous state (hysteresis).
For this project the parameters are:
| Parameter | Value | Meaning |
|---|---|---|
| On threshold | 150 (scaled °C) | Trip released at 150 °C - output falls at high temperature |
| Off threshold | 10 (scaled °C) | Blower demand starts when process cools below 10 °C |
| Scaling | 0-200 °C → 0-2000 | Match the analog input scaling chosen on AI1 / AM2 RTD |
The B036 block does not produce a "Q1 demand" directly - it produces a permission bit. Without the AND gate, this permission is wired straight to Q1, so Q1 energizes whenever the threshold conditions are satisfied. The AND gate is what makes the permission revoke-able from outside.
Wiring the Override: AND Block Topology
Netlist summary:
- AI1 → B036.Ax (analog threshold trigger)
- B036.Q → B001.IN1
- NI1 → B001.IN2
- B001.Q → Q1
Truth table for the gate (with NI1 = 1 meaning "plant running, allow operation"):
| Temperature band | B036.Q | NI1 | B001.Q | Q1 (blower) |
|---|---|---|---|---|
| > 150 °C (trip) | 0 | 1 | 0 | OFF |
| 10 °C - 150 °C (hysteresis retained) | 1 | 1 | 1 | ON |
| < 10 °C (cold) | 1 | 1 | 1 | ON |
| Any | 0 | 0 | 0 | OFF |
| Any | 1 | 0 | 0 | OFF |
Step-by-Step Programming in LOGO!Soft Comfort
- Open the project in LOGO!Soft Comfort V8.4 (or later). Switch to FBD view.
- Drop AI1 from the connector bar onto the worksheet.
- From the analog functions palette, drag the Threshold trigger (B036). Wire AI1 to its Ax input. Open the block and set:
- On = 1500 (when scaled to 0.1 °C units - adjust to your analog input scaling).
- Off = 100.
- Enable hysteresis (default ON).
- From the basic functions palette, drag the AND block (B001, 2-input variant).
- From the connector bar, drag NI1 (Network Input 1) onto the worksheet.
- Wire B036.Q → B001.IN1 and NI1 → B001.IN2.
- Drag Q1 from the connector bar and wire B001.Q → Q1.
- Save the project and download to the LOGO! base module via Ethernet or micro-SD.
- On the LOGO! display: navigate Program → NI1 and verify it reads 0 by default (safe state = blower held OFF).
Configuring Network Input NI1
LOGO! exposes up to 64 Network Inputs on the base module (NI1...NI64) and 64 Network Outputs (NQ1...NQ64). They are addressable by external Modbus TCP masters and S7-communication partners.
Method A - Modbus TCP (Holding Register 0..15)
Each NI is mapped to one bit inside Modbus Holding Register 0 of the LOGO!. The mapping (per Siemens LOGO! 8/9 communication manual):
| Master Modbus register | Bit | LOGO! tag |
|---|---|---|
| 00001 (HR 0, bit 0) | 0 | NI1 |
| 00002 (HR 0, bit 1) | 1 | NI2 |
| ... | ... | ... |
| 00064 (HR 3, bit 15) | 63 | NI64 |
Set NI1 = 1 with a Modbus Function Code 06 (Write Single Register) or 16 (Write Multiple Registers) to address 40001 (offset 0). Sample Modbus master frame excerpt:
Tx → 01 06 00 00 00 01 48 0A # Slave 1, FC06, Reg 0, Value 0x0001 (NI1=1)
Rx ← 01 06 00 00 00 01 48 0A # Echo confirmation
Method B - LOGO! onboard web server
The LOGO! 8 BM with firmware ≥ 8.4 exposes a web interface on port 80. Log in with the IP address of the LOGO!, navigate to Variable → Inputs / Outputs → NI, and tick NI1 to 1 or 0. Useful for bench commissioning without a full SCADA project.
Method C - S7-communication (Put/Get)
If a SIMATIC S7-1200 or S7-1500 is the upstream controller, enable S7 connections on the LOGO! base and use a PUT instruction to write the NI bits into the LOGO!'s input image area. The mapping is identical to the Modbus bit allocation: NI1 = bit 0 of byte 0.
Verification & Testing
- Power the LOGO! with NI1 forced to 0 via the LOGO! display or Modbus. Blower must be OFF even if temperature is at 25 °C.
- Apply a simulated 5 °C signal to AI1. Threshold block B036.Q should report HIGH (the band retained). With NI1 = 0 the AND output stays LOW. Raise NI1 to 1; Q1 must come ON.
- Set NI1 = 0 while Q1 is ON. Q1 must drop OFF within one LOGO! cycle (typical < 50 ms).
- Raise temperature above 150 °C with NI1 = 1. Q1 must drop OFF (threshold trip).
- Use LOGO!Soft Comfort Online Test mode to watch B036.Q and B001.Q in real time. Both must transition correctly when NI1 toggles.
- Power-cycle the LOGO!. After restart, NI1 defaults to 0 - this is intentional fail-safe behavior. Q1 cannot auto-start after a power-down until the upstream system explicitly re-enables it.
Troubleshooting Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
| Q1 stays ON during shutdown, ignoring NI1 | AND block wired before the threshold, or NI1 left floating in the connector bar (LOGO! treats floating NI as 0 only after wiring) | Re-wire: Threshold → AND → Q1. Drag NI1 onto the connector bar explicitly and reconnect. |
| Q1 never turns ON even with temperature in band | NI1 set to 0 by the SCADA. Confirm with a Modbus read of HR 0 | Set NI1 = 1 from the SCADA / web server, or re-evaluate whether the upstream system is producing the enable signal at all. |
| B036 output never goes HIGH | On/Off threshold units mismatch with AI scaling | Verify AM2 RTD scaling (0-200 °C → 0-2000) and set B036 thresholds to 1500/100 in the same scaled units, or switch the threshold block to "no scaling" and use °C directly. |
| Modbus write accepted but NI1 does not change | LOGO! in RUN mode but the write target is the wrong Modbus base address (some SCADA libraries expect 40001 or 0-based) | Try both Function Code 06 holding-register offset 0 (0-based) and offset 1 (1-based). Reference the LOGO! communication manual for the exact image table. |
| Blower chatter at 10 °C boundary | Hysteresis band too narrow for sensor noise | Widen the off-threshold gap, or insert a delay-on/off block (B007) ahead of the AND gate with 2-5 s timing. |
| After firmware update, NI bits behave differently | Firmware < 8.4 used a different NI mapping layout | Update LOGO! base firmware to ≥ 8.4 and verify the project on the bench before re-deploying. |
| LOGO! display shows NI1 = 0 but Q1 still toggles | Network Input NI1 was confused with Network Output NQ1 in the SCADA tag mapping | Confirm the SCADA tag is mapped to the input area, not the output area, and re-test. |
Expansion Module Integration
If the application adds digital expansion modules (DM8 / DM16), the digital inputs and outputs used in the program shift accordingly but the NI / NQ naming is unaffected. Per the Siemens LOGO! Expansion Modules page, a fully populated LOGO! 9 stack reaches 64 DI / 60 DO / 16 AI / 16 AO - well beyond what a single blower project needs, but relevant when the override must be replicated across multiple outputs (NI1 → AND with all driven loads in a coordinated shutdown).
For a multi-output shutdown, gate each driven load with its own AND using a dedicated NI flag:
- AND with NI1 for Q1 (blower)
- AND with NI2 for Q2 (heater)
- AND with NI3 for Q3 (alarm horn)
This pattern lets the SCADA shut down individual subsystems granularly without editing the LOGO! program.
Field Commissioning Notes
- Fail-safe polarity: treat NI1 = 0 as "safe / blower OFF". This way a loss of network never re-enables the blower. Document the convention in the SCADA tag description.
- Display feedback: on the LOGO! onboard display, enable Info → NI1 in the message text so operators can see the live state without logging into the web server.
- Retention: NI flags are volatile by default. If you need NI1 to survive a power cycle, configure the LOGO! to retain the relevant network input via Program → NI properties → Retentive = on.
- Cycle time: the AND block adds < 5 ms of propagation delay; not significant for a temperature-controlled blower but worth noting if the same NI is fanned out to a safety-rated output elsewhere.
- Diagnostic tag: expose B001.Q as an NQ (Network Output) so the SCADA can confirm in real time that the AND is gating correctly. Map NQ1 to Modbus HR 4 bit 0.
- Audit trail: when the SCADA writes NI1, log the operator ID and timestamp alongside the temperature at the moment of the change. This is required in many regulated industries where a software override must be auditable.
- Watchdog timer: consider adding a B007 off-delay of 30 s that drops Q1 if NI1 has not been refreshed by the SCADA within that window. This catches silent network failures without relying on TCP timeouts alone.
Summary
To force Q1 OFF during plant shutdown while keeping the threshold-based temperature logic intact, insert a single AND block between the analog threshold trigger (B036) and output Q1, and wire Network Input NI1 to the second AND input. NI1 = 0 from the SCADA / web server / Modbus master holds Q1 OFF; NI1 = 1 restores the original hysteresis control. This is a stateless, fail-safe override that does not require latches or RS flip-flops, and it survives power-cycles by default if NI1 is left at 0 on reboot.
Why does my blower still run after I clear NI1 to 0 in the SCADA?
The AND block was likely wired on the wrong side of the threshold trigger, or NI1 was not dropped onto the connector bar before being assigned. Open the project in LOGO!Soft Comfort, confirm B036.Q → B001.IN1 and NI1 → B001.IN2, and verify B001.Q drives Q1. Also confirm the Modbus write target is HR 0 bit 0 (offset 0, not 1).
Can I use a digital input (I1, I2) instead of a Network Input for the override?
Yes. A local DI is faster (no network round-trip) and survives network outages, which is appropriate for a hardwired enable. The wiring becomes B036.Q → B001.IN1 and I1 → B001.IN2. Use NI only when the enable must originate from a remote SCADA or PLC.
What Modbus function code and address set NI1 = 1 on a LOGO! 8?
Use Function Code 06 (Write Single Holding Register) to address 40001 with value 0x0001, or Function Code 16 (Write Multiple Registers) with the same start address. The bit-to-flag map is bit 0 of HR 0 = NI1, bit 1 = NI2, and so on through bit 63 = NI64. The reference is the LOGO! 8/9 communication manual.
Will NI1 retain its state across a LOGO! power cycle?
By default, NI flags are volatile and reset to 0 on power-up. To retain, open the project in LOGO!Soft Comfort, navigate to the NI1 block properties, and enable Retentive. Note that a retentive override defeats the fail-safe polarity - evaluate whether retaining the last SCADA command is acceptable for your process safety case.
How many NI flags does a single LOGO! base module expose?
LOGO! 8 and 9 expose up to 64 Network Inputs (NI1-NI64) and 64 Network Outputs (NQ1-NQ64) on the base module, independent of any digital or analog expansion modules attached.