Creating Custom AS Blocks and OS Faceplates in SIMATIC PCS 7: S7_m_c Attributes, Type Definition, and @PCS7Typicals Integration

Creating Custom AS Blocks and OS Faceplates in SIMATIC PCS 7: S7_m_c Attributes, Type Definition, and @PCS7Typicals Integration

To make a custom AS function block visible in WinCC and generate operational faceplates in SIMATIC PCS 7, you must declare the system attribute S7_m_c := 'true' at the block header and on every parameter requiring operator monitoring or control (OCM). Instantiate the block in a CFC chart, compile CFC with module drivers, and execute an OS Compile. This generates the WinCC Structure Tag type. To render block icons automatically, create a customized object in @PCS7Typicals.pdl with its type property matching @<BlockType>/1. OS compilation will then automatically generate dynamic block icons and link them to faceplates.

Table of Contents

PCS 7 Block Engineering: Bridging AS Logic and OS Visualization

In SIMATIC PCS 7, process automation relies on object-oriented technological blocks. A complete technological object comprises an AS algorithm (FB/FC programmed in SCL or STL), an OS Structure Tag in WinCC Tag Management, a dynamic Block Icon displayed in process pictures, and a multi-tab Faceplate window providing detailed diagnostics and operator controls.

When automation engineers create proprietary function blocks, they often find that WinCC Faceplate Designer cannot locate the block, or the OS compilation fails to generate structure tags. This occurs when mandatory STEP 7 system attributes and template conventions are omitted.

Declaring S7_m_c Attributes on Block Headers and Parameters

The fundamental link between STEP 7 and WinCC is the S7_m_c (Operator Communication and Monitoring) attribute:

  • Block Header Attribute: In the SCL source file, the block header must declare:
    { S7_m_c := 'true' } immediately above FUNCTION_BLOCK FBxxxx.
    Without this header attribute, the block object's 'OCM possible' property remains unchecked in the block properties dialog.

  • Parameter Attributes: Every variable exposed to WinCC (inputs, outputs, setpoints, statuses) must have { S7_m_c := 'true' } declared:
    PV_Out { S7_m_c := 'true'; S7_unit := '°C' } : REAL;

  • Parameters without this attribute remain internal to the AS work memory and are omitted from the WinCC tag dictionary.

CFC Chart Instantiation and OS Compilation Workflow

Declaring the block in the symbol table is not sufficient to generate WinCC tags:

  1. The block type must be imported into the STEP 7 Master Data Library or project block folder.
  2. Instantiate in CFC: Open a Continuous Function Chart and drop an instance of the block into the chart. Assign a chart name and block instance name.
  3. Compile Charts: Execute Compile Charts as Program. Ensure Generate Module Drivers is selected.
  4. Compile OS: Right-click the OS Server in SIMATIC Manager and run Compile OS. The AS-OS compiler parses all blocks with S7_m_c = 'true' and creates the corresponding WinCC Structure Type and Structure Tags.

Creating Dynamic Block Icons in @PCS7Typicals.pdl

PCS 7 automatically places block icons into process pictures during OS compile using template graphics:

  • Open @PCS7Typicals.pdl (classic PCS 7) or @PCS7TypicalsAPLV8.pdl (APL).
  • Copy a standard block icon template (e.g. @MOTOR/1 or @MEAS_MON/1) to serve as a baseline.
  • Select the customized object, open Object Properties, and locate the property named type.
  • Set type to @<YourBlockType>/1 (e.g. @POLYMER_DOSER/1).
  • Connect object status animations to the block structure tag elements (e.g. .STATUS, .PV_Out).
  • When the process graphic has 'Create/Update Block Icons' checked in Picture Tree, OS compile instantiates the icon automatically.

Structure Tag Generation and Faceplate Binding Architecture

The following table details the technological relationship between STEP 7 source definitions and WinCC runtime components:

Engineering TierComponent / FileConfiguration RequirementRuntime Role in WinCCAS Block HeaderSCL / STL Source{ S7_m_c := 'true' }Enables OCM capability for the block typeAS ParameterSCL / STL Variables{ S7_m_c := 'true' }Generates individual Structure Tag elementsCFC InstanceCFC Chart PlacementInstantiated in ChartDefines Tag Prefix (<Chart>/<Block>)WinCC Tag MgmtStructure TypesGenerated by OS CompileRelational data schema in WinCC databaseBlock Icon@PCS7Typicals.pdlCustomized Object with type = @Type/1Graphical mimic representation in plant screensFaceplate Window@PG_<Type>.pdlStandard Faceplate Designer templateMulti-tab operator dialogue and trending

Step-by-Step Implementation of Custom Blocks and Faceplates

Follow this complete sequence to build and integrate custom technological blocks:

  1. Author SCL Code: Declare { S7_m_c := 'true' } on block header and all relevant inputs/outputs. Compile SCL source into target FB.
  2. Verify Block Attributes in STEP 7: In SIMATIC Manager block folder, right-click the FB -> Object Properties -> Attributes. Confirm S7_m_c is checked.
  3. Drop Block into CFC: Insert FB into a CFC chart. Set block parameters and interconnect signals.
  4. Compile AS Program: Compile CFC charts entirely.
  5. Execute OS Compilation: Compile OS with scope Entire OS and memory generation. Verify WinCC Tag Management creates the structure.
  6. Build Block Icon: In WinCC Graphics Designer, open @PCS7Typicals.pdl. Paste a customized object template, set property type to @<FB_Name>/1.
  7. Build Faceplate Graphic: Create @PG_<FB_Name>.pdl using Faceplate Designer or APL Faceplate templates.
  8. Update Block Icons in Picture: Open the target plant picture. Click Options -> Create/Update Block Icons. Confirm the custom icon appears.

Verification

Validate custom block and faceplate operation through these checks:

  1. Tag Management Verification: Open WinCC Tag Management -> Structure Tags. Confirm your block type exists with all declared variables.
  2. Block Icon Placement: Verify that the block icon generated in the process picture has its Tag and TagPrefix properties populated.
  3. Runtime Click Test: Launch WinCC Runtime. Click the custom block icon; verify that the faceplate @PG_<FB_Name>.pdl opens with live data.
  4. Set-point Operation: Modify a setpoint or command from the faceplate and verify online change in CFC Test Mode.

Limitations and Operational Precautions

Observe the following design precautions:

  • Backup Template Pictures: Always create a backup of @PCS7Typicals.pdl before editing. An error in this picture can corrupt block icon generation across the entire project.

  • Tag Name Length Limits: WinCC tag names cannot exceed 128 characters. Keep chart and block instance names concise to avoid truncated tag paths.

  • Commercial Accuracy Disclaimer: Software order numbers (MLFBs), package structures, and hardware capacity prerequisites vary across PCS 7 versions and hardware platforms. System integrators must confirm exact software entitlements and licensing requirements against the official Siemens Catalog CA 01 and obtain an authorized Siemens distributor quotation prior to purchasing.

Engineer FAQ

What is the difference between S7_m_c on the header vs on parameters?

The header attribute enables the block type for OS compilation, while parameter attributes determine which specific input/output variables become structure tag elements in WinCC.

Why are my block icons not updating after changing @PCS7Typicals.pdl?

You must open the target plant picture in Graphics Designer and run 'Tools -> Create/Update Block Icons', or recompile the OS with that option selected.

Does creating custom blocks consume additional AS Process Object (PO) licenses?

Yes, if the custom block has S7_m_c attributes and generates autonomous WinCC alarms or operator controllable tags, it consumes AS RT PO licenses.

Technical References

Related Articles

Related Tags

  • SIMATIC PCS 7
  • S7_m_c
  • WinCC Faceplate
  • Block Icon
  • @PCS7Typicals
  • CFC Compilation
  • Structure Tags
6 respuestas