Configuring WinCC I/O Field Limits for 0-10 Bar Pressure Tags

David Krause12 min read
SiemensTutorial / How-toWinCC
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

Configuring WinCC I/O Field Limits for 0-10 Bar Pressure Tags

This reference walks through the configuration of an I/O field in a WinCC HMI project to display and modify a pressure setpoint sourced from a SIMATIC S7 PLC programmed with SIMATIC Manager (STEP 7 V5.x). It covers the exact Process Value and Tag Process Value fields of the I/O field dialog, the tag-level low/high limit settings that enforce the 0-10 bar ceiling, the analog input scaling math that links the SM 331 raw count to engineering units, and the typical fault paths that prevent an operator from writing a new setpoint at runtime.

Overview

An I/O field in WinCC flexible is the only object that both reads and writes a process tag at runtime. The configuration of a pressure setpoint involves three distinct layers, all of which must be aligned:

  1. PLC tag defined in the STEP 7 symbol table (REAL in a data block).
  2. HMI tag defined in WinCC flexible that points to the PLC address and carries the engineering-unit limits.
  3. I/O field configured on the screen that links to the HMI tag, with a mode (Input, Output, or Input/Output) and a format pattern.

If any of these three layers disagree on data type, address, or access direction, the operator will see "####", a frozen value, or a write that never reaches the PLC.

Prerequisites

  • SIMATIC Manager with STEP 7 V5.5 or higher.
  • WinCC flexible 2008 SP5 (or WinCC V7.x for PC Runtime) with the same S7 connection configured.
  • S7-300/S7-400 CPU (e.g. 315-2 PN/DP) and an SM 331 analog input module (e.g. 6ES7 331-1KF02-0AB0) wired for a 0-10 V or 4-20 mA pressure transmitter.
  • Pressure transmitter with 0-10 bar nominal range (e.g. SITRANS P, Siemens 7MF1565).
  • An HMI connection of type S7ONLINE set up between the WinCC project and the CPU.
  • Online access to both the PLC and the HMI for downloading and verification.

Understanding the I/O Field Dialog

The I/O field is the central object used to enter and display process values in WinCC flexible. The settings for its position, geometry, style, color, and font are configured in the Layout tab; its tag binding and operating direction are configured in the General tab. In WinCC Unified, the same concept exists as the I/O field (RT Unified) object.

Mode (Input / Output / Input/Output)

Mode Read Write Use Case
Output Yes No Read-only indicator (current pressure PV)
Input No Yes One-shot command (e.g. start a pump)
Input/Output Yes Yes Setpoint adjustment (target pressure SP)

For a pressure setpoint, the I/O field must be configured as Input/Output. If the field is set to Output, every entry attempt fails silently and the value reverts to whatever the PLC currently holds.

Process Value vs. Tag Process Value

Two distinct identifiers appear in the I/O field configuration dialog under WinCC flexible:

  • Process Value - the symbolic name or absolute address on the PLC side. In classic WinCC flexible, this can be entered as an absolute address (for example, DB 101 DBD 0) or as a fully qualified symbolic name (for example, "Pressure_SP" from the STEP 7 symbol table). It is the address that the HMI reads from / writes to on the controller.
  • Tag Process Value - the HMI-internal tag name visible in the WinCC flexible project tree. The HMI tag is mapped to the PLC address through the connection. Renaming the HMI tag does not change the PLC address, only the name that WinCC flexible uses internally.
Why both fields exist: the Process Value defines where the data lives on the controller, while the Tag Process Value defines how the HMI refers to that data inside its own project. In most small projects, both fields hold the same name (e.g. Pressure_SP). The split becomes important when you integrate symbolic names from STEP 7 versus absolute addresses, or when you re-use the same HMI tag in multiple screens and want to rename the internal HMI tag for clarity.

Step-by-Step Configuration

Step 1 - Define the PLC Tag in STEP 7

  1. Open SIMATIC Manager and your S7 project.
  2. Open the S7 program, then Symbols.
  3. Add a new symbol:
    Symbol Address Data Type Comment
    Pressure_SP DB 101.DBD 0 REAL Pressure setpoint, 0.0 - 10.0 bar
  4. Open DB101 and confirm that DBD0 is declared as REAL with a default value of 0.0.
  5. Save, compile (S7 Program → Compile and Download Objects), and download the hardware configuration to the CPU.

Step 2 - Scale the Analog Input to 0-10 Bar

For a 0-10 V sensor on the SM 331, configure the measuring range as Voltage ±10 V (DIP switch setting "E" on most 8-channel SM 331 modules). For a 4-20 mA sensor, configure the range as 4-Wire Transducer or 2-Wire Transducer (settings "B" or "C") and wire the loop accordingly.

The SM 331 returns a raw count of 0 to 27648 for the unipolar 0-10 V / 4-20 mA range. Convert raw count to engineering units with the following linear formula:

Pressure_bar = (Raw_Count / 27648.0) * 10.0

Implement the scaling in a STEP 7 FC (here FC100). Example Structured Text (SCL) source:

// FC100 - Scale SM 331 raw value to pressure in bar
// Inputs : IW512 (INT)   - raw AI value from SM 331 channel 0
// Outputs: DB101.DBD0 (REAL) - scaled pressure, 0.0 .. 10.0 bar
// Temp   : #tScale (REAL)

#tScale := INT_TO_REAL(IW512) / 27648.0 * 10.0;

// Optional: clamp to 0..10 bar in case of sensor over-range
IF #tScale < 0.0 THEN #tScale := 0.0; END_IF;
IF #tScale > 10.0 THEN #tScale := 10.0; END_IF;

DB101.DBD0 := #tScale;

If you ladder-logic only, use FC105 (SCALE) from the STEP 7 Standard Library → TI-S7 Converting Blocks:

|         CALL  FC  105                                  |
|         IN   :=IW512                                  |
|         HI_LIM:=10.0                                  |
|         LO_LIM:=0.0                                   |
|         BIPOLAR:=FALSE                                |
|         RET_VAL:=MW200                                |
|         OUT  :=DB101.DBD0                             |

Step 3 - Create the HMI Tag in WinCC Flexible

  1. Open the WinCC flexible project.
  2. In the project tree, right-click Tags → New Tag.
  3. Configure the tag properties:
    Property Value
    Name Pressure_SP
    Connection S7ONLINE (your S7 connection)
    PLC address DB 101 DBD 0
    Data type REAL
    Length 4 bytes
    Acquisition cycle 1 s
    Access method Absolute access (recommended for first commissioning)
  4. Open the tag Properties dialog and switch to the Limits section:
    Property Value
    Lower limit 0
    Upper limit 10
    Start value low (scaling) 0
    End value high (scaling) 10
    Scaling Linear
  5. Compile and download the HMI project.
Tag limits enforce entry bounds at runtime. The I/O field reads these limits when validating operator input. Entering 15.0 when the upper limit is 10 either rejects the input (default) or clamps the value to 10, depending on the Limit behavior setting in the I/O field properties.

Step 4 - Configure the I/O Field on the Screen

  1. Open the screen that contains the pressure indicator.
  2. From the toolbox, drag an I/O field onto the canvas.
  3. In the configuration dialog, fill in the General tab:
    Field Entry
    Tag Pressure_SP
    Mode Input/Output
    Process Value Pressure_SP (PLC-side symbolic name) or DB 101 DBD 0 (absolute address)
    Tag Process Value Pressure_SP (HMI-internal tag name)
    Format pattern 999.9 (one decimal place)
  4. Switch to the Limits tab and confirm:
    Property Value
    Low limit 0
    High limit 10
  5. Switch to the Appearance tab and select 3D or Flat as required.
  6. Click OK, save the screen.

Step 5 - Optional: Add a Bar Graph for Visual Indication

For a richer operator view, add a Bar object on the same screen:

  1. Insert a Bar from the toolbox.
  2. Assign the same tag (Pressure_SP).
  3. Set the bar range to 0 (low) and 10 (high) bar.
  4. Color the bar segments: green 0-7 bar, yellow 7-9 bar, red 9-10 bar.

Verification

  1. Download the WinCC project to the HMI panel (or start WinCC RT).
  2. On the HMI, navigate to the pressure screen.
  3. Confirm the I/O field displays the current value of DB101.DBD0 from the PLC.
  4. Click the I/O field, enter 7.5, press Enter.
  5. In STEP 7, open a VAT or watch table on DB101.DBD0 and confirm the value is now 7.5 (REAL: 0x40F00000).
  6. Try entering 15.0 - the HMI should either reject the value with an error beep, or clamp it to 10.0 depending on the limit-behavior setting.
  7. Force DB101.DBD0 := -1.0 from STEP 7 to verify the lower limit. The HMI should display 0.0.
  8. Cycle power on the PLC to verify the setpoint retention behavior (see Edge Cases below).

Troubleshooting Matrix

Symptom Likely Root Cause Resolution
I/O field shows "####" Tag address mismatch, wrong data type, or PLC not in RUN Verify PLC address (DB 101 DBD 0) and data type (REAL). Confirm the CPU is in RUN with no SF (system fault) LED.
Cannot enter values - keyboard does not appear Field is configured as Output only Change mode on the I/O field to Input/Output.
Value reverts to original after Enter HMI tag is read-only, or PLC area is write-protected Open the HMI tag properties and uncheck Read only. Verify that the DB has no write-protection in STEP 7.
Entered value not stored to PLC S7 connection not active, or wrong area pointer Check the connection in WinCC flexible → Connections. Re-test the connection with the Check Connection button. Confirm the rack/slot matches the CPU.
Entered value exceeds 10 bar at runtime Upper limit not configured on tag or I/O field Set Upper Limit = 10 on the HMI tag (Limits section) and on the I/O field (Limits tab).
PLC value not displayed Acquisition cycle too long, or wrong area pointer Reduce acquisition cycle to 100 ms or 1 s. Verify the connection uses Absolute address access for the tag.
Decimal not shown Format pattern missing or wrong Set format pattern to 999.9 for one decimal place, or 9999.99 for two.
Value is exactly 0.0 Sensor wiring reversed, or wrong measuring range DIP Verify SM 331 DIP switch position. Measure sensor output with a multimeter. Check the wiring polarity.
Error 33:40001 in HMI diagnostics Tag address not found in PLC Open the HMI diagnostics buffer and inspect the affected tag. Recompile the STEP 7 program and re-download.

Edge Cases and Field Tips

Negative Pressure or Compound Ranges

For a sensor measuring -1 to +10 bar, configure the SM 331 to bipolar ±10 V (range "D" on most modules). The raw count is -27648 to +27648. Use bipolar scaling:

Pressure_bar = (Raw_Count / 27648.0) * 10.0

Set FC105 (SCALE) with BIPOLAR := TRUE and LO_LIM := -1.0, HI_LIM := 10.0. On the HMI tag, set the lower limit to -1 and upper limit to 10.

4-20 mA Sensors with Live Zero

For a 4-20 mA sensor, raw count is 0 at 0 V / 0 mA and 27648 at 20 mA. The 4 mA offset does not subtract from the raw count; the standard FC105 / FC106 scaling formula already covers it. If the sensor is calibrated to 0-10 bar with 4 mA = 0 bar, the same formula applies:

Pressure_bar = (Raw_Count / 27648.0) * 10.0

Wire-break detection: for 4-20 mA sensors, a value below 0 mA or above 22 mA is reported as raw count -32768 (under-range) or 32767 (over-range). Add a check in STEP 7 to set the pressure to 0 and raise a sensor fault bit when this happens.

Reject vs. Clamp Limit Behavior

WinCC flexible offers two limit behaviors on the I/O field:

  • Reject (default) - the HMI rejects the input and emits an error tone. The PLC value is unchanged.
  • Clamp - the HMI accepts the input but writes the limit value (0 or 10) to the PLC.

Configure this in the I/O field properties → Limit behavior. Use Reject for setpoints to prevent accidental over-pressurization due to clamping.

Persisting the Setpoint Through Power Cycle

Data blocks in STEP 7 are volatile by default. To retain DB101.DBD0 across a power cycle:

  1. Open DB101 properties in STEP 7.
  2. Check the Non-Retain / Retain setting for the area covering DBD0.
  3. Alternative for non-retentive CPUs: use SFB 81 (RDP) and SFB 82 (WRIT_DBL) to store the value to a load memory area.

WinCC V7 vs WinCC flexible vs WinCC Unified

Aspect WinCC flexible 2008 WinCC V7.x WinCC Unified (TIA V17+)
Tag binding Process Value / Tag Process Value dialog Tag ↔ PLC tag mapping Single "Tag" property; limits in tag properties
Mode Input / Output / Input/Output Same Configured via the I/O field properties
Engineering tools SIMATIC Manager ↔ WinCC flexible SIMATIC Manager ↔ WinCC V7 Single TIA Portal project
Limit behavior Reject / Clamp Reject / Clamp Reject / Clamp / No limit

For the modern I/O field object in WinCC Unified, refer to the official TIA Portal help: I/O field (RT Unified) - WinCC Unified.

Sample VAT Verification (STEP 7)

Create a Variable Table (VAT) with the following rows to verify end-to-end behavior:

Address Display Format Status / Modify Value
IW 512 DEC Status (sensor raw count)
DB101.DBD 0 FLOAT Status + Modify (setpoint from HMI)

Open the VAT online, force IW512 := 13824 (which equals 5.0 bar after scaling) and confirm the HMI bar reads 5.0. Then enter 8.0 in the HMI I/O field and confirm DB101.DBD0 := 8.0.

FAQ

What should I enter in the Process Value and Tag Process Value fields of the WinCC I/O field?

Process Value is the PLC-side symbolic name or absolute address (e.g. Pressure_SP or DB 101 DBD 0); Tag Process Value is the HMI-internal tag name (e.g. Pressure_SP). In most projects both fields hold the same name; the split lets you separate the controller-side identifier from the HMI-side identifier.

How do I cap the I/O field at 10 bar?

Open the HMI tag properties, go to the Limits section, and set Lower limit = 0 and Upper limit = 10. Also confirm the I/O field Limits tab shows the same values, and set Limit behavior to Reject so out-of-range entries are refused rather than clamped.

Why does the I/O field show "####" even though the tag is configured?

"####" indicates that the HMI cannot read the value from the PLC. Verify that the S7 connection is online (use Check Connection), that the PLC address DB 101 DBD 0 exists, and that the HMI tag data type matches the PLC type (REAL ↔ 4 bytes). Also confirm the CPU is in RUN and not in STOP.

How do I scale a 0-10 V pressure sensor with a 0-10 bar range?

Configure the SM 331 to the 0-10 V range and use the linear formula Pressure_bar = (Raw_Count / 27648.0) * 10.0. In STEP 7, implement this in FC100 or use the standard FC105 (SCALE) block with HI_LIM = 10.0, LO_LIM = 0.0, BIPOLAR = FALSE.

Why does the entered value not persist after a power cycle?

Data blocks are volatile by default. Open DB101 properties in STEP 7 and configure the area covering DBD0 as Retain instead of Non-Retain. For S7-300 CPUs without retentive DB support, use SFB 81 / SFB 82 to store the value to load memory.

Back to blog