How to Add Logic to One PCS 7 Control Module Instance Using a CMT Function

How to Add Logic to One PCS 7 Control Module Instance Using a CMT Function

For a PCS 7 V9.1 control module that needs extra logic in only one instance, use the documented CMT function mechanism as a structured extension. Siemens describes how to create a function and insert it into the selected instance. For a material counter, that mechanism supplies the engineering structure; the event definition, counting logic and reset behavior still need to be designed for the process.

Table of Contents

Choose the Scope of the Change

In a PCS 7 V9.1 configuration, five motor instances can share a MotL-based type while only one needs a material counter. First decide whether the counter is a reusable feature of that motor type or a local extension. A requirement for one instance does not, by itself, justify rebuilding all five instances.

RequirementEngineering choiceOne selected instance needs encapsulated extra logicEvaluate a CMT functionSeveral instances need the same selectable featureEvaluate a type-level optional featureThe feature belongs to a separate process functionConsider a separate module with an explicit interface

These choices express design intent; they are not a guarantee of compatibility with every external engineering tool.

Create and Insert the Function

Siemens documents the following workflow in section 5.4 of its CM engineering application example, which explicitly includes PCS 7 V9.1 in its applicability.

  1. In Plant View, right-click the CMT storage folder and choose Create New Object > Control Module Type.
  2. Name and open the type. Add the required blocks to its CFC chart and interconnect them.
  3. Drag the required parameters and signals into Technological I/Os.
  4. Enable Function. This requires a structure without SubCMs.
  5. Open the destination instance. From the library's Templates tab, drag the function into the instance's Technological I/Os window.
  6. Position the resulting CFC subplan, connect its interface and parameterize it.

The function is the documented extension mechanism. The counter design inside it remains project-specific; this procedure does not establish which pulse, reset or retention behavior the application requires.

Define the Counter Behavior

Before implementing the extension, write down what constitutes one counted event, the engineering unit, reset authority, overflow response and restart behavior. Select blocks only after their installed-version help confirms the required behavior. Do not substitute an elapsed-time measurement for a material count without defining the physical relationship.

For an acceptance test, specify a known sequence of input events and the intended resulting count. Also specify what should happen when the motor stops, the count is reset and the controller restarts. These are proposed project acceptance criteria, not reported test results.

Verification

In a project copy, inspect the modified instance and the other four instances. Confirm that the counter extension appears only where intended and that its input signal represents the event defined by the process requirement.

Review the proposed changes before synchronization, compilation or downloading. Test the extension and its reset behavior in an approved test environment. If COMOS, PAA or SIMIT exchange is required, include an actual round-trip comparison in acceptance testing; an intact CFC chart alone does not demonstrate an intact external engineering model.

Limitations and Operational Precautions

The Siemens example documents a function-based extension, not a complete material-counter implementation. No exact counter block, data type or reset circuit is established here. Preserve the original project and master library before changes. Assess compilation and download consequences separately and schedule controller changes under the plant's change procedure.

Do not infer that a mode-selection contact starts a motor: mode selection and the start command need separate project-specific checks. Likewise, avoid treating arbitrary direct instance edits as equivalent to a modeled function.

Engineer FAQ

Must every motor instance acquire the counter?
No. The engineering objective here is a local extension; inspect the resulting instances to confirm that scope.

Does this provide a ready-to-use counting algorithm?
No. The process must define what is counted and the required reset and retention behavior.

Is external engineering-tool compatibility proven by this procedure?
No. Validate the actual versions and required import/export workflow.

Technical References

Related Articles

Related Tags

20 respuestas