How to Add Instance-Specific Logic to a PCS 7 V9.1 Control Module
For logic needed by only one PCS 7 V9.1 Control Module (CM) instance, Siemens' CMT guidance recommends creating a reusable function and inserting it into that instance. This lets you extend the instance without modifying the base Control Module Type (CMT), while keeping the extension visible to mass-engineering tools such as Plant Automation Accelerator (PAA) when properly exposed through technological I/Os. Use a CMT change for logic common to all instances, or an optional SubCM for a selectable type variant.
Table of Contents
- Choose the Extension Method
- Create a CMT Function
- Decide What Belongs in the CMT
- Keep PAA, COMOS, and SIMIT Interfaces Explicit
- Use Commands and Statuses to Abstract Sequential Control
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Choose the Extension Method
Siemens' CMT application example specifically identifies functions for inserting blocks in an instance without adapting the CMT. It also states that when COMOS, PAA, or SIMIT mass-data engineering is used, CM extensions with additional blocks should be made through optional blocks or functions, and connections should be routed through technological I/Os.
Create a CMT Function
The Siemens application example applies its CMT guidance to PCS 7 V9.1 (the described method is based on V9.0 SP3). Its documented function workflow is:
- In the plant view, right-click the CMT storage folder and choose
Create New Object > Control Module Type. - Give the function type a meaningful name and open it.
- Drag the required library blocks into its CFC and assign names. Connect blocks when the function contains multiple blocks.
- Define the function's technological I/Os by dragging the required block parameters and signals into the
Technological I/Osarea. This creates interface objects linked to the blocks. - Activate the
Functionoption for the technological I/Os. The manual says this option is available only when the required SubCM structure is valid; do not add subordinate functions or a further SubCM hierarchy to a function. - Open the target CM instance plan. From the
Templatestab, drag the created function from the project library into the instance'sTechnological I/Oswindow. PCS 7 creates the function in an empty CFC subplan. - Move it to the desired mounting position, then connect and parameterize it.
The manual recommends a naming prefix such as fkt_ to avoid name collisions between a function and an existing SubCM.
Decide What Belongs in the CMT
Put logic in the base CMT when it is part of the standard behavior intended for all relevant instances. After changing the type, synchronize the applicable instances and review the comparison before applying the synchronization. Siemens notes that CMT changes may be synchronized to selected instances; the engineer must account for instance-level deviations and technology-interface parameters.
Use an optional SubCM when a set of blocks is a reusable feature that should be enabled or disabled as a variant for different instances. Siemens describes optional SubCMs as the basis for CMT variants. A function is better suited when extra logic is required in an individual CM without changing its base template.
Keep PAA, COMOS, and SIMIT Interfaces Explicit
A CMT is represented as a black box to PAA, COMOS, and SIMIT. Siemens states that technological I/Os define the externally visible interface and that connections made between non-technological I/Os are not available in the abstract data model. For mass engineering, expose the required parameters, signals, and both ends of required connections through technological I/Os. The function mechanism makes instance extensions visible outside PCS 7 without changing the base CMT, but the extension still needs a well-defined interface.
Directly inserting unrelated blocks in an instance or moving the logic into an ordinary chart may leave the intended extension outside the CMT function/variant model. Whether such a design is acceptable depends on the project's synchronization and external-tool workflow; do not assume that a chart is automatically represented in PAA or SIMIT.
Use Commands and Statuses to Abstract Sequential Control
For EPHT/EMT or SFC-based sequencing, the CMT can define technological commands and statuses that map to block contacts. Siemens' CMT guidance describes commands as facilitating access from an SFC and statuses as making CM state easier for an SFC to query. This can let a sequence act on a meaningful command such as a start action rather than coupling its logic directly to every low-level block input.
The exact role-assignment workflow and available commands depend on the installed SFC and library configuration. Keep signal assignments visible to external engineering tools in technological I/Os where required; a command/status abstraction does not automatically expose every internal CFC contact.
Verification
Before using the extension, confirm that the function appears in the intended CM instance and that its CFC blocks, connections, and parameters are correct. Check its technological-I/O interface in the editor and verify that external tools can see each connection required by the project. Then compare/synchronize the base CMT against affected instances and confirm the function remains instance-specific. For EPHT/EMT logic, verify that sequence commands reach the intended CM role and that status conditions reflect the relevant block states. The source contains no test results; these are engineering verification actions, not reported tests.
Limitations and Operational Precautions
The cited application example describes PCS 7 V9.0 SP3 and says its CMT method is in principle applicable to PCS 7 V9.1; check the exact CFC, SFC, library, PAA, COMOS, and SIMIT versions in the project. TimerP, CounterL, CTU, AND04, or OR04 should be used only if the required block is actually available and supported in the installed library. Do not infer that every instance edit survives synchronization. Back up the project and inspect the synchronization comparison before propagating type changes to a live engineering project.
Engineer FAQ
What is the preferred way to add one-off logic to a CM instance?
Use a CMT function and insert it in the target instance. Siemens documents this for instance-specific adjustments without changing the base CMT.
When should I modify the base CMT instead?
When the logic belongs to the shared standard and should be applied to the relevant instances through synchronization.
When is an optional SubCM more suitable than a function?
Use an optional SubCM for a feature that is part of the reusable type but selected on or off per instance as a variant.
Why route connections through technological I/Os?
They form the abstract interface used by PCS 7 mass engineering, PAA, COMOS, and SIMIT. Connections between non-technological I/Os are not visible in that abstract model.
Does creating a CMT function automatically add it to PAA or SIMIT?
No. The function approach supports visible instance extensions, but the required technological I/Os and connections still have to be defined and included in the engineering exchange.
Technical References
- Siemens, Control Module (CM) Technology – Efficient Engineering in SIMATIC PCS 7, Entry ID 109475748, V3.0, 11/2021: applicability to PCS 7 V9.1; §§2.10 and 5.4, function structure and creation/use steps; §2.7 and §3.1, PAA/COMOS/SIMIT interface and technological I/O constraints. https://cache.industry.siemens.com/dl/files/748/109475748/att_1085455/v2/109475748_PCS7_CMT_Engineering_DOC_PCS7V903_en.pdf