Siemens PCS 7 CMT: Connecting Multiple Outputs to One CFC Input
Control Module Types (CMTs) in SIMATIC PCS 7 provide a powerful method for standardizing and reusing automation logic. A recurring engineering question in plant design is whether multiple block outputs can be interconnected to a single input inside a CMT — for example, gathering the QBAD (bad quality) flags from a pair of driver blocks (open/close) into one CSF or PERMIT input of a higher-level block such as an interlock.
The short answer is that the SIMATIC CFC editor never permits a direct fan-in of two sheet outputs onto one sheet input. The CFC chart editor enforces a one-to-one relationship for interconnections on the sheet itself. However, the Control Module Type editor exposes an optional interconnection mechanism through the Technological I/O tab that gives the same end result at chart instance level, and the Advanced ES (AdvES) variant concept lets you expose different upstream sources per plant unit without duplicating the CMT.
1. Why CFC Forbids Direct Output-to-Output Merging
CFC charts compile into a sequence of PLC operations. An interconnection represents a single data assignment. If two outputs were tied to the same input directly on the sheet, the compiler would have to define an arbitration rule (last-writer-wins, AND, OR, priority) and an evaluation order. To keep the chart semantics deterministic, the CFC editor simply disallows the operation and reports a placement error.
The restriction is enforced at three levels:
- Chart editor (runtime view): The drag-and-drop cursor shows the "no entry" symbol when a second source is dropped on an occupied input pin.
-
Compiler: The CFC compiler in PCS 7 V9.x / V10.0 returns error
Cannot connect output of block <name> to input of block <name>: input already interconnected. - CMT Technological I/O editor: Each optional input is configured with a single canonical source per CMT, but the canonical source can be reassigned per instance through variants.
The Siemens manual CFC for SIMATIC S7 and the PCS 7 Compendium describe this behavior. For deeper details on the optional interconnection flag, refer to the official Siemens document Control Module (CM) Technology - Efficient Engineering in SIMATIC PCS 7 V10.0.
2. Architectural Background: Control Module Types and Variants
A Control Module Type is a CFC chart that has been declared as a type in the plant view. It carries a Technological I/O interface — a list of named parameters that act as the public contract between instances of the CMT and the surrounding automation code. Each parameter has a flag called Optional.
| Flag | Effect on CMT usage | Effect on AdvES variant creation |
|---|---|---|
| Optional = No | Mandatory input/output; every instance must interconnect it to a real source or sink. | Cannot be left dangling when generating variants. |
| Optional = Yes | May be left unconnected in instance charts. | Different variants of the same CMT may interconnect this pin to different sheet blocks. |
The Optional flag is the cornerstone for implementing "either/or variants" — for instance, a valve CMT that is sometimes driven by an INTERLOCK_2 block and sometimes by an INTERLOCK_8 block, depending on the safety integrity level of the loop. The PCS 7 documentation uses the term either/or variants exactly for this case (CM Technology manual, section 5.4).
3. The Virtual Multi-Source Interconnection Pattern
The pattern that solves the "many outputs to one input" question uses the CMT itself as the merger point. Instead of trying to drag two sheet outputs onto one sheet input inside the CMT chart, both source parameters are promoted to the Technological I/O, and one of them is then connected to the destination input inside the CMT. The second source is exposed only at the variant level.
3.1 Concrete example: motor interlock with driver quality flags
Consider a motor CMT that contains two driver FBs, an open driver and a close driver (typical for reversing starters or double-acting actuators). Each driver exposes a QBAD output. The higher-level interlock block has a PERMIT input that must be deactivated if either driver is in bad quality.
| Block | Output of interest | Promoted to Technological I/O as |
|---|---|---|
| FB_OPEN (driver) | QBAD | QOPEN_BAD |
| FB_CLOSE (driver) | QBAD | QCLOSE_BAD |
| FB_ILOCK (interlock) | PERMIT (input) | PERMIT (consumed inside CMT) |
Inside the CMT chart, only QOPEN_BAD is wired to PERMIT. The variant editor then offers two variants:
-
Variant A — OPEN active, CLOSE inactive: external interconnections connect
QOPEN_BADto the actualQBADsource of the open channel;QCLOSE_BADremains unconnected (or tied to constant0). -
Variant B — both channels active: external interconnections from the open-channel
QBADland onQOPEN_BAD, and the close-channelQBADlands onQCLOSE_BAD. The internal sheet now shows two virtual sources toPERMIT, one through QOPEN_BAD and one through QCLOSE_BAD; the AdvES generator reconciles them so thePERMITinput sees whichever variant's wiring is active.
PERMIT. The "merge" appears only in the variant authoring dialog and in the generated instance interconnections.4. Step-by-Step Procedure in the CMT Editor
The procedure below assumes PCS 7 V9.0 SP6 / V9.1 / V10.0 with the Advanced ES add-on installed. Equivalent steps apply for PCS 7 V8.2 with the CMT engineering package.
4.1 Prerequisites
- PCS 7 engineering station with CFC V9.x or V10.0 installed.
- Advanced ES license (AdvES) for variant authoring. Without AdvES, the CMT can still use Optional flags, but variant generation is limited to a single variant.
- A control module that has already been declared as a CMT (right-click chart → Control module technology → Declare as type).
- Plant view must show the CMT icon under AS Objects → Charts.
4.2 Promoting parameters to Technological I/O
- Open the CMT chart in CFC. Switch to the Technological I/O tab at the bottom of the editor (or open it via View → Technological I/O).
- Drag the
QBADoutput ofFB_OPENfrom the sheet onto the Technological I/O list. The editor prompts for a symbolic name; enterQOPEN_BAD. - Repeat for the
QBADoutput ofFB_CLOSE; name itQCLOSE_BAD. - Select the newly created Technological I/O entries and set the Optional checkbox to Yes in the properties dialog.
- Confirm with OK; the chart sheet now shows the two parameters as floating input/output nodes with the same name as in the Technological I/O list.
4.3 Interconnecting inside the CMT
- Drag a connection from the
QOPEN_BADsheet node to thePERMITinput of the interlock FB. This is now a normal intra-sheet interconnection. - Leave
QCLOSE_BADfloating on the sheet — it has no intra-sheet destination. The compiler accepts this because Optional = Yes. - Compile the chart with Chart → Compile → Chart as CMT. The compiler issues no error because every mandatory input has been satisfied.
4.4 Creating variants in AdvES
- Switch to the plant view and right-click the CMT instance folder. Choose Advanced ES → Create variant.
- Name Variant A as OPEN_only. In the variant editor, drag a real source block (for example, the diagnostic block of the open-driver channel) onto the
QOPEN_BADTechnological I/O pin. LeaveQCLOSE_BADbound to a constantFALSEor disconnected. - Create Variant B DUAL_channel. Map the open-channel
QBADsource toQOPEN_BADand the close-channelQBADsource toQCLOSE_BAD. - Generate the variant instance charts from the AdvES dialog (Generate instances → from CMT → apply variant). Each generated instance carries the appropriate interconnections.
- Compile and download the AS program. The instances now physically carry the multi-source — > single-input structure at runtime, even though the CMT itself shows a single source.
PERMIT input must show one incoming connection per variant; the AdvES-generated interconnections to QOPEN_BAD and QCLOSE_BAD must appear as incoming lines on the Technological I/O pins.5. Runtime Semantics of the Implicit OR Merge
Even though the CFC compiler refuses to merge two outputs on a sheet, the variant mechanism effectively produces an OR-of-quality pattern. The runtime rule is determined by the destination block, not by the editor:
-
Boolean
PERMITinputs: Most interlock blocks treat aQBADrising edge as a "channel not healthy, do not allow operation" signal. If either virtual source is high, the channel is unhealthy. The pattern is therefore OR by design. - Word/DWord quality status: When the destination is a status word, the last writer wins; this is typical for diagnostic aggregators. The AdvES variant approach gives one writer per variant, so the writer selection is unambiguous.
- Analog values: If two analog outputs are merged, take the higher of the two for safety interlock (fail-safe direction), unless the destination explicitly defines an averaging policy.
QBAD_OR computed in a dedicated FB) and document it in the safety requirement specification.6. Verification Checklist
After applying the multi-source pattern, verify the result with the following steps:
- Compile CMT without errors. In CFC, choose Chart → Compile → Check consistency. Expected: no errors, optional parameters are listed in the warnings as "not interconnected at CMT level".
- Generate both variants. Open Advanced ES → Variant overview; both variants should report status Generated with no unresolved references.
- Cross-reference the Technological I/O. In the variant instance chart, every Technological I/O pin must show the expected incoming or outgoing line according to the variant definition.
-
Download and run. Use SIMATIC Manager PLC → Download; on the AS, the
PERMITinput of each instance must show the value wired by the active variant. - Force a QBAD condition on one of the upstream driver blocks (for example, by simulating channel fault in the diagnostic FB). The destination interlock must react as expected: for a safety-related interlock, the operator command must be inhibited; for a permissive, the permissive must drop.
- Audit the safety case. If the loop is SIL 2 or higher, document in the SRS that the multi-source pattern is implemented via CMT variant rather than direct OR logic, and reference the CMT version and the AdvES variant IDs.
7. Common Errors and How to Recover
| Symptom | Likely cause | Remedy |
|---|---|---|
| CFC compiler error: "input already interconnected" when dragging second source in chart | Direct sheet-level merge attempted inside the CMT | Promote the second source to Technological I/O, mark it Optional, and use AdvES variants to interconnect from instance level. |
| Variant generator reports "unresolved reference to QOPEN_BAD" | The Technological I/O parameter name was renamed after the variant was created | Open the variant editor and remap the renamed parameter; do not edit the CMT Technological I/O names without regenerating variants. |
| At runtime, the interlock sees QBAD = 0 even though a driver is bad | Optional input was left unconnected in the active variant | Check the variant definition; the active variant must bind every safety-relevant optional pin to a real source or to the required default (typically constant 0 for "always healthy" or 1 for "always unhealthy"). |
| Cross-reference shows two lines on PERMIT | Variant instance was edited manually after generation | Do not edit generated variant instances by hand. Regenerate from the variant definition, or detach the instance from the variant if a one-off change is needed. |
| Compile error after importing CMT into a new PCS 7 project | AdvES license missing on the target station | Install the AdvES option or remove the multi-variant aspect and reduce the CMT to a single variant. |
8. Alternative Approaches
If the AdvES variant mechanism is not available, two manual workarounds exist.
8.1 Aggregate block pattern
Create a small custom FB that takes N QBAD inputs and exposes a single aggregated output (for example, QANY_BAD) implemented as OR of all inputs plus the standard PCS 7 quality propagation. Place the FB inside the CMT and connect the upstream driver QBAD outputs to its inputs. The destination interlock then receives a single QANY_BAD input. This works without Optional flags but requires a small block development effort and re-import into the master data library.
8.2 External merger chart
Define a small shared CFC chart that takes two upstream QBAD signals, merges them with an explicit OR gate (AND block with negated inputs, or a custom OR FB), and exposes the merged signal as a chart output. The CMT then interconnects to the merged output of this external chart. This keeps the CMT single-variant and avoids modification of the standard library, at the cost of an additional chart in the S7 program.
9. Comparison of Patterns
| Pattern | Tooling required | Multi-source support | Safety review overhead | Library footprint |
|---|---|---|---|---|
| Direct sheet merge | CFC only | Not supported | N/A | N/A |
| CMT Optional + AdvES variants | CFC + AdvES | Yes, per variant | Low; pattern is documented by Siemens | No new FB |
| Aggregator FB inside CMT | CFC + custom FB | Yes, single variant | Medium; FB must be reviewed | One custom FB |
| External merger chart | CFC only | Yes, single variant | Low; uses standard OR/AND blocks | One extra chart |
10. Engineering Best Practices
- Reserve Optional flags for genuine either/or choices. A CMT where every Technological I/O entry is Optional defeats the standardization purpose of the CMT.
- Document variants in the project manual. Each variant should have a one-line description visible in the AdvES dialog (right-click → Properties → Comment). Engineers commissioning a new loop must be able to read the variant intent without opening the chart.
- Limit fan-in to two sources. When three or more sources need to feed one input, prefer an aggregator FB to keep the CMT readable. Variants of fan-in degree greater than two are difficult to maintain.
- Lock CMT names after first variant generation. Renaming Technological I/O pins after variants exist forces a full regen. Add a project-specific naming convention review step before the first cut.
- Run the cross-reference after every variant change. The cross-reference is the only tool that proves the instance chart matches the variant definition. Treat any discrepancy as a release blocker.
11. FAQ
Can I drag two CFC sheet outputs onto one input directly inside a CMT?
No. The CFC editor enforces one-to-one interconnections on the chart and the compiler will reject a second source. The supported way to achieve the same end result is to promote at least one source to a Technological I/O pin with Optional = Yes and then use AdvES variants or an aggregator FB to feed that pin at instance level.
What is the difference between a CMT with Optional flags and a CMT with AdvES variants?
Optional flags allow a Technological I/O pin to remain unconnected in a generated instance. AdvES variants go further and let the same CMT be instantiated multiple times with different upstream sources for the same Optional pin, without duplicating the CMT itself. Variants require the Advanced ES option in PCS 7.
How does the runtime merge behave when two QBAD sources feed one PERMIT input?
For Boolean PERMIT inputs in the standard PCS 7 interlock library, a high value on any incoming QBAD causes the interlock to drop the permissive. The merger behaves as an OR of bad-quality. For status-word destinations the last writer wins, so the variant that is active determines which upstream source is observable.
Can I edit a generated variant instance chart by hand?
You can detach the instance from its variant and edit it as a normal CFC chart, but any subsequent regeneration of the variant will overwrite your changes. The recommended workflow is to extend the variant definition rather than edit generated charts.
Which PCS 7 versions support the multi-source CMT pattern?
The Optional Technological I/O flag has been available since PCS 7 V7.1. The full AdvES variant editor, including either/or variants as described in the official CMT engineering manual, requires PCS 7 V8.2 or later; PCS 7 V9.0 SP6, V9.1 and V10.0 are commonly used in current projects. Refer to the Siemens CMT Engineering V10.0 manual for the authoritative version-specific behavior.