Exposing Hidden or Non-OCM Block Parameters to WinCC in SIMATIC PCS 7 - Adding the S7_m_c Attribute to MeasMon

Exposing Hidden or Non-OCM Block Parameters to WinCC in SIMATIC PCS 7 - Adding the S7_m_c Attribute to MeasMon

In SIMATIC PCS 7, standard library function blocks—such as MeasMon (FB 1845) or MonAnL—do not expose every internal parameter or limit signal (such as AH_Act or WH_Act) to WinCC Tag Management by default to conserve communication bandwidth and license Process Objects (PO). To expose an internal block variable that is missing from the OCM list, an engineer must open the block in the LAD/FBD/STL Editor or SCL source, add the system attribute 'S7_m_c := true' to the target parameter's declaration properties, execute 'Update Block Types' in CFC, and run an OS Changes Compile.

Table of Contents

Operator Communication and Monitoring (OCM) Parameter Filtering

In SIMATIC PCS 7, the compilation bridge connecting controller memory (AS) to operator interfaces (OS) is governed strictly by the Operator Communication and Monitoring (OCM) mechanism:
- The Function of S7_m_c:
* A standard APL analog monitoring block (like MonAnL or classic MeasMon) contains over 80 internal variables, status flags, and limit outputs.
* If every parameter were transferred to WinCC, the OS database would balloon with hundreds of thousands of redundant tags, exhausting OS runtime memory, overwhelming the S7DOS communication buffer, and generating excessive cyclic communication overhead.
* The system attribute { S7_m_c := 'true' } acts as a selective filter. The OS compiler (s7tosx.exe) scans the block interface and instantiates WinCC structure tag elements exclusively for variables bearing this attribute.
- Missing Parameters in Faceplates:
* If an engineer requires an active limit indicator (e.g. AH_Act for Alarm High Active or WH_Act for Warning High Active) to drive custom animations or external scripts, but the pin lacks S7_m_c, WinCC Tag Management will not generate the tag, rendering it invisible in Graphics Designer.

Why Specific Block Limit Outputs Are Excluded from OCM by Default

Siemens library developers selectively assign S7_m_c based on architectural role:
1. Status Word Packing vs Raw Booleans:
- In modern APL blocks, individual limit states (AH_Act, AL_Act, WH_Act, WL_Act) are packed internally into 32-bit status words (Status1, Status2).
- WinCC faceplates and block icons read the packed status DWORDs to animate limit icons and alarm bells rather than reading individual Boolean tags.
2. Direct Peripheral and Interlocking Roles:
- Parameters like AH_Act were primarily intended as controller-side interlocking pins for wiring directly to pump trips or valve interlocks inside CFC charts (S7_link := 'true').
- Consequently, library designers omitted S7_m_c := 'true' from AH_Act to minimize tag count.

Step-by-Step Procedure for Adding S7_m_c to MeasMon Parameters

To expose AH_Act or any other parameter to WinCC without breaking library integrity:

  1. Open the Block in the Master Data Library:
    - In SIMATIC Manager, navigate to the Master Data Library > Blocks folder.
    - Double-click MeasMon (FB 1845) to open it in the LAD/FBD/STL Editor (or open the SCL source file if using custom blocks).

  2. Modify the Parameter System Attributes:
    - In the variable declaration table at the top of the editor, expand VAR_OUTPUT.
    - Locate the target parameter: AH_Act.
    - Right-click AH_Act and select Object Properties.
    - In the Properties dialog, select the Attributes tab.
    - Add or check the attribute:
    text Name: S7_m_c Value: true
    - Click OK and save the block.

  3. Propagate Block Types to CFC:
    - In SIMATIC Manager, open any CFC chart.
    - Select Options > Block Types.
    - Select MeasMon in the chart container list and click Update Block Types.
    - Confirm propagation across all target AS programs.

  4. Execute OS Changes Compile:
    - Right-click the OS project in SIMATIC Manager and select Compile.
    - In the wizard, select Changes only and execute compilation.
    - Open WinCC Explorer > Tag Management: verify that under structure type MeasMon, the new member variable AH_Act is created.

System Attribute Declaration and Tag Generation Comparison Table

The following table details system attribute assignments and their compilation effects:

System AttributeConfiguration SettingCFC Chart EffectWinCC OS Compilation EffectS7_m_c := 'true'Active on parameterNormal parameter pinStructure tag element created in WinCC Tag ManagementS7_m_c := 'false'Inactive / defaultNormal parameter pinOmitted from WinCC; invisible to Graphics DesignerS7_link := 'true'Active on parameterCan be interconnected to other blocks in CFCZero effect on WinCC Tag ManagementS7_link := 'false'Inactive / staticInterconnection blocked; static value entry onlyZero effect on WinCC Tag ManagementS7_archive := 'true'Active with S7_m_cStandard OCM parameterAutomatically added to WinCC Tag Logging archive

Verification

To confirm that the parameter is properly exposed and updating in WinCC:
1. In SIMATIC Manager, open WinCC Explorer and open Tag Management.
2. Expand SIMATIC S7 PROTOCOL SUITE > Named Connections > [Target_AS].
3. Select an instance of MeasMon (e.g. TI_101).
4. Confirm that tag TI_101.AH_Act exists with data type Binary Tag.
5. Open Graphics Designer, place an I/O field or dynamic circle, and bind its dynamic dialog to TI_101.AH_Act.
6. Launch WinCC Runtime:
- Force the analog process input above the High Alarm limit in CFC.
- Verify that AH_Act transitions to 1 in CFC and the WinCC graphic updates immediately.

Limitations and Operational Precautions

When modifying system attributes on standard library blocks:
1. Library Overwrites During Service Pack Updates: If you modify blocks directly inside the standard PCS 7 library, subsequent PCS 7 updates or library re-installations will overwrite your changes. Always copy modified blocks into your project's Master Data Library.
2. Download in RUN Constraints: Toggling S7_m_c without altering block interface sizes or data types supports Download Changes in RUN to the CPU. However, if you inadvertently add or remove a variable, the CPU will demand a full download requiring a complete plant shutdown.
3. OS Tag Licensing Impact: While adding structure tag elements does not increase AS Process Object (AS PO) counts, it increases communication throughput and may expand Tag Logging archive tag counts if archiving attributes are enabled.

Engineer FAQ

Does adding S7_m_c increase my PCS 7 Process Object (PO) license count?

No. PCS 7 AS and OS Process Object licensing is calculated per block instance (e.g. one MeasMon block equals one PO), not by the number of individual pins or structure tags generated by that block.

Can I read AH_Act without modifying the block attributes?

Yes. In modern APL blocks, AH_Act is encoded within the Status1 or Status2 DWORD. In WinCC, you can evaluate the corresponding bit inside the status word using dynamic bitmasks without adding S7_m_c to AH_Act directly.

Why did the tag not appear in WinCC after updating block types in CFC?

Because updating block types in CFC updates only the AS chart container. You must run an OS Compilation (Compile OS Changes) to generate the structure tag in WinCC.

Can I add S7_m_c to temporary variables (VAR_TEMP)?

No. S7_m_c can only be assigned to parameters stored in the instance data block (VAR_INPUT, VAR_OUTPUT, and VAR). Temporary variables exist only on the CPU stack during block execution and cannot be monitored by WinCC.

Technical References

Related Articles

Related Tags

  • PCS7_CFC
  • S7_m_c
  • OCM
  • MeasMon
  • WinCC_OS
  • Tag_Management
  • Structure_Tags
6 respuestas