Configuring MotSpdCL PID Speed Control in SIMATIC PCS 7 APL

David Krause11 min read
PID ControlSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

Speed-controlled pump motors in SIMATIC PCS 7 are implemented through the MotSpdCL block from the Advanced Process Library (APL). When the application requires closed-loop regulation of a process variable such as tank level, flow, or pressure, the MotSpdCL speed reference must be driven by a PID controller output rather than a fixed operator entry. The two blocks that drive this regulation are PIDConL (PID controller, enhanced) for the control loop and MotSpdCL for the variable-speed drive supervision.

This guide covers the recommended pattern for using an external setpoint (SP_Ext) on the MotSpdCL to receive the manipulated variable (MV) from a PID controller, the two-mode (manual then auto) start-up logic to prevent integral windup during discharge disturbances, and the CFC wiring required for the SIMATIC PCS 7 V9.0 / V9.1 APL library. The reference is the MotSpdCL function manual entry in the Siemens Industry Online Support entry ID 109794385.

Prerequisites

  • SIMATIC PCS 7 V9.0 SPx or V9.1 with the Advanced Process Library installed in the master data library.
  • PCS 7 APL block types: MotSpdCL, PIDConL, CtrlPid (alternative), AnScl (analog scaling), and DigDig (digital selector if required).
  • A variable-frequency drive (VFD) such as SINAMICS G120, G120X, G150, or ET 200S FC that exposes a 4–20 mA or PROFIBUS/PROFINET speed reference channel wired to the MotSpdCL analog output V_NormOut.
  • Level transmitter on Tank 4 (LT_4001) connected to an analog input module (AI 4xU/I 2-wire, 6ES7331-7RD02-0AB0 for example) and made available as a CFC signal.
  • Discharge valve feedback (V211) wired through a digital input for interlock of the two control modes.
  • Engineering station with SIMATIC Manager / PCS 7 Engineering Toolset, including the APL faceplate plug-in.

MotSpdCL Block Reference Summary

The MotSpdCL block is the APL type for a bi-directional variable-speed motor with two directions of rotation and speed setpoint handling. The signal interfaces that participate in closed-loop speed regulation are summarised below.

I/O Direction Purpose Typical Connection
SP_Int Input Internal setpoint entered by the operator through the faceplate (default operator setpoint) HMI / WinCC Operator Setpoint field
SP_Ext Input External setpoint driven by the program (CFC/SFC, PID output, manual block) Output of PIDConL.MV or interconnect block
SP_LiOp Input Selector between SP_Int (=0) and SP_Ext (=1) Operator toggle in faceplate or hard-wired selector
V_NormOut Output Normalized speed output (0–100 %) Analog output channel to VFD
V_Act Input Actual speed feedback from the drive Analog input from VFD or PROFIdrive PZD
MV_Track Input External manipulated variable for tracking (bumpless transfer from manual to auto) Wired to PIDConL.MV_Track
ManAct Input Enables manual mode from the program Wired to PIDConL.ManAct output
AutoAct Input Enables automatic mode from the program Wired to PIDConL.AutoAct output

PIDConL Block Reference Summary

The PIDConL block is the APL enhanced PID controller. It implements the standard ISA form with separate gain, integral, and derivative terms, anti-windup, setpoint ramping, alarm limits, and bumpless transfer support.

I/O Direction Purpose
SP_Ext Input External setpoint (process target, e.g. 5 L scaled to 50 %)
PV Input Process variable, scaled value of LT_4001
MV Output Manipulated variable, 0–100 %, sent to MotSpdCL.SP_Ext
Gain, TI, TD Inputs Tuning parameters
ManAct Output Active when controller is in manual
AutoAct Output Active when controller is in auto
MV_Track Input External MV for tracking, used during manual → auto transfer

Signal Scaling and Engineering Units

Tank level is measured by LT_4001 in litres. The PID controller expects both PV and SP in the same engineering units. The MotSpdCL expects SP_Int / SP_Ext in normalized speed (0–100 %). The recommended approach is to keep the PID loop in percent of full-scale tank volume so that the operator faceplate displays 0–100 %, with a scaling block converting to litres for trending if required.

Signal Source/Target Range Scaling Block
LT_4001 raw (AI) 0–27648 counts 0–10 L AnScl: 0 count = 0 L; 27648 count = 10 L
PID PV in 0–100 % 0–10 L AnScl (or division by 0.1) to convert litres to percent
PID SP_Ext 50 % (=5 L) 0–100 % Set by operator / SFC
PID MV out 0–100 % 0–100 % Wired directly to MotSpdCL.SP_Ext
V_NormOut 0–100 % 0–100 % Scaled by AO channel to 4–20 mA / 0–10 V to VFD
Important: If the PID MV is wired to MotSpdCL.SP_Int instead of SP_Ext, the operator faceplate will overwrite the value as soon as the operator enters a new setpoint. Always wire PID output to SP_Ext and switch the SP_LiOp selector to external.

Step-by-Step CFC Wiring

  1. Drop MotSpdCL into the CFC chart of Tank 4's equipment phase. Set the block instance name to MOT_P401 and assign the APL faceplate.
  2. Drop PIDConL into the same chart. Instance name PID_LT4001. Assign the APL PID faceplate.
  3. Wire the level transmitter PV: LT_4001 → AnScl (LTR_to_Pct) → PIDConL.PV. Set scaling so 5 L equals 50 %.
  4. Wire the setpoint source: create a constant block SP_5L with value 50 (%) and connect to PIDConL.SP_Ext. Alternatively wire the SFC-driven target variable.
  5. Wire the controller output: PIDConL.MV → MotSpdCL.SP_Ext.
  6. Set the selector: MotSpdCL.SP_LiOp = 1 (always external when the loop is in regulation). Drive this from a digital constant or an SFC transition so that the operator faceplate cannot accidentally switch to internal during automatic control.
  7. Wire the bumpless transfer: MotSpdCL.V_Act (or MotSpdCL.V_NormOut when feedback is unavailable) → PIDConL.MV_Track. This prevents an MV step when the controller switches from manual to auto.
  8. Wire the mode cross-coupling: PIDConL.ManAct → MotSpdCL.ManAct and PIDConL.AutoAct → MotSpdCL.AutoAct. This keeps the motor's manual/auto state in step with the controller's mode so that the operator view is consistent across faceplates.
  9. Wire the VFD reference: MotSpdCL.V_NormOut → analog output channel (e.g. AO 4xU/I, 6ES7332-5HD01-0AB0) → VFD analog input 1 (terminal 3/4 on SINAMICS G120 CU240E-2).
  10. Wire the speed feedback: VFD analog output 1 → AI channel → MotSpdCL.V_Act.
  11. Compile the chart and download to the AS. Open the faceplate in WinCC and verify that the MotSpdCL displays SP_Ext as the active setpoint source.

Two-Mode Control Logic for Discharge Disturbance

When the discharge valve V211 opens, the level in Tank 4 drops faster than the pump can compensate under normal PID action. A pure PID loop with default tuning will exhibit a large initial deviation that may swing the VFD to its maximum speed and trip on overcurrent. The recommended pattern splits the regulator behaviour into two states that an SFC manages.

Mode 1 - Discharge Valve Closed

  • Operator runs the equipment phase in automatic.
  • If the level drops below a lower threshold (for example 4.7 L = 47 %), the SFC enables the VFD at a minimum speed of 60 % until the level returns to the target.
  • PID remains in automatic and slowly corrects residual error.

Mode 2 - Discharge Valve Open

  1. On V211 = OPEN rising edge, the SFC forces PIDConL into manual mode (ManAct = 1, MV_Track = 1) and writes a fixed MV equal to the minimum speed (e.g. 60 %) into MotSpdCL.SP_Ext for a settling time A seconds (typically 3–10 s depending on line length).
  2. After timer A expires, the SFC ramps the MV over time B from 60 % to 100 % (the high-pump-speed setpoint) using the Rmp (Ramp) APL block, so the pump brings the level back toward 5 L without a step disturbance.
  3. Once level reaches the target band (for example 4.95–5.05 L), the SFC switches PIDConL to automatic (AutoAct = 1, MV_Track = 0) and disconnects the ramped MV so that the PID becomes the active driver of MotSpdCL.SP_Ext.
  4. PID tuning parameters Gain, TI, TD are tuned for steady-state level control only — the disturbance handling is done by the SFC.
Anti-windup note: While PIDConL is held in manual with MV_Track = 1, the integral component tracks the external MV so that the transition to auto is bumpless. This is the standard PCS 7 APL pattern and avoids the integral kick that would otherwise occur.

Commissioning and Verification

  1. Open the MotSpdCL faceplate in WinCC and confirm that SP_Ext is shown as the active source (the faceplate highlights the active setpoint input).
  2. Force PIDConL to manual and verify that MV tracks MotSpdCL.V_NormOut with no step.
  3. Step the manual MV to 30 % and confirm the VFD accelerates and V_Act reads back the expected speed.
  4. Place PIDConL in automatic with a setpoint of 50 % (5 L). Introduce a small level disturbance by momentarily opening a manual drain valve.
  5. Trend PV, SP, and MV simultaneously in the WinCC online trend control. Verify that the MV moves toward the new speed, the PV converges to SP within the allowed settling time, and that there is no oscillation beyond three cycles.
  6. Trigger Mode 2 by opening V211 from the faceplate. Confirm the SFC executes steps 1–3 above and that the PID takes over cleanly without a step in MV.
  7. Verify all PIDConL alarm limits (AH, AL, WH, WL) are configured against the scaled PV (0–100 %).

Parameter Tuning Guidance

Parameter Initial Value Tuning Note
Gain 1.0 Increase in 0.2 steps until the loop reaches critical damping; back off 20 %.
TI (integral time) 60 s Reduce by half until small oscillation appears, then double the value.
TD (derivative time) 0 s Enable only if level signal is noisy and PV filtering (PV_FT) cannot remove it.
MV_HiLim / MV_LoLim 100 % / 0 % Set the lower limit to the VFD's minimum stable speed (e.g. 20 %) to prevent stalling.
SP_HiLim / SP_LoLim 100 % / 0 % Restrict operator setpoint to the physical operating range of the tank (e.g. 10–90 %).
PV_FT 2 s First-order PV filter to suppress turbulence noise from the level probe.

Troubleshooting Matrix

Symptom Likely Cause Remedial Action
Setpoint in faceplate stays at 0, ignores external value SP_LiOp is 0 (internal selected); SP_Ext is wired but not used Force SP_LiOp = 1 from CFC or hard-wire a constant; verify the wiring from PIDConL.MV reaches MotSpdCL.SP_Ext on the correct chart sheet
MV jumps at manual → auto transition MV_Track not wired or wrong source Wire MotSpdCL.V_Act (or V_NormOut) to PIDConL.MV_Track; recompile
Pump runs at full speed regardless of level PID output saturated; MV_HiLim set to 100 % and gain too high Reduce Gain; check PV wiring for reversed polarity; verify PV scaling
Motor runs but tank still empties when V211 opens Loop too slow or minimum speed set too low Increase minimum speed; verify the two-mode SFC transitions execute (check SFC step status)
VFD trips on overcurrent during step disturbances No ramp on MV between manual and auto Insert the Rmp block between SFC and MotSpdCL.SP_Ext as described in Mode 2 step 2
Faceplate shows MotSpdCL in Local with speed changes ignored Mode selector ModLiOp = 0 (operator) and operator left it in Local from a previous test Switch ModLiOp back to Program (value 1) and reset the mode from the faceplate

Related Equipment Module Templates

Siemens ships an application example titled Equipment Modules for SIMATIC PCS 7 using the example of the Chemical Industry which contains a fully engineered level-control scenario in chapter 5.1. The example includes a SFC that demonstrates the two-mode pattern above with simulated instrumentation, so all PID tuning can be performed offline before connecting to the live plant. The example is published on the Siemens Industry Online Support portal under entry ID 109794385 and the related APL documentation set.

Safety and Operational Notes

  • Ensure that MotSpdCL is configured with the correct rotation direction; the VFD must be parameterised to accept a positive reference for forward pump operation.
  • The minimum speed of the VFD must be above the pump's thermal minimum flow to prevent dry-running. The block's V_LoLim should match the VFD parameter P1080 (minimum speed).
  • If the tank can run empty (level below the probe's low-cutoff), implement a permissive interlock that forces MotSpdCL to stop rather than continue at minimum speed.
  • Always connect the VFD fault contact to MotSpdCL.FbkRun or the appropriate fault input so that the block enters a safe state on drive trip.

FAQ

Why does my MotSpdCL faceplate keep showing the internal setpoint at zero when I wire the PID to SP_Ext?

The block follows the SP_LiOp selector. If SP_LiOp = 0 the block uses SP_Int; if it equals 1 it uses SP_Ext. Drive SP_LiOp = 1 from a CFC constant or an SFC transition so the PID output becomes the active speed setpoint.

How do I avoid an MV step when switching from manual to automatic?

Use the MV_Track input on PIDConL. While the controller is in manual, wire the actual speed feedback (MotSpdCL.V_Act) or the speed output (V_NormOut) to MV_Track. The integral component then tracks the external MV and the transition to automatic is bumpless.

Can I drive MotSpdCL.SP_Ext directly from an SFC instead of from a PID?

Yes. The APL block does not require the setpoint source to be a PID output. Many applications use an SFC with a Rmp (Ramp) block for open-loop profile control. The same SP_LiOp = 1 wiring applies.

What minimum and maximum speed limits should I configure on the PID?

Set MV_LoLim to the VFD's minimum stable speed (typically 20 % for pumps; match the SINAMICS parameter P1080). Set MV_HiLim to 100 % unless the mechanical design or VFD current limit restricts the maximum.

Where can I find a worked example of PCS 7 tank level control with PID and MotSpdCL?

The Siemens application example Equipment Modules for SIMATIC PCS 7 using the example of the Chemical Industry contains a complete level-control scenario in chapter 5.1 with an SFC, simulated I/O, and tuning guidance. It is referenced from the MotSpdCL support entry 109794385.

Back to blog