1. Problem Overview
On Siemens LOGO! 8.1 and LOGO! 8.2 (FS4) base modules, a User-Defined Function (UDF) cannot expose more than four logical outputs on its boundary, and the UDF compiler raises "Blocks without connection to an output" when an internal block (most commonly the analog multiplexer AM1) cannot reach the UDF's AQ1 pin deterministically. Both failures prevent the project from being transferred to the LOGO! hardware and stop the Soft Comfort simulation from running.
The symptoms typically appear when a developer:
- Adds a fifth (digital or analog) output to a UDF body.
- Uses the AM1 block to feed AQ1 but never wires AM1's input to a UDF input pin.
- Imports a UDF saved from a different firmware generation (e.g., LOGO! 7 → LOGO! 8.1/8.2 FS4).
2. UDF Output Limit Specification
The UDF element in LOGO! Soft Comfort (8.1 and 8.2 FS4) is defined by the following boundary contract:
| UDF Pin | Maximum Count | Digital | Analog |
|---|---|---|---|
| Inputs (combined) | 8 | Yes (counted) | Yes (counted) |
| Outputs (combined) | 4 | Yes (counted) | Yes (counted) |
| Internal function blocks | Unlimited within program block budget | — | — |
Each digital and each analog I/O pin counts against the same 4-output total. A UDF that needs a single Q1 and a single AQ1 already consumes two of the four slots, leaving only two for additional logic.
Reference: Siemens LOGO! 8 System Manual (6ED1052-1xx08-0BA1) – Chapter 4.4.6 "User-Defined Functions (UDF)".
3. UDF Input Limit and Combined I/O Math
Inputs follow the same sum-of-all-types rule. Eight pins, mix-and-match, digital or analog:
Inputs_total = Inputs_digital + Inputs_analog <= 8
Outputs_total = Outputs_digital + Outputs_analog <= 4
Practical combinations that fit the envelope:
| Configuration | Inputs Used | Outputs Used | Status |
|---|---|---|---|
| 4 digital out + 1 analog out | 0–8 | 5 | Rejected |
| 2 digital out + 2 analog out | 0–8 | 4 | Accepted |
| 1 digital out + 1 analog out + 2 spare | 0–8 | 2 | Accepted (2 spare) |
| 5 digital inputs + 3 analog inputs | 8 | 0–4 | Accepted |
| 9 mixed inputs | 9 | any | Rejected |
When a UDF exceeds the input ceiling, the compiler error shifts from "no connection to output" to a generic "UDF pin count exceeded" dialog with the offending line highlighted in the UDF configuration panel.
4. Root Cause: AM1 and AQ1 Connection
The AM1 (Analog Multiplexer) is a special function block that selects one of two analog inputs to forward to its output. Inside a UDF, the AM1's output is bound to the UDF's AQ1 pin. If the AM1's input is left floating — that is, not connected to any UDF input, constant, or upstream block — the compiler cannot resolve a deterministic value at AQ1.
The Soft Comfort 8.1/8.2 (FS4) compiler reports this condition as:
Error: Blocks without connection to an output
Block: AM1 (instance <n>)
Path: UDF <name> > AM1
Cause: No path to a UDF output pin (Q1..Q4 / AQ1..AQ4)
The error message is intentionally generic — the Info window lists the failing UDF but does not pinpoint the offending block. Engineers must trace the UDF body manually.
5. Memory Footprint of UDF Instances
A UDF does not deduplicate memory usage. Each instance of the UDF in the main program is compiled as an independent copy of the function-block graph. The memory cost is additive:
Memory_blocks_total = SUM( UDF_i.block_count * UDF_i.instance_count )
Example: a UDF containing 20 function blocks used three times in the main program consumes 60 blocks from the LOGO! 8 program block budget:
| UDF Block Count | Instances | Effective Blocks | LOGO! 8.1 (0BA8) Budget | LOGO! 8.2 (0BA8) Budget |
|---|---|---|---|---|
| 20 | 3 | 60 | 400 | 400 |
| 20 | 5 | 100 | 400 | 400 |
| 20 | 20 | 400 | 400 (exhausted) | 400 (exhausted) |
Reference: LOGO! 8 System Manual – Chapter 3.3 "Resources" (400 function blocks for 0BA8 standard; 1,000 for 0BA8 long-memory variants such as 6ED1052-1MD08-0BA1 with FS4 or later).
6. Diagnosing "Blocks Without Connection to an Output"
Follow this procedure to localize the fault inside a UDF:
- Open the project in LOGO! Soft Comfort 8.2 (FS4) and select the failing UDF in the navigation tree.
- Open the Tools > Info Window (F5). The error entry references the UDF name only.
- Click Edit > Open UDF. The UDF diagram is shown in its own editor pane.
- Use View > Show Block Connections (Ctrl+F7) to enable the green/blue wiring overlay.
- Scan every analog block (AM1, AM2, AM3, AM4, AM6) for input pins that show no wire, no constant, and no upstream linkage.
- Hover the cursor over AM1; the tooltip shows the connected target. If the target is none, the block is floating.
SVG topology of a failing UDF:
7. Solution 1: Refactor to Stay Within the 4-Output Ceiling
Re-evaluate the UDF's purpose. A UDF is intended for a small, repeated logic fragment, not for a complete subsystem. If the design needs more than 4 outputs, the engineering answer is to break the logic into multiple UDFs or move it into the main program as a sub-routine graph.
Refactor pattern:
- UDF_A (4 outputs max) – primary control outputs Q1..Q3, AQ1.
- UDF_B (4 outputs max) – secondary status outputs Q1, AQ1.
- Both UDFs share inputs by parameter passing from the main program.
8. Solution 2: Split a Single UDF into Two Independent UDFs
When the fifth output is genuinely required, split the UDF along the natural data-flow boundary:
- Identify the two output groups that have minimal cross-coupling.
- Duplicate the input pins across both new UDFs (each UDF independently satisfies the 8-input ceiling).
- Compile each UDF and re-test in Soft Comfort simulation.
9. Solution 3: Wire AM1 to a UDF Input
The cleanest fix for the floating-AM1 fault is to bring the analog source into the UDF boundary as an input pin:
- Open the UDF editor.
- Right-click the AM1 input pin and choose Connect to UDF Input.
- Add a new analog input pin to the UDF (e.g.,
AI_AM1_IN). This consumes one of the eight input slots. - From the main program, connect the appropriate analog tag (e.g.,
AI1or an analog network input) toAI_AM1_IN. - Recompile. The Info window should clear.
Verified topology after the fix:
10. Version Compatibility: LOGO! 7 vs LOGO! 8.1/8.2 FS4
UDFs saved under LOGO! Soft Comfort 7 are not directly portable to LOGO! 8.1/8.2 FS4 because the UDF block library and pin metadata changed between the two generations. The import wizard accepts the file but the compiler may still reject it if:
- The source UDF used analog blocks not present in the target firmware.
- The UDF was saved with a placeholder pin that becomes invalid in FS4.
- The source used the LOGO! 7 "AM1" with two analog inputs; LOGO! 8.1/8.2 (FS4) supports the same block, but the configuration dialog is different.
Procedure to migrate a LOGO! 7 UDF to LOGO! 8.2 FS4:
- Open the original
.lscfile in Soft Comfort 7. Save a copy as.lma(LOGO! 7 archive). - Open Soft Comfort 8.2 (FS4). Use File > Open and select the
.lma. - The migration tool re-binds blocks to LOGO! 8 equivalents.
- For each UDF, open the body and re-validate pin count against the 8-input / 4-output limits.
- Recompile and simulate.
11. Verification Procedure
After applying any of the three solutions, run this verification sequence:
- Compile the project (F11). The Info window must be empty.
- Simulate (F8). Toggle the UDF inputs and confirm all expected outputs change state.
- Connect via Ethernet to the LOGO! 8.1 or 8.2 base module.
- Transfer the project (Ctrl+Shift+F9). The transfer must complete without checksum warnings.
- Run the program. On the LOGO! display, navigate to the UDF instance and verify the analog and digital outputs track the inputs.
| Check | Expected Result | Failure Indicator |
|---|---|---|
| Compile (F11) | No errors in Info window | "Blocks without connection to an output" |
| Simulation (F8) | Outputs update in real time | Output frozen at zero / undefined |
| Block budget | Used < 400 (or < 1,000 long-memory) | "Program too large" dialog |
| Ethernet transfer | Project uploaded cleanly | UDF checksum mismatch |
| Online test | All UDF outputs visible on display | Output missing or always off |
12. Troubleshooting Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
| "Blocks without connection to an output" | AM1 input floating inside UDF | Connect AM1 input to a UDF input pin (Solution 3) |
| 5th UDF output rejected | Output ceiling exceeded | Split UDF (Solution 2) or refactor to main program (Solution 1) |
| "UDF pin count exceeded" | More than 8 inputs | Combine inputs via multiplexer block; or split UDF |
| LOGO! 7 UDF fails on 8.1/8.2 FS4 | Generation mismatch | Re-save UDF on FS4; recompile |
| Program too large | UDF instance multiplier | Reduce UDF block count; reduce instance count; upgrade to long-memory 0BA8 |
| UDF checksum mismatch on transfer | UDF saved under older FS | Open UDF on target FS, save, recompile, re-transfer |
13. Field-Proven Caveats
- Hidden AM1: AM1, AM2, AM3, AM4, and AM6 are easy to overlook because they are analog-only. If a UDF uses any AMx, every one of them must have a path to AQ1 or to a Q1..Q4 pin indirectly through a downstream block.
- Spare pins: It is legal to define fewer than 8 inputs on a UDF. Unused input slots are not consumed.
- Analog output sharing: AQ1 of the UDF is the only analog output the UDF can expose. If the logic needs two analog values, define a second UDF instance with its own AQ1.
- Performance: UDF execution is inline; there is no function-call overhead in the LOGO! 8 firmware. Latency is identical to writing the same blocks in the main program.
- Password protection: A password-protected UDF body can still fail the same compile checks. The Info window will show the error but will not reveal the block graph.
14. Related Manuals and References
For deeper protocol, hardware, and programming details, consult the official Siemens documentation set. Always cross-check the manual edition against the FS4 firmware label on your LOGO! 8.2 base module (the label is on the right side of the housing, e.g., 6ED1052-1MD08-0BA1 FS4):
- LOGO! 8 System Manual (6ED1052-1xx08-0BA1) – UDF specification, resource budgets, FS4 changes.
- LOGO! 8.2 Product Information – FS4 release notes, AM block additions.
- LOGO! Soft Comfort 8.2 Online Help – UDF editor workflow.
What is the maximum number of outputs a LOGO! 8 UDF can expose?
A LOGO! 8.1 or 8.2 (FS4) UDF can expose a combined maximum of 4 outputs, where digital and analog outputs count toward the same total. The limit is enforced by the Soft Comfort 8.x compiler and cannot be raised.
How many inputs can a LOGO! 8 UDF have?
Up to 8 inputs, digital and analog combined. For example, 5 digital + 3 analog inputs fit, but 9 mixed inputs are rejected at compile time.
Why does my UDF fail with "Blocks without connection to an output" even though AM1 looks connected?
The error appears when AM1's input is not wired to a UDF input pin, constant, or upstream block. The AM1 output reaches AQ1, but the compiler requires a deterministic path from every block in the UDF to a UDF output pin. Wire the AM1 input to a UDF input to clear the error.
Does each instance of a UDF consume the full memory footprint?
Yes. A UDF is expanded inline for every instance. A 20-block UDF used three times costs 60 blocks from the LOGO! 8 program budget (400 blocks for 0BA8 standard, 1,000 for long-memory 0BA8 variants).
Can a UDF saved in LOGO! Soft Comfort 7 be opened in LOGO! Soft Comfort 8.2 FS4?
Migration is supported via File > Open on the LOGO! 7 archive, but the imported UDF must be re-saved on FS4 before transfer to an FS4 base module. Otherwise, a "UDF checksum mismatch" warning appears at download.