How to Run One PCS 7 CFC Block at a Lower Rate

How to Run One PCS 7 CFC Block at a Lower Rate

Yes. In CFC, a block call can be placed in its own runtime group and that group assigned a reduction ratio, so the selected block executes less often than the 100 ms OB35 cycle. The reduction ratio applies to every object in that group. In the documented CFC V9.0 SP5 implementation, the ratio is a power of two, so a 100 ms base cycle can produce 3.2 s at ratio 32, but not exactly 3.0 s using that attribute.

Table of Contents

How CFC runtime groups control execution

A CFC runtime group is an execution unit within a task. Siemens' CFC for SIMATIC S7 V9.0 SP5 Function Manual states that runtime-group attributes, including reduction ratio and phase offset, are passed to all objects in the group. Separating one block call into a group of its own therefore makes it possible to change that call's execution frequency without reducing the rate of unrelated calls that remain in the original group.

This is a change to execution scheduling, not a separate timer on an individual block input. It changes when the block processes its inputs and updates its outputs. Review dependent blocks and the process response before applying the method.

When this method is appropriate

Use a separate reduced-rate runtime group when one calculation or measurement-processing block does not need to run on every invocation of its cyclic interrupt task, and its inputs, outputs, and downstream consumers tolerate the slower update.

The ticket's example places a temperature sensor block alongside four other blocks in a group called Messstelle_1, scheduled in OB35 at 100 ms. The separate-group approach can reduce the execution frequency of that one call while leaving the other four calls in the faster group. The source does not identify the block type, signal dependencies, CPU model, or exact PCS 7/CFC release; the procedure below is documented against CFC V9.0 SP5 and must be checked against the project's installed version.

Procedure: isolate the block in a runtime group

  1. In the CFC Runtime Editor, identify the cyclic task and the runtime group that currently contains the block call. Confirm the task's configured cycle time and map the block's connected inputs and outputs to their producers and consumers.
  2. Create a separate runtime group in the same applicable cyclic task. In the V9.0 SP5 manual, the documented path is Edit > Run Sequence...; select the task in the Runtime Editor and choose Insert > Runtime Group.... Enter a name and configure the group's runtime attributes.
  3. Move the selected block call into the new group using the supported Runtime Editor operation for the project's runtime-group management mode. For chart-based runtime-group management, Siemens documents restrictions: moving a block call must remain within the same CFC and a cyclic task; moving it directly below a task creates another runtime group for that CFC. For unmanaged charts, moving between runtime groups changes the block's runtime properties without changing chart association.
  4. Select the new group and open Edit > Object Properties.... Set its reduction ratio and, if needed for CPU load distribution, its phase offset. The group's settings apply to every object in it, so keep only calls that should share the same schedule in this group.
  5. Check the resulting run sequence and data dependencies. If another block in the 100 ms group consumes this block's output, account for the output being refreshed less frequently and retained between executions.
  6. Compile and deploy the change using the project's approved PCS 7 change procedure. The CFC manual describes compiling and downloading as distinct stages; this article does not prescribe a selective or online download path for an unidentified project configuration.
  7. Verify the configured schedule and observe the block's input and output behavior under representative operation. Confirm that required downstream behavior and alarm/control response remain acceptable before relying on the new rate.

Choose the reduction ratio for the required rate

For CFC V9.0 SP5, the reduction ratio is n = 2^t, where t is an integer from 0 through 15. A runtime group runs every n executions of its task; the default ratio is 1. The task cycle multiplied by the ratio gives the nominal group cycle.

OB35 base cycleReduction ratioNominal group cycle100 ms2200 ms100 ms161.6 s100 ms323.2 s

Thus, an exact 3 s interval does not result from an integer reduction ratio on a 100 ms base cycle under this documented rule. If 3 s is a firm requirement, evaluate a suitable separately configured cyclic task on the target CPU or another explicitly designed scheduling method; confirm that configuration against the applicable CPU and PCS 7 documentation. Do not set a non-supported ratio such as 30.

Verification

Inspect the Runtime Editor to confirm the block call is assigned to the intended group, the group is in the intended cyclic task, and the reduction ratio is set as designed. During an approved online check, compare observed block updates with task cycles and trend input/output values alongside the faster consumers. Confirm that no dependent calculation uses an output as if it were refreshed every 100 ms.

Where CPU load reduction is the purpose, evaluate CPU utilization with the project's established diagnostics before and after deployment. A successful compile or download alone does not prove the schedule or process behavior is correct.

Limitations and Operational Precautions

The cited procedure and power-of-two rule come from Siemens CFC for SIMATIC S7 (V9.0 SP5), Function Manual, 11/2020. Other CFC releases and target systems may differ. The manual says reduction ratio and phase offset are available only where supported by the target; otherwise those attributes appear disabled. It recommends using them primarily with tasks that have defined cycles and cautions against changing defaults in hardware-interrupt and special OBs.

Do not modify driver-generator runtime groups whose names use the @... identifier; Siemens states that these groups are managed by the driver generator. Review startup behavior, inter-block dependencies, sampling expectations, control-loop stability, alarm timing, CPU timing, and change rollback before moving a block. A lower call rate is inappropriate if the block must respond at the original task rate.

Engineer FAQ

Can one block in a CFC chart execute less often than the other blocks? Yes, if its block call is assigned to a separate runtime group with a lower execution rate, subject to the project's CFC management mode and target support.

Does the reduction ratio affect only one block? It affects all objects in the runtime group. Put only the calls that should share the same rate in that group.

Can a 100 ms OB35 group execute every 3 seconds with a reduction ratio? Not exactly under the documented V9.0 SP5 rule, which restricts the ratio to powers of two. Ratio 32 produces a nominal 3.2 s group period.

Can the new group stay in the same OB35 task? The CFC V9.0 SP5 manual supports runtime groups within cyclic tasks, but moving block calls has restrictions under chart-based management. Check the applicable Runtime Editor behavior for the project.

Technical References

  1. Siemens, CFC for SIMATIC S7 (V9.0 SP5), Function Manual, 11/2020, A5E41356073-AF: Section 10.11, “Defining runtime properties,” pp. 185–196 (runtime groups, creation, movement, and attribute inheritance); Section 19.2.12, “Reduction ratio,” p. 452 (power-of-two rule). Direct Siemens PDF.

Related Articles

PCS 7 CFC runtime groups

PCS 7 cyclic interrupt OB configuration

Related Tags

PCS 7, CFC, runtime groups, OB35, PLC scheduling

20 respuestas