1. Overview — Solving the Power-Fail Memory Problem on LOGO!
A common LOGO! application requires the controller to remember the state of a digital output (or flag) across an uncontrolled power loss and to resume that exact state when supply returns. Examples include:
- Loop / sequence controllers where the "running" state must be preserved for annunciation but a controlled restart is still required.
- Process interlocks where the latched trip must survive a brown-out and stay latched until an operator acknowledges it.
- Burner / furnace controllers where unburned fuel can accumulate inside the combustion chamber during the power-down period, and the standard safety rule is to never auto-reignite after a power cut without an engineered purge and inspection.
Siemens implements this behaviour through retentivity on selected function blocks. The two binary blocks that most often carry a power-fail memory in a LOGO! circuit are the Latching Relay (RS) and the Pulse Relay. Both blocks can be flagged as retentive, which causes the LOGO! to back the output's boolean state into non-volatile storage. When supply is restored, the output of the block reflects the value it held just before the power-down, and the block continues from that value instead of being initialised to 0.
Reference: Siemens LOGO! Basic Modules – Compact Logic Control and the LOGO!Soft Comfort online help topic Latching relay (ID 100782807).
2. Prerequisites
| Item | Requirement | Notes |
|---|---|---|
| Hardware | LOGO! 8 series basic module (e.g. LOGO! 12/24 RCE, LOGO! 230 RCE, LOGO! 24 RCEo) | Any current LOGO! 8 (BA0/BB0) basic module supports retentive blocks; the part number and feature set for your variant should be confirmed against the product catalogue. |
| Firmware | LOGO! 8 firmware (current release line) | Retentivity has been a core feature since the LOGO! hardware line that supports LOGO!Soft Comfort V8.x. New behaviour, additional retentive counters, and SD-card based program/card handling are introduced by firmware — check the firmware release notes that ship with the device. |
| Engineering software | LOGO!Soft Comfort (V8.x or later current release) | Block property dialog is where retentivity is enabled per block. |
| Connection | Ethernet (LOGO! 8 has an integrated RJ45 port) for program download and online test | Older PC cables and serial adapters are no longer used on the LOGO! 8 line. |
| Safety prerequisites | Risk assessment, E-stop, hard-wired flame safeguard, manual reset pushbutton | Software retentivity must not replace hard-wired combustion interlocks. |
3. Retentivity Fundamentals in LOGO!
LOGO! stores the current value of selected function blocks in non-volatile memory whenever the block is flagged as retentive. On a power loss the volatile working RAM is cleared, but the saved boolean value is retained. On the next scan after power returns, the block is initialised from the saved value rather than from the default 0.
According to the LOGO!Soft Comfort online help for the Latching Relay (ID 100782807):
The latching relay represents a simple binary memory logic. The output value depends on the input states and the previous status at the output.
When retentivity is enabled on a latching or pulse relay, the output signal at restart corresponds with the signal status prior to the power failure.
3.1 Blocks that can be made retentive
- Latching relay (RS)
- Pulse relay
- Up/down counters
- Hours-counter
- On/off delays, edge-triggered timers (timer running state only, not the accumulated value in all cases — confirm with the block's online help)
- Flags (merker)
- Analog flags / threshold triggers
3.2 Retention budget
The number of retentive blocks per LOGO! basic module is limited. The exact count depends on the firmware/device generation and is reported in the LOGO!Soft Comfort project view (the field that shows "Rem. / actual" for retentive blocks). If the budget is exceeded the project will not transfer; you must either remove a retentive flag or upgrade to a LOGO! variant that supports more retentive blocks.
4. Latching Relay (RS) Function Block
The Latching Relay implements a Set / Reset flip-flop. It has two inputs and one output:
| Pin | Name | Function |
|---|---|---|
| Input 1 | S (Set) | When S = 1, output Q is forced to 1. |
| Input 2 | R (Reset) | When R = 1, output Q is forced to 0. |
| Output | Q | Latched binary state. |
4.1 Dominance behaviour
When S and R are both 1 simultaneously, the Latching Relay is Reset-dominant. R always wins; Q = 0. This is the documented behaviour of the LOGO! Latching Relay block and is the correct choice for most safety latches (the trip / reset input takes priority over the set / run input).
4.2 Truth table
| S | R | Q (next cycle) |
|---|---|---|
| 0 | 0 | Q unchanged (held) |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | 0 (Reset-dominant) |
4.3 Retentivity
Enable Retentivity on the block in LOGO!Soft Comfort. The block's output Q is then stored whenever it changes, and the value is restored on power-up.
5. Pulse Relay Function Block
The Pulse Relay toggles its output on the rising edge of a single input, in the same way as a latched pushbutton (impulse / pulse). It has one trigger input and one output.
| Pin | Name | Function |
|---|---|---|
| Input 1 | Tr (Trigger) | Rising edge flips the output. |
| Output | Q | Toggled binary state. |
5.1 Dominance (set / reset dominant) is selectable
The Pulse Relay has a configurable dominance option that the Latching Relay does not expose as a simple block parameter. The selection is made on the block's parameter tab in LOGO!Soft Comfort:
- Reset-dominant — preferred for most machine-safety latches; a reset signal forces the output to 0.
- Set-dominant — useful for "latch in the running state" patterns where the set path is the safety-relevant state.
5.2 When to choose pulse relay over latching relay
| Use case | Recommended block | Reason |
|---|---|---|
| Single pushbutton that toggles run / stop | Pulse relay | One physical input does both Set and Reset. |
| Two discrete inputs, one for run, one for stop | Latching relay (RS) | Separate Set and Reset inputs map directly onto the hardware pushbuttons. |
| Furnace power-fail trip latch with manual acknowledge | Latching relay (RS) | Reset-dominant behaviour is hard-coded and easy to reason about for safety. |
| Selector / mode bit to remember across power-down | Pulse relay or RS | Either; pick based on input wiring. |
Both blocks can be marked retentive in the same way.
6. Enabling Retentivity in LOGO!Soft Comfort — Step-by-Step
- Open the project in LOGO!Soft Comfort and locate the Latching Relay (RS) or Pulse Relay block in the program editor.
- Double-click the block to open the Block Properties dialog.
- Select the Parameters tab.
- Tick the Retentivity checkbox. The block's output Q is now backed up across power-down.
- For the Pulse Relay, also pick Reset-dominant or Set-dominant as required for the application.
- Close the dialog and check the title bar of LOGO!Soft Comfort: the retentive block counter should reflect the new retentive block. If it is exceeded, the project will not transfer — remove a retentive flag or reduce retention scope.
- Connect the LOGO! 8 with the PC over Ethernet. In the Tools → Transfer menu (or the toolbar Transfer button) select PC → LOGO! and download the program.
- Wait for the transfer to complete. The LOGO! will restart into the new program automatically.
7. Furnace Safety Pattern — Manual Restart After Power Fail
The classic furnace / burner control application that the source describes maps to a specific retentive-Latching-Relay pattern:
- While the burner is running normally, the "Run OK" flag is 1.
- If supply is lost mid-run, the volatile state of the controller disappears. The retentive Latching Relay keeps the "Run OK" memory as 1 — meaning "we lost power while the unit was operating".
- On power return, the Latching Relay output Q is 1 (the remembered state), and a separate power-on init logic block uses that Q to prevent the burner from auto-igniting.
- Only after an operator has performed the visual inspection, the air-purge sequence, and pressed the manual reset pushbutton does Q return to 0, releasing the burner to its normal run / stop logic.
7.1 Why this is mandatory, not optional
During a flame-out or an uncontrolled power-down, unburned fuel can pool inside the combustion chamber. On a re-ignition without purge the chamber can fill with a combustible mixture, and the next spark acts as an ignition source. A standard purge cycle (typically three chamber volumes of air) is required before any attempt to re-ignite, plus an inspection by a competent person. This is the engineering basis for the requirement that a furnace never restarts automatically after a power cut.
7.2 Implementation example
A minimal implementation using a retentive Latching Relay is shown in the logic block diagram below.
Inputs:
I1 = Manual reset pushbutton (NO, spring-return)
I2 = "Run OK" feedback (e.g. gas valve open + air-prove + flame OK)
I3 = Air-prove pressure switch
I4 = Flame signal
Blocks:
B01 Latching Relay (RS), retentive = ON
S input = I1 (manual set to release)
R input = "Power-fail-tripped" flag
Q output = "Ready to run" (must be 1 for burner to start)
B02 Pulse Relay "Burner Enable", retentive = OFF
trigger = Q of B01 AND I3 AND I4 (permissive chain)
Q = burner start command
B03 "Power-fail-tripped" derived flag:
set on first scan after power-up IF retentive Q of B01 was 1
(i.e. the Latching Relay still says "we were running")
When the controller powers up after a loss, Q of B01 is restored to 1 (it was set when the run was healthy). The "Power-fail-tripped" flag latches, the burner start command is held at 0, and only a manual reset (which sets B01 to 0) clears the lockout. When Q of B01 is 0, the burner enable path is dead and no auto-start can occur.
8. Distinguishing "Power-Fail Recovery" from "Normal Cold Start"
A retentive Latching Relay on its own cannot tell you whether the value of 1 it just restored is a tripped-state marker or a normal-run marker — it can only store the bit. The interpretation is up to the surrounding logic. The recommended interpretation is:
| Retentive Q at power-up | Plant condition at power-down | Action on power-up |
|---|---|---|
| 0 | Plant was idle / not running | Cold start. Normal logic is allowed to start the burner once the rest of the permissive chain (air prove, etc.) is satisfied. |
| 1 | Plant was running or had a latched trip | Tripped / manual reset required. The "Ready to run" permission is held at 0 until the operator performs the inspection + purge + reset sequence. |
This is the implementation that maps directly to the furnace application described in the source: a healthy running plant that loses power is not allowed to auto-resume; a healthy idle plant that loses power is allowed to come up cold and wait for a normal start command.
9. Verification Procedure
After the project is downloaded, perform these checks before releasing the panel to operations.
- Online monitor Q of the retentive block. Force Q to 1 via the input logic. Confirm the LOGO!Soft Comfort online display shows Q = 1.
- Power cycle the LOGO! by removing the supply for at least 2 seconds, then re-applying. Watch the LOGO!Soft Comfort online view. Q of the retentive block must return to 1, and the burner enable path must stay at 0.
- Attempt an auto-start. With the burner in this tripped state, simulate a run command from the operator panel. The burner must not start. The status indicator for "Ready to run" must remain at 0.
- Manual reset path. Press and release the manual reset pushbutton. Q of the retentive block must go to 0. The "Ready to run" permission must be released.
- Cold-start path. With Q = 0 at power-up (plant idle), confirm that a normal start command is allowed once the air-prove and flame signals are healthy.
- Loss of the retentive flag (operator mistakes, programming cable unplugged during download). After re-download, perform the cold-start verification first before re-attempting the power-cycle test.
10. Limitations, Retentive Capacity and Firmware Notes
10.1 Per-device retention budget
Each LOGO! basic module has a fixed number of retentive slots. The exact number is reported by LOGO!Soft Comfort in the project view ("Rem. / actual"). When the project exceeds the budget the transfer will fail with a retentive-block overflow error. The mitigation is to consolidate retentive state into fewer blocks where possible (e.g. pack multiple flags into a shift register, or use a single Latching Relay as a power-fail-tripped master flag rather than making every flag retentive).
10.2 No battery required
Retentivity on LOGO! is stored in non-volatile memory and does not require a battery. This is the main reason retentivity is preferred over the alternative of a battery-backed relay coil the source asked about — it removes a service item and a failure mode.
10.3 Program / SD-card transfer interactions
On the LOGO! 8 line, programs are typically stored on a plug-in SD card or in internal flash. Loading a new program from the SD card at power-up can reset the retentive state if the program is read back as a new circuit. Confirm with the firmware / LOGO!Soft Comfort release notes whether the retentive area is preserved across SD-card program loads — recent firmware releases preserve it as long as the new program references the same retentive block at the same address.
10.4 First-scan flag (P or "Init")
The startup flag (P) — sometimes labelled "Init" in older documentation — is high only on the first scan after power-up. It is a non-retentive way to detect "just powered up" but it does not by itself tell you whether the controller is in a cold-start or a recovery condition. The combination of P and the retentive Q is the pattern that gives you the distinction.
10.5 Field-proven caveats
- Retentive timers on LOGO! do not in all firmware versions store the elapsed value — they may restart from 0 and simply remember whether the timing is "running" or "finished". Verify the exact behaviour for your firmware in the LOGO!Soft Comfort online help for the specific timer block.
- Do not place retentive storage on a flag that is also used as a working bit elsewhere in the scan — conflicts at cold start are a common source of intermittent commissioning bugs.
- Always re-run the power-cycle verification after any firmware update on the LOGO!; Siemens occasionally changes retentive behaviour between firmware releases.
11. Frequently Asked Questions
Which block should I use to remember a relay state across a power failure on a Siemens LOGO! 8?
Use either the Latching Relay (RS) or the Pulse Relay and enable Retentivity in the block's parameter dialog in LOGO!Soft Comfort. The Latching Relay is always Reset-dominant; the Pulse Relay allows you to choose Reset-dominant or Set-dominant. Pick Latching Relay for separate Set and Reset inputs, Pulse Relay for a single toggle pushbutton.
How do I enable retentivity on a LOGO! Latching Relay?
Open the program in LOGO!Soft Comfort, double-click the Latching Relay block, go to the Parameters tab, and tick Retentivity. Download the program to the LOGO! over Ethernet. The output Q is then stored in non-volatile memory and restored on the next power-up.
Why is the Latching Relay Reset-dominant on LOGO!?
Reset-dominant means that when both Set and Reset are 1 simultaneously, the output is forced to 0. This is hard-coded for the Latching Relay and matches the safe-failure direction for most machine interlocks: a reset / trip signal must always win. If you need a Set-dominant flip-flop, use the Pulse Relay block, where dominance is selectable.
Can retentivity replace a manual reset after a power cut on a furnace?
No. Retentivity in this application should be used to store a "power-fail-tripped" flag that holds the burner in a safe state and demands an operator-driven manual reset plus purge and inspection before re-ignition. Standard combustion-safety practice is to never auto-reignite after a power cut, because unburned fuel can pool inside the chamber. Always keep the hard-wired flame safeguard and the manual reset pushbutton in the safety chain — software retentivity is a logic-layer feature, not a substitute for hardware interlocks.
What happens if I exceed the retentive block budget on the LOGO! basic module?
LOGO!Soft Comfort will report the retentive count in the project title bar and will refuse to download the program if the device's retention budget is exceeded. Reduce the number of retentive blocks (consolidate flags into a shift register, or remove retentivity from counters and timers where it is not strictly required) or use a higher-spec LOGO! variant with a larger retentive budget.
Does retentivity on LOGO! need a battery?
No. Retentivity is stored in non-volatile memory inside the LOGO! basic module. No battery or external storage is required. This is one of the main reasons retentivity is preferred over a battery-backed interposing relay for power-fail memory in small control systems.