Configuring PCS 7 VlvAnL Setpoint Override Using APL Blocks

David Krause10 min read
Process 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

1. Problem Overview

In a Siemens PCS 7 V9 system with the Advanced Process Library (APL) V8.0 or later, a control valve driven by the VlvAnL block must accept a manipulated variable (MV) from one of three sources, decided by the state of two binary process signals:

  • Binary Signal 1 active → force setpoint A to the valve (highest priority).
  • Binary Signal 2 active → force setpoint B to the valve (medium priority, only honored when Signal 1 is absent).
  • Neither active → hand the setpoint authority to the operator through the APL faceplate.

This precedence scheme cannot be implemented by wiring a single MV_Ext value directly to the VlvAnL because the operator must retain the ability to type a free setpoint during the no-signal condition. The solution is to combine an APL analog selector block (SelA16In or SelA02In) with the MV_LiOp, MV_ExtLi, and SelExt structure described in the APL Function Manual chapter 6.12 "VlvAnL – control valve".

Authoritative reference: PCS 7 APL Function Manual (entry ID 6815479), chapter 6.12 covers the VlvAnL I/O, mode changer, and external setpoint interlock signals. Always verify against the manual revision that ships with your installed APL version.

2. Prerequisites

Before building the CFC, confirm the following engineering workstation and runtime environment:

Item Requirement
PCS 7 version V9.0 SP2 or later (also valid for V8.2 with APL 8.2)
APL library version APL V8.0 minimum; V8.2 or V9.0 recommended for full SelA16In faceplate features
CFC chart license PCS 7 Engineering & Operator Station
Process tag type VlvAnL from APL master data library
Signal sources Two binary inputs wired to a DI card or CFC-driven flags; two analog setpoints already scaled in the same engineering unit (e.g. %)
Operator authorization OS user role with "Process controlling" right for setpoint changes

Import the master data library for your PCS 7 version from the Siemens support portal so the VlvAnL, SelA16In, and SelA02In block icons appear in the CFC catalog under APL → Blocks → Control → Valves and APL → Blocks → Calculation.

3. Block Architecture

The precedence logic is split into two CFCs (or one chart with two pages):

  1. Selector CFC — hosts one SelA16In block. Inputs In01 and In02 receive Setpoint A and Setpoint B. The block icon provides an additional manual operator selection through its faceplate.
  2. Valve CFC — hosts the VlvAnL block. Its MV_Ext input is wired from the SelA16In output Out. The link enable input MV_ExtLi is driven by an inverted AND of the two binary signals so the operator can freely type a setpoint only when neither signal is active.

For a minimal two-input implementation, the SelA02In block replaces the SelA16In; the Out value equals IN1 when the selection boolean is 1 and IN2 when it is 0. This removes the need for the integer-to-select conversion and is the cleanest design when only two setpoints are required.

4. VlvAnL Block Configuration

The VlvAnL block in APL exposes an interconnected set of mode and manipulated-variable inputs. The four I/Os that matter for external override are:

Parameter Direction Meaning Wiring in this design
MV_Ext Input (analog) External manipulated variable value Connected to SelA16In.Out / SelA02In.Out
MV_ExtLi Input (binary) External link enable Driven by inverted AND of Sig1 and Sig2 (1 = no signal present)
MV_LiOp Input (binary) Operator link enable for manual MV entry Driven by the same inverted AND; the operator only gets authority when no external signal is active
SelExt Input (integer) Active setpoint selector when multiple external MVs exist 1 when only Setpoint A is active, 2 when only Setpoint B is active, 0 (operator) otherwise
Important: According to the APL manual section on the Operating modes, the mode follower chain follows MV_LiOpMV_ExtLiMV_IntLi. Tying MV_LiOp to the inverted AND guarantees that operator mode wins as soon as both signals drop, without any additional mode-switching block.

5. SelA16In Setpoint Routing

Insert a SelA16In block into the Selector CFC. Configure the following I/Os:

  • In01 → Setpoint A (REAL, engineering unit)
  • In02 → Setpoint B (REAL, engineering unit)
  • SelExt → integer from CFC logic:
      – 1 when Sig1 = 1 (Setpoint A wins)
      – 2 when Sig1 = 0 AND Sig2 = 1 (Setpoint B)
      – 0 when Sig1 = 0 AND Sig2 = 0 (operator)
  • LiOp → 1 (operator may choose from the faceplate at any time)

If you have the Industry Library installed, the SelI function block selects an integer based on multiple boolean inputs without the need for ladder logic. Without the Industry Library, build the SelExt integer with two AND gates plus an OR:

SelExt = (Sig1 * 1) OR ((NOT Sig1) AND Sig2) * 2

The output Out is connected to the VlvAnL.MV_Ext input. The SelA16In faceplate exposes In01/In02 values and a manual selection dropdown, which is useful for commissioning but is normally suppressed via operator authorization when Sig1 or Sig2 is active.

6. SelA02In Two-Input Selection (Alternative)

When the design is restricted to exactly two setpoints, the SelA02In block produces a clean analog output from a single boolean:

Input Connection
IN1 Setpoint A
IN2 Setpoint B
SEL (boolean) Sig1 OR (Sig2 AND NOT Sig1) — high when Setpoint A wins
Out Wired to VlvAnL.MV_Ext

This avoids the integer conversion in SelA16In and is recommended for greenfield projects where the two-signal structure is fixed by the P&ID.

7. Operator Faceplate and Authorization

The SelA16In block icon and its faceplate remain visible in the OS picture so operators can see which setpoint source is currently routed. Configure the following operator authorizations in WinCC Explorer under User Administrator → Authorization → APL Setpoint Selection:

  1. Grant Process controlling only to roles that may override the binary signals (typically only Engineering and Maintenance).
  2. Hide the manual dropdown by clearing the OpAut attribute on the faceplate for standard operator roles.
  3. Configure an Operator Message on SelA16In.MsgLock so changing the selection during an active override raises an audit-trail entry.

The valve faceplate continues to expose its manual mode entry. Because MV_LiOp is only enabled when both signals are inactive, the operator entry field is automatically de-activated whenever Sig1 or Sig2 goes high — no additional interlock logic is required.

8. Setpoint Limiting

Both Setpoint A and Setpoint B must respect the same high/low engineering limits as the operator entry field, otherwise an external override could drive the valve outside its safe range. Two patterns are commonly used:

  1. Source-side limiting: Configure the upstream function block (PID controller or hand-set constant block) with limits Sp_HiLim and Sp_LoLim. The limits are propagated automatically to the SelA16In faceplate read-back.
  2. Selector-side limiting: Drop a Limit block (APL: Limit, category Calculation) between the setpoint source and the selector input. Set HiLim and LoLim on the Limit block to the valve-allowed range.

For operator entries, the VlvAnL faceplate already enforces the limits declared on Sp_HiLim and Sp_LoLim. Confirm these limits on the process tag type match the physical actuator stroke (typically 0–100 %). If the engineering unit is volumetric (m³/h), use the same pair of parameters and the same source/selector pattern.

9. Step-by-Step CFC Implementation

  1. Create a new CFC chart SETP_SEL_VLV_01 in the plant hierarchy under the unit that owns the valve.
  2. Insert the SelA16In block. Name it SEL_SP_VLV_01. Open the block icon properties and confirm Process tag type = SelA16In.
  3. Wire In01 to Setpoint A (REAL). Wire In02 to Setpoint B (REAL).
  4. Insert two AND blocks and one OR block to compute the integer SelExt. Use the formula in section 5.
  5. Insert an AND block with negated inputs (or a NAND + inversion) to compute the inverted AND of Sig1 and Sig2. Wire its output to both VlvAnL.MV_ExtLi and VlvAnL.MV_LiOp.
  6. In the valve CFC VLV_01, connect SelA16In.Out to VlvAnL.MV_Ext.
  7. Compile the program. In the CFC compiler settings, enable Generate block icons for all blocks so the selector appears on the OS picture.
  8. Open WinCC Explorer and run the OS Project Editor to refresh the picture and faceplate references.
  9. Download to the AS and OS. Trigger a Compile and Download Objects pass.

10. Commissioning Verification

With the program online, perform the following verification steps in this exact order. Each step assumes the valve is in a safe state and may be blocked by upstream permissives.

Step Test Expected result Pass criterion
1 Force Sig1 = 0, Sig2 = 0 Selector output follows SelA16In.SelExt = 0 Operator may type any setpoint between Sp_LoLim and Sp_HiLim
2 Force Sig1 = 1, Sig2 = 0 SelA16In.SelExt = 1, Out = In01 MV tracks Setpoint A; operator faceplate disables manual entry
3 Force Sig1 = 0, Sig2 = 1 SelA16In.SelExt = 2, Out = In02 MV tracks Setpoint B; operator faceplate disables manual entry
4 Force Sig1 = 1, Sig2 = 1 SelExt = 1, Out = In01 (Signal 1 has precedence) MV tracks Setpoint A regardless of Signal 2 state
5 Toggle operator dropdown during step 1 SelA16In.SelExt changes, Out follows selected input Operator override confirmed; OS audit message appears
6 Type setpoint 110 % with Sp_HiLim = 100 % Entry rejected by faceplate input check No out-of-range value accepted by the AS

Use the CFC online test mode to force individual inputs. Use the OS faceplate Trend view to verify that VlvAnL.MV tracks the selected source with a stable, lag-free response.

11. Troubleshooting Matrix

Symptom Likely cause Diagnostic Corrective action
MV never follows Setpoint A MV_ExtLi stuck at 0 or SelExt not wired Inspect VlvAnL.MV_ExtLi and SelA16In.SelExt online values Wire inverted AND; verify SelExt integer logic
Operator setpoint not accepted MV_LiOp forced to 0 by Sig1 or Sig2 Read VlvAnL.MV_LiOp and the two signal values Confirm Sig1 and Sig2 are truly inactive; check SigLock on the source block
Selector outputs wrong value during dual signal Integer logic precedence inverted Use CFC online test to monitor SelExt Reorder the AND/OR per section 5 formula
Setpoint jumps when signal toggles Setpoint A/B not limited to the same range as the operator Compare In01/In02 to Sp_HiLim/Sp_LoLim Add Limit blocks on the setpoint sources
Faceplate shows wrong block icon Wrong process tag type selected during block creation Open block → Properties → Process tag type Re-create with the correct APL master data type
Operator dropdown allows unauthorized source change OpAut attribute not cleared Open User Administrator in WinCC Explorer Restrict Process controlling to Engineering role
MV oscillates between sources Both binary signals chattering Trend Sig1 and Sig2 over 60 s Apply input debounce or hardware filter on the DI module

12. Field-Proven Caveats

  • The SelExt integer convention is 1-based (1 selects In01). Off-by-one errors during initial commissioning are the most common cause of inverted routing.
  • If the valve is in Tracking mode instead of Auto, the VlvAnL block follows its MV_Track input regardless of the override logic. Confirm the operating mode follower is configured for Auto before testing.
  • The APL revision that ships with PCS 7 V9.1 changed the SelA16In default behavior of SelExt when LiOp is low: it now latches the last valid selection. This is normally desirable but can surprise users who expect a fallback to a hardcoded setpoint.
  • Watch the alarm External MV invalid raised by VlvAnL. It triggers when MV_ExtLi is high but MV_Ext is out of the configured limits. Suppress this alarm during operator mode if the alarm source is the limit block.
  • For redundant AS configurations (AS 410 pair), verify that the SelA16In and VlvAnL blocks are assigned to the same Runtime Group so they switch over consistently during a failover.

Which APL block should I use for two setpoints — SelA16In or SelA02In?

Use SelA02In when exactly two setpoints exist. It produces a clean REAL output from a single boolean selection, eliminating the integer-to-select conversion required by SelA16In. Reserve SelA16In for designs with three or more candidate setpoints or where operator faceplate selection of the source is required.

How do I prevent the operator from typing a setpoint while Sig1 is active?

Wire the inverted AND of Sig1 and Sig2 to both VlvAnL.MV_LiOp and VlvAnL.MV_ExtLi. When either signal is active the operator link enable is 0, and the faceplate manual entry field is automatically disabled by the APL mode logic.

What limits apply to external setpoints A and B?

External setpoints must respect the same Sp_HiLim and Sp_LoLim values declared on the VlvAnL block. Configure a Limit block between the setpoint source and the selector input, or apply the limits at the upstream PID/constant block, so the selector output is always within the valve-allowed range.

Why does the selector output stay on In02 even when Sig1 is high?

The most common cause is an inverted SelExt logic. Confirm that SelExt = 1 when Sig1 is high (selects In01) and SelExt = 2 when Sig2 alone is high (selects In02). Verify with the CFC online test tool.

Do I need the Industry Library to implement this design?

No. The Industry Library SelI block simplifies the boolean-to-integer conversion but is optional. Standard AND/OR gates in CFC produce the same SelExt integer and meet the requirement of the APL manual.

Back to blog