Problem Definition: "Cannot Be Interconnected" on Protected CFC Block Inputs
When working inside SIMATIC Manager with the CFC (Continuous Function Chart) editor, an instance of a library function block (for example, FB 504 Meas_Hi or any custom type delivered from a sister-plant master data library) can display the runtime attribute <cannot be interconnected> on one or more IN, OUT, or IN_OUT parameters. The signal you intend to wire (typically the result of an ADD_R, MUL_R, or any analog math block) cannot be dragged onto the input pin, and the right-click Interconnect to Address dialog is greyed out.
The root cause is not a corrupted chart, a missing GSD, or a license problem. It is a compile-time S7_link attribute flag on the block type's I/O declaration that the original developer set to false when the block was generated. The flag is preserved through know-how protection as well, so the symptom survives a password-protected source. The symptom is independent of the chart revision, the CPU firmware, and the CFC library version.
Affected Environments and Versions
| Component | Tested Versions | Notes |
|---|---|---|
| SIMATIC Manager | V5.4 SP5, V5.5, V5.6 | Same procedure; V5.6 is the last PCS 7 release on the classic toolchain |
| CFC Editor | V8.0 SPx through V9.0 SPx | Editor version is coupled with PCS 7 V8.x / V9.0 |
| STEP 7 | V5.5 + HFxx, V5.6 | Used to open the protected FB source for I/O attribute editing |
| PCS 7 | V8.0, V8.1, V8.2, V9.0 | Library blocks delivered with APL or customer master libraries |
| Target CPU firmware | S7-300 / S7-400 / S7-410 / AS 410 firmware ≥ V8.x | No CPU-side change required; fix is purely in the engineering project |
For TIA Portal users running the newer CFC in TIA add-on (V15.1 and later), the protected-block workflow is fundamentally different: S7_link is not a writable attribute in the portal; the equivalent remedy is to either change the I/O to Variable in the PLC data type or to regenerate the block from the open source. The procedure below targets the classic PCS 7 / SIMATIC Manager toolchain that is still the dominant platform in operating plants.
Root Cause Analysis: The S7_link Attribute
Every I/O parameter of an FB or FC carries a set of block attributes stored in the offline source. The most operationally significant of these is S7_link:
| Attribute Value | Behavior in CFC | Behavior in SCL/ST Source |
|---|---|---|
S7_link = true |
Pin is freely interconnectable from CFC, SFC, or chart-to-chart | Visible as normal VAR_INPUT / VAR_OUTPUT / VAR_IN_OUT |
S7_link = false |
Pin shows <cannot be interconnected>; only constants or pre-assigned values accepted |
Compiled as VAR_INPUT { S7_link := 'false' }; access is restricted to the block's own code |
The default for hand-written STL/SCL blocks is S7_link = true. The flag is set to false deliberately when the developer wants to fix the parameter to a default, when the parameter is a block-internal state that should never be re-wired from CFC, or (most often) when the block was generated from a higher-level tool with a non-standard declaration. Library blocks from third-party vendors frequently inherit false because the supplier does not anticipate customer wiring changes.
Prerequisites Before Editing the Block
- Open the project as a project editor (write access to the block folder, not the read-only online view).
- Close every CFC/SFC chart and the OS runtime editor; concurrent chart open will hold a write lock and the attribute save will be rejected with Object is in use.
- Make a backup copy of the FB source: in the project block folder, right-click the FB and choose Copy, then paste into a sibling folder. Do not skip this step; if the attribute is mis-edited the source will not compile and recovery is otherwise painful.
- Identify the protection level: open the FB, acknowledge the Block protected – do you want to open anyway? dialog. If a password prompt appears, request it from the original library author. The I/O attribute table is editable even with know-how protection active, but a password is required if the protection level is set to Write-protected rather than Read-protected.
- Compile once with Check Block Consistency to confirm a clean baseline before any edit.
Step-by-Step Procedure to Unlock S7_link on a Protected FB
The procedure applies to any Siemens FB (FB 504 Meas_Hi in the source case, but equally to the APL blocks CTRL_PID (FB 1869), MOT_SPEED (FB 1660), VALVE_ANA (FB 1664), or any customer block). The principle is the same: open the protected source, edit the I/O attribute, recompile, then refresh the type in every chart.
- Open the block from the project block folder. In SIMATIC Manager, expand S7 Program > Blocks, right-click the FB (for example, FB 504), choose Open Object. The LAD/STL/FBD editor starts and immediately prompts that the block is protected; click OK to acknowledge. The code body is not editable, but the I/O declaration pane at the top of the editor is.
-
Locate the target I/O parameter. In the declaration table (top portion of the editor), scroll to the parameter that you need to interconnect. Typical candidates are inputs named
SP,SP_HI,SP_LO,LIMIT,THRESHOLD, or any custom IN/IN_OUT. - Open the parameter's properties dialog. Right-click the row in the declaration table and select Properties… (or double-click the row). The Properties of I/O dialog opens.
- Switch to the Attributes tab. The dialog has at least two tabs; choose Attributes.
-
Edit the S7_link attribute. In the attribute list you will see a row labeled
S7_linkwith the valuefalse(all lower case, no quotes). Click the value cell, change it totrue(again, all lower case). Do not alter any other attribute in this dialog unless the change is documented. - Save the FB source. Press Ctrl+S or use File > Save. If the protection level is read-only, you will be prompted to enter the know-how protection password at this point.
- Recompile the source. Right-click the FB in the block folder and choose Compile (or run Check Block Consistency project-wide). Resolve any syntax errors that surface – they typically point to a missing semicolon in the I/O section if a stray character was introduced.
- Refresh the block type in the CFC Online block folder. Open any CFC chart, then from the CFC menu select Options > Block Types…. The Block Types dialog lists the master library block on the left and the project-side block on the right. Select the modified FB on the left and click the right-arrow button, or select the project-side entry on the right and click New Version. Click OK to push the refreshed type into every instance in the chart.
- Alternative update path. If the original block was modified in the master data library folder rather than the project block folder, use Options > Charts > Update Block Types from the SIMATIC Manager menu, or drag-and-drop the FB from the CFC Catalog Libraries tab onto the chart.
-
Verify the pin is now interconnectable. Close the chart, reopen it, and right-click the input pin of the instance. The context menu should now include Interconnect to Address and the pin should accept a drag-and-drop wire from your
ADD_Routput.
Verification and Functional Test
- Compile the CFC chart: Chart > Compile > Charts as Program. The compiler must finish without warnings. Any warning of the form Signal unconnected indicates that the refresh step did not propagate; re-run Update Block Types.
- Download to the AS: use PLC > Download. The CPU should report Download OK with no SF.
-
Online watch the connection: in the CFC online view, hover the new wire. The status display should read the actual real value from the
ADD_Routput, not the???placeholder. -
Force-test the value transfer: open the
ADD_Rinstance in VAT or watch table, set the inputs to a known pair, and observe the wiredSP/LIMITparameter on the previously locked FB. The real value must track the math result with a scan-time delay equal to the OB1 cycle. -
Document the deviation: open a change request (in COMOS, in the PCS 7 change log, or in the customer's CMMS), record the FB number, the original
S7_link = falsestate, the fact that you flipped it totrue, and the library version stamp. This trail is essential for the next library upgrade.
Why the Procedure Sometimes Fails on the First Attempt
Engineers report that the pin is still locked even after following the procedure. The recurring failure modes and their root causes are catalogued below.
| Observed symptom | Root cause | Corrective action |
|---|---|---|
| Attribute save is silently rejected | FB is opened from the Online block folder, not the project block folder | Close online view, open offline block folder, repeat |
S7_link row is greyed out |
Know-how protection is set to Write-protected, not Read-protected | Obtain the protection password from the library author or generate a fresh FB from a clean source |
Pin reverts to <cannot be interconnected> after chart compile |
The chart still references the old type; Update Block Types was not executed | Open the CFC, run Options > Block Types…, push the new version to all instances |
| Compile aborts with Type conflict in IN_OUT | The data type of the new source does not match the data type expected by the original IN_OUT declaration; this is unrelated to S7_link | Verify the absolute data type (REAL, INT, BOOL) on both sides; the S7_link flip will not mask a true type mismatch |
| Pin accepts the wire but the runtime value is always zero | The connection was made to a comment or identifier pin rather than the value pin; CFC has separate pin types for value, identifier, and comment | Delete the wire, right-click the input, select Interconnect to Address, and pick the value-level address from the dialog |
| The change is lost on the next library update | The FB is being overwritten by a higher-priority master library on every Update Block Types | Move the modified FB into the project's local master data library and remove it from the global catalog path, or escalate to the library owner to ship a corrected version |
Alternative Recovery Paths
If the protected-block route is blocked by an unrecoverable password or by a write-protection that cannot be lifted, three engineering alternatives exist.
Wrap the locked block in a new type
Create a new FB (for example, FB 1504 Meas_Hi_Wrap) that contains the locked FB 504 as a multi-instance. Declare wrapper I/O variables that are S7_link = true, and wire them inside the wrapper to the locked block's parameters. The chart can then interconnect to the wrapper. This pattern is the cleanest from a documentation standpoint and is the standard workaround for any third-party block whose internals are inaccessible.
Use a CFC signal-level copy block
Insert an ADD_R or a copy block whose output is the address that FB 504 expects. If FB 504's SP_HI was originally hard-wired to a global DB address, you can simply overwrite that DB word with the ADD_R result by a separate unconnected MOVE block driving the same DBW. This is a quick tactical fix but couples two producers to one consumer and should be documented carefully.
Regenerate the FB from the open STL/SCL source
If the source STL is available (know-how protection can be removed only by the original author or by re-typing the entire code body in a new FB), export the code, paste it into a new FB with a fresh number, and set every I/O attribute to S7_link = true from the start. This is the most invasive option and requires a full re-commissioning of the affected loop.
Data Type Considerations
The S7_link flip does not change the data type. The original FB 504 Meas_Hi ships with SP_HI declared as REAL (32-bit floating point). Your upstream ADD_R is also REAL by default. If you must interconnect from a block that produces a different data type, the wire will be rejected with a type conflict that has nothing to do with S7_link. The mapping of common math outputs to typical comparison-block inputs is summarized below.
| Source block | Source data type | Target input | Target data type | Adapter required? |
|---|---|---|---|---|
| ADD_R | REAL | SP / SP_HI / LIMIT (REAL) | REAL | No |
| ADD_I | INT | SP_INT (INT) | INT | No |
| SCALE (FB 250 APL) | REAL | SP (REAL) | REAL | No |
| MOVE (word) | WORD | SP_WORD | WORD | No |
| Counter output | DINT | SP (DINT) | DINT | No |
| Math output (REAL) | REAL | SP (INT) | INT | Yes – insert ROUND or TRUNC
|
Library Hygiene and Change Management
The S7_link situation is a symptom of a deeper library management problem. The following practices prevent the lockout from recurring.
- Single master library per plant: consolidate all third-party and sister-plant blocks into one Master Data Library in the project. Avoid mixing PCS 7 APL versions in the same CFC catalog path.
-
Stamp every block with a version comment: use the Block Header fields
VERSION,KNOW_HOW_PROTECT, andUSERto record the change author and date. -
Diff before update: before running Update Block Types on a new PCS 7 version, use a block-comparison tool (e.g.
FC 99-based diff, or a third-party SIMATIC Compare) to identify attributes that flipped fromtruetofalse. -
Track S7_link in your CMMS: for every FB that ships with
S7_link = false, open a CMMS item so that on the next library upgrade the engineer knows the attribute was deliberately changed and must be re-applied. -
Run a project-wide attribute audit quarterly: a short AWL/STL script that opens every FB in the project block folder, reads the
S7_linkattribute of every I/O, and exports a CSV, is the most reliable defense. A sample sketch is provided below.
Diagnostic Script Sketch for Project-Wide S7_link Audit
The following VBScript can be embedded in the SIMATIC Manager script environment to enumerate every FB in the active project and print a one-line report per I/O. It is a starting point for a quality gate, not a turnkey tool.
' SIMATIC Manager VBScript - audit S7_link attributes
Dim oProject, oBlocks, oBlock, oInterface, oMember, sLine
Set oProject = ActiveProject
For Each oBlock In oProject.BlockFolder.Blocks
If oBlock.Type = "FB" Then
Set oInterface = oBlock.Interface
For Each oMember In oInterface.Members
sLine = oBlock.Number & " " & oBlock.Name & " " & _
oMember.Name & " S7_link=" & oMember.Attributes("S7_link")
Debug.Print sLine
Next
End If
Next
Run the script from Tools > Scripts in SIMATIC Manager, then capture the Immediate window output to a CSV. Any line that ends with S7_link=false on a parameter the team needs to wire is a candidate for the procedure in this article.
Relationship to Modern TIA Portal
Engineers migrating from PCS 7 V9.0 to TIA Portal V17/V18/V19 often find that the protected-block class is conceptually preserved but the attribute is no longer user-editable. The TIA Portal equivalent of S7_link is the Accessibility setting on the PLC data type member. To unlock a member:
- Open the PLC data type in the project tree.
- Select the member, open Properties.
- Under Accessibility, choose Public (interconnectable) instead of Internal (block-private).
- Recompile the program and re-download.
The migration map between the two platforms is summarized below for quick reference.
| Classic CFC attribute | TIA Portal equivalent | Default |
|---|---|---|
S7_link = true |
Accessibility = Public | True in both platforms |
S7_link = false |
Accessibility = Internal | False in both platforms |
| Know-how protection (read) | Block protection – Open without password | Read-protected by default in PCS 7 APL |
| Know-how protection (write) | Block protection – Edit without password | Write-protected blocks cannot be opened at all without a password |
Safety and Operational Precautions
FAQ
What does <cannot be interconnected> on a CFC block input actually mean?
It means the S7_link attribute of that I/O parameter is set to false in the FB source. The pin is intentionally fixed in the block's declaration; the CFC editor respects the flag and refuses to draw a wire to it. The flag is set by the original block author and survives know-how protection.
Can I change S7_link on a write-protected (password-locked) block?
No. A block with know-how protection set to write-protected cannot be opened at all without the password. You must request the password from the library author, or fall back to the wrapper-block alternative described above.
I changed S7_link to true but the pin is still locked in the chart. Why?
The chart still references the old type. Open the CFC, run Options > Block Types…, and push the new version to every instance. Then close and reopen the chart so the editor reloads the type description from the refreshed block folder.
Does the S7_link change affect the data type or scan behavior?
No. S7_link is a wiring/visibility flag only. The data type, default value, and runtime scan behavior of the block remain identical. The only effect is that the pin is now reachable from the CFC editor.
Will my change survive the next PCS 7 library upgrade?
Not necessarily. When you run Update Block Types during a PCS 7 upgrade, the master library can overwrite your edited copy if the master ships a different version of the FB. To preserve the change, place the modified FB in the project master data library and re-run Update Block Types, or escalate the change to the library owner and request a corrected master version.
Is there a risk to SIL-rated loops when I flip S7_link?
Yes, if the parameter is part of a safety path. The change converts a constant into a variable that any HMI or remote session can drive. Run a full MOC review and re-execute the safety proof test on the loop before placing the system back in service.