Problem Overview
A Siemens LOGO! 8 logic relay (6ED1052-xxx08-0BA1 or later firmware 8.x) is connected over Ethernet to a Victron Cerbo GX using the LOGO!'s native Modbus TCP client. The application goal is straightforward: when the Cerbo's Generator autostart function triggers because the MultiPlus-II inverter reports an overload condition, the LOGO! must energize output Q1 so a downstream contactor, lamp, or auxiliary alarm is activated.
The user configured a Modbus read of register 3501 and routed the value into a B008 Analog Input block with a Gain of 1, On value of 9, and Off value of 10. Despite the generator physically starting, Q1 never closed. The root cause was traced to an incorrect Length field in the Modbus connection table (set to 3 instead of 1) which caused register misalignment and delivered the wrong data into VW memory.
System Architecture and Signal Path
The complete signal path from inverter overload to LOGO! output is:
- MultiPlus-II / MultiPlus detects AC output overload (current > rated, or sustained apparent-power overload).
- Cerbo GX evaluates the Generator autostart condition. In Settings → Generator start/stop → Conditions → Inverter overload, the autostart logic fires a generator start command after the configured delay (default 60 s in Victron community discussion on overload delays).
- Cerbo writes the new generator state to its internal Modbus holding register map.
- LOGO! acts as Modbus TCP client and polls register 3501 periodically (default poll interval 100 ms to 10 s in the connection table).
- The raw 16-bit value is placed into a VW (volatile word) memory address.
- A B008 Analog Input block reads the VW, applies Gain/Offset scaling, and compares to On/Off thresholds.
- When the scaled analog value crosses the On threshold, B008's output Q goes high and drives physical output Q1 via the LOGO! program.
Victron Cerbo Modbus Register 3501
The Cerbo GX exposes generator-related data in the holding-register range. Register 3501 belongs to the Generator group and reports the current generator state code. The decoded enum values (per Victron's published CCGX / Cerbo GX Modbus TCP register list) are:
| Code | State | Description |
|---|---|---|
| 0 | Stopped | Generator not running |
| 1 | Running | Generator active (manual or autostart) |
| 2 | Warm-up | Cool-down phase after stop signal |
| 3 | Cool-down | Cooling before stop |
| 4 | Stopped (alarm) | Shutdown due to alarm |
| 9 | Starting | Crank/start sequence in progress |
| 10 | Stopping | Stop sequence in progress |
Reading 3501 and detecting the 9 → 1 transition gives a reliable generator-active signal. To read the same logical code, point the LOGO! at register 3501 with a Length of 1 word. Reading three consecutive words (Length = 3) shifts the data, so 3501, 3502, and 3503 get loaded but only the first is the state code; the rest are unrelated fields and the Q1 trigger logic that compares to 9 fails because the wrong word is being evaluated.
LOGO! Hardware and Firmware Prerequisites
| Item | Specification |
|---|---|
| LOGO! base module | 6ED1052-1MD08-0BA1 (LOGO! 8.3) or 6ED1052-1CC08-0BA1 (LOGO! 8.4) – Ethernet variant required for Modbus TCP |
| Firmware | FS 04 or later (introduced improved Modbus scaling) |
| LOGO!Soft Comfort | V8.4 or later for FS 04 block library |
| Ethernet | Static IP on same subnet as Cerbo (e.g., 192.168.20.41 / 24) |
| Cerbo GX firmware | Venus OS 2.90 or later (Modbus TCP server stable for register 3501) |
| Network | CAT5e or better, both devices on same VLAN, no firewall blocking TCP port 502 |
Refer to the Siemens LOGO! 8 system manual (Siemens Online Support) for the full catalog and firmware matrix.
Connection Table Configuration in LOGO!Soft Comfort
Open Tools → Ethernet Connections and create a new client connection. The key parameters for reading register 3501 are:
| Field | Value | Notes |
|---|---|---|
| Connection type | Modbus TCP Client | LOGO! initiates the read |
| Server IP | 192.168.20.49 (example) | Static address of Cerbo GX |
| Port | 502 | Standard Modbus TCP port |
| Function code | 03 (Read Holding Registers) | Cerbo exposes generator data as holding registers |
| Register address | 3501 | Victron zero-indexed, single-word |
| Length (number of words) | 1 | Set to 1; was incorrectly 3 in the failure case |
| VW destination | VW10 (or any free volatile word) | Use even-numbered words to avoid double-word boundary issues |
| Poll interval / cycle | LOGO! scan cycle (default) | Faster than the autostart delay (60 s) so the response is captured |
| Read polarity | Standard | No byte-swap on 16-bit values |
B008 Analog Input Scaling Block
Place a B008 Analog Input block in the LOGO! program. Wire its input to the VW word filled by the Modbus connection (e.g., VW10). The B008 block computes:
Output = (Input × Gain) + Offset, clamped to [0, 1000]
Recommended scaling for the generator-state code coming from register 3501:
| B008 Parameter | Value | Rationale |
|---|---|---|
| Sensor | 0 – 10 V (unused, but select generic) | Block is repurposed as a comparator |
| Gain | 1 | 1:1 mapping of register value |
| Offset | 0 | No shift |
| On value | 9 | Threshold to fire Q1 = generator in Starting state |
| Off value | 10 | Hysteresis; release Q1 when value rises past 10 or falls below 9 |
| Output Q | Connect to Q1 (or to a logic gate feeding Q1) | Final drive to physical output |
For the hysteresis to work as expected, the On value must be less than the Off value when looking for a rising-edge trigger on an integer-coded state machine. Setting On = 9, Off = 10 produces a clean edge during the 9 → 1 transition (state machine moves from 9 to 1, which is a decrease, so the B008 latches on until the value drops below 9). If you prefer Q1 to release when the generator is no longer in Starting, set On = 9, Off = 9 (instant drop) or use a separate register like 3501 to drive an OR with state 1.
Step-by-Step Setup and Verification
- Wire the network. Connect LOGO! Ethernet RJ45 to the same switch as the Cerbo. Confirm both have static IPs in the same /24 subnet. From the LOGO!Soft Comfort Online → Ethernet Connections view, ping the Cerbo.
- Build the connection. In Tools → Ethernet Connections, add a Modbus TCP client connection. Fill in IP = Cerbo, port 502, function 03, register 3501, Length = 1, VW10.
- Place B008. Insert the B008 Analog Input block. Wire VW10 to the analog input. Configure Gain = 1, Offset = 0, On = 9, Off = 10. Wire the B008 output to Q1 (directly or through your application logic).
- Download and run. Transfer the program to the LOGO! and place it in RUN.
- Open Online Test. In LOGO!Soft Comfort press F11 (Online Test) to view live VW and AM values. With the generator stopped, VW10 should read 0. Manually start the generator from the Cerbo GUI; VW10 should change to 9 momentarily, then 1. B008 should assert Q1 during the 9 → 1 transition (and remain latched if hysteresis is configured as above).
- Trigger the overload condition. On the MultiPlus-II, apply a load larger than the rated inverter output (or simulate by setting the overload threshold low in the Cerbo's Generator start/stop → Conditions). Wait for the configured autostart delay (default 60 s). The generator should crank, the Cerbo should set register 3501 to 9, then 1, and Q1 should close.
- Verify Q1 voltage. Use a multimeter to confirm the relay contact closes. If the contactor or indicator lamp energizes, the path is correct.
Troubleshooting Matrix
| Observed symptom | Likely cause | Corrective action |
|---|---|---|
| VW10 always 0 or 65535 | Modbus timeout, wrong IP, port 502 blocked | Ping Cerbo, verify TCP 502, check Cerbo console for enabled Modbus server |
| VW10 reads 3502 / 3503 instead of 3501 | Length field set to 3 and the program wired to second/third word | Set Length = 1, or change the AM block input to the first VW of the read |
| VW10 reads the right value but Q1 never closes | B008 On/Off thresholds inverted or Off < On with no hysteresis gap | Set On = 9, Off = 10; ensure Gain = 1, Offset = 0 |
| Q1 chatters / oscillates | Value sits at 9 (Starting) for too long while generator warms up | Add a TON (on-delay) of 2 s after B008 output before driving Q1 |
| Q1 fires but never releases | Off value higher than all valid post-start states | Set Off value to 8 so Q1 drops as soon as the code leaves the Starting state and Steady-Run is reached |
| Generator starts but Q1 does not | Cerbo Generator autostart is disabled or the overload condition is not met | Enable autostart, verify Conditions → Inverter overload is checked, test by lowering overload threshold |
| LOGO! shows Ethernet error | Subnet mismatch or duplicate IP | Reboot LOGO!, reassign static IP, confirm no DHCP conflict |
Diagnostic Procedure: Finding the Right VW and AM
When the correct register for the desired signal is not known with certainty, use the iterative scan procedure recommended for the LOGO!:
- Set the Modbus connection to read from register 3500 with Length = 4. This populates VW10 (3500), VW12 (3501), VW14 (3502), VW16 (3503).
- Place four AMx (Analog Multiplexer) blocks or four B008 blocks, each tapping a different VW.
- Run Online Test (F11) and watch each word as you start/stop the generator.
- The word whose value transitions through 9 (Starting) and settles on 1 (Running) is the state-code register (3501).
- For production, change the read to a single-word Length = 1 pointing to the verified register. Use even-spaced VW addresses to avoid boundary corruption if you later widen the read.
Wiring and Safety Notes for Q1
- LOGO! relay outputs on the base module (Q1–Q4) are rated 8 A resistive / 2 A inductive at 240 V AC, or 10 A at 24 V DC. Verify coil/contact ratings of any contactor driven by Q1.
- For inductive loads, install a snubber (RC network for AC, flyback diode for DC) across the coil to extend relay life.
- Place a 6 A fast-blow fuse on the Q1 line per local electrical code.
- If Q1 is used to start a backup signal (warning beacon, alarm) ensure the beacon supply is from a separately protected circuit.
Cerbo GX Autostart Configuration Cross-Check
If Q1 never fires, also verify the autostart logic on the Cerbo:
- Remote Console → Settings → Generator start/stop.
- Confirm Generator autostart is enabled.
- Under Conditions, ensure Inverter overload is checked.
- Set the overload delay long enough that you can observe register 3501 in the LOGO! Online Test (e.g., 20 s for the test, restore to 60 s in production).
- Under Settings → Generator start/stop → Relay, assign the generator-start relay to a physical Cerbo relay if you also need a hard-wired start signal in parallel with the LOGO! logic.
Final Verification Checklist
- LOGO! Modbus connection: Server IP, port 502, FC 03, register 3501, Length = 1, VW10.
- B008: Gain = 1, Offset = 0, On = 9, Off = 10, output wired to Q1.
- Online Test shows VW10 transitions 0 → 9 → 1 during a generator start.
- B008 output Q asserts during the transition and Q1 contact closes (multimeter reads 0 Ω).
- Triggering an inverter overload causes the Cerbo to start the generator and Q1 to fire after the configured delay.
- Stopping the generator causes Q1 to release (hysteresis to Off value).
FAQ
Why is the Length parameter critical when reading Victron register 3501?
The Length field in the LOGO! Modbus connection tells the client how many consecutive 16-bit words to fetch. Register 3501 is a single-word generator-state code; setting Length = 3 pulls 3501, 3502, and 3503 into VW10/VW12/VW14. If the B008 block is then wired to the second or third word the comparison to value 9 will never succeed. Always set Length = 1 for a single-register read.
Which register on the Cerbo reports the generator state to a Modbus client?
Register 3501 in the Cerbo GX holding-register map returns the current generator state code: 0 stopped, 1 running, 9 starting, 10 stopping. The full register list is published in Victron's CCGX/Cerbo Modbus TCP register spreadsheet.
How do I find the right register when the documentation is unclear?
Set the LOGO! connection to read 4 consecutive words starting a few registers below your target (e.g., 3500, Length = 4). Place four B008 blocks on the populated VW words and run Online Test. The word that transitions through the value you expect during a generator start is the correct register. Narrow the production read to Length = 1 on that exact register.
What B008 settings make Q1 close on a generator autostart from overload?
Wire the VW filled by the Modbus read into a B008 Analog Input block. Set Gain = 1, Offset = 0, On value = 9 (Starting state), Off value = 10. B008 will assert its Q output when the register transitions to 9, and release when the value passes 10. Connect the B008 output to Q1 directly or through your application logic.
Does the LOGO! need firmware updates for stable Modbus TCP communication?
Yes. Use LOGO! 8.3 (6ED1052-1MD08-0BA1) or 8.4 (6ED1052-1CC08-0BA1) with firmware FS 04 or later, paired with LOGO!Soft Comfort V8.4 or newer. Earlier FS levels have known Modbus client edge-case bugs that can cause intermittent timeouts on holding-register reads.