How to Scale Analog Values in SIMATIC PCS 7 APL Using Channel Drivers and Conversion Blocks
In SIMATIC PCS 7 Advanced Process Library (APL), analog process measurements are scaled from raw fieldbus or I/O signals into real engineering units directly within the input channel driver block Pcs7AnIn (FB1870) by configuring its compound parameter Scale. Unlike classic PLC ladder logic that requires manual mathematical formulas or conversion calls (like FC105 SCALE), Pcs7AnIn automatically handles raw analog-to-digital integer conversion, zero/span normalization, live sensor error filtering, and NAMUR signal status generation. For custom non-linear scaling (e.g., strapping curves for horizontal cylindrical tanks) or secondary mathematical range transformations, PCS 7 provides specialized mathematical blocks such as Polygon (FB1881) and Mul04.
Table of Contents
- Architecture of Analog Signal Processing in the PCS 7 APL
- The Pcs7AnIn Channel Driver: Automated Linear Scaling
- Configuring the Scale Parameter Structure (Scale.High and Scale.Low)
- Method: Step-by-Step Analog Scaling Configuration in CFC
- Non-Linear Scaling for Tanks and Profiles Using the Polygon Block
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Architecture of Analog Signal Processing in the PCS 7 APL
In SIMATIC PCS 7, analog signal conversion bridges raw electrical measurements with engineering visualization:
- Raw Peripheral Values: Standard analog input modules (e.g., 4–20 mA, PT100 RTDs, thermocouple cards) convert electrical currents into 16-bit signed integers in controller peripheral memory (e.g., $4\ \text{mA} = 0$, $20\ \text{mA} = 27648$ under Siemens S7 representation).
- The Modern Channel Driver (Pcs7AnIn): Connects to the raw peripheral address (e.g., IW 512), converts the integer to IEEE 754 floating-point (REAL), scales the value according to physical transmitter limits, and emits an APL structure (Out: STRUCT Value + ST).
- Direct Technological Feeding: The output structure feeds directly into PID controllers (PIDConL), monitoring blocks (MonAnL), or totalizers without requiring intermediate math blocks.
The Pcs7AnIn Channel Driver: Automated Linear Scaling
The Pcs7AnIn block executes automated linear scaling using the standard formula:
$$\text{Out.Value} = \left(\frac{\text{Raw} - \text{RawLow}}{\text{RawHigh} - \text{RawLow}}\right) \times (\text{Scale.High} - \text{Scale.Low}) + \text{Scale.Low}$$
Where standard Siemens analog cards evaluate $\text{RawLow} = 0$ ($4\ \text{mA}$) and $\text{RawHigh} = 27648$ ($20\ \text{mA}$). Furthermore, Pcs7AnIn continuously monitors Under-range ($< 3.6\ \text{mA}$) and Over-range ($> 22.8\ \text{mA}$) thresholds defined by NAMUR NE 43, asserting sensor failure diagnostics automatically whenever the wire is shorted or severed.
Configuring the Scale Parameter Structure (Scale.High and Scale.Low)
In CFC, the scaling boundaries are parameterized on the compound structure input Scale:
Scale.HighREAL100.0 (bar)Scale.LowREAL0.0 (bar)PV_UnitINT1137 (bar) or 1130 (Pa)By setting Scale.Low and Scale.High, all downstream faceplates, alarm thresholds, and trend scales in WinCC automatically inherit the calibrated span.
Method: Step-by-Step Analog Scaling Configuration in CFC
Follow this standardized procedure to scale an analog input channel:
Step 1: Instantiate Pcs7AnIn in CFC
- In SIMATIC Manager, open the target CFC chart.
- From the APL library catalog, drag
Pcs7AnIn(FB1870) into the chart. - Assign a symbolic block name matching the instrument tag (e.g.,
PT_101).
Step 2: Connect the Raw Peripheral Address
- Locate the input parameter
PV_In. - Right-click
PV_Inand select Interconnection to Address.... - Enter the absolute hardware I/O address or symbolic tag from the Symbol Table (e.g.,
IW 512orPT_101_Raw).
Step 3: Configure Engineering Span and Unit
- In the block parameter list, expand
Scale:
- SetScale.Lowto the minimum calibrated transmitter range (e.g.,0.0).
- SetScale.Highto the maximum calibrated transmitter range (e.g.,250.0). - Locate parameter
PV_Unit:
- Enter the corresponding integer unit code (e.g.,1137forbar,1001for°C,1342form³/h).
Step 4: Interconnect to Process Monitoring or Control
- Connect
Pcs7AnIn.Outdirectly to the input of a technological block:
- For simple display and alarm limits: Connect toMonAnL.PV.
- For closed-loop control: Connect toPIDConL.PV. - Compile CFC (Generate module drivers checked) and execute an OS Compile.
Non-Linear Scaling for Tanks and Profiles Using the Polygon Block
When scaling non-linear process variables—such as liquid volume in a horizontal dished-end tank, or mass flow from differential pressure across an uncompensated orifice—linear scaling yields inaccurate readings:
1. Scale the raw level measurement linearly ($0\% - 100\%$) using Pcs7AnIn.
2. Insert the APL block Polygon (FB1881) immediately downstream.
3. Configure the interpolation table in Polygon:
- Up to 8 or 16 interpolation coordinate pairs $(X_1, Y_1)$ through $(X_n, Y_n)$.
- $X$ corresponds to liquid level percentage ($0\% - 100\%$).
- $Y$ corresponds to true volumetric liters calculated from strapping tables.
4. Polygon executes linear spline interpolation between points, outputting an accurate volume structure with preserved signal quality.
Verification
To verify that the analog scaling operates accurately:
- Connect a calibrated 4–20 mA current simulator to the physical field terminals.
- Inject $4.00\ \text{mA}$ ($0\%$): verify in online CFC Test Mode that Pcs7AnIn.Out.Value displays the exact Scale.Low value (e.g., 0.0).
- Inject $12.00\ \text{mA}$ ($50\%$): verify that Out.Value reads precisely midpoint span (e.g., 125.0).
- Inject $20.00\ \text{mA}$ ($100\%$): verify that Out.Value displays Scale.High (e.g., 250.0).
- Open WinCC Runtime: confirm that the bar graph limits match $0–250$, the engineering unit label displays bar, and alarms trigger at calibrated setpoints.
Limitations and Operational Precautions
- Square Root Extraction on Differential Flow: If measuring flow via differential pressure ($\Delta P$), do not perform manual square root math if the transmitter already executes square root extraction. Verify whether square root extraction is performed in the field transmitter, in HW Config module properties, or via parameter
Feature.BitinPcs7AnIn. Enabling square root twice results in severe flow measurement errors. - Transmitter Span Alignment: Always ensure that
Scale.LowandScale.Highin PCS 7 match the physical calibration programmed into the field transmitter via HART / SIMATIC PDM. If the transmitter is calibrated for $0–150\ \text{bar}$ but the DCS driver is set to $0–250\ \text{bar}$, readings will be completely misaligned. - Never Use FC105 in APL Architectures: Avoid legacy STEP 7 blocks like
FC105 SCALE. They do not generate NAMUR signal status structures, do not interface with the PCS 7 Driver Generator, and cannot link to WinCC faceplates.
Engineer FAQ
Where do I find the integer unit code for my engineering unit?
The complete list of integer codes is published in the SIMATIC PCS 7 APL Manual under "Selecting a unit of measure" or in the STEP 7 online help under "Engineering Units".
Can I scale temperature RTD inputs (PT100) using Pcs7AnIn?
Yes. For standard temperature modules configured in HW Config as RTD inputs, the module outputs temperature directly in tenths of a degree (e.g., $250 = 25.0\ ^\circ\text{C}$). Configure Scale.Low and Scale.High to match the expected operating range, or use mode settings to read degrees directly.
What happens if field current drops below 3.6 mA?
Under NAMUR NE 43 rules, current below 3.6 mA indicates a wire break or transmitter failure. Pcs7AnIn asserts Bad = 1, changes signal status ST to 16#00, and raises a system diagnostic alarm.
How do I invert an analog signal (e.g., 20 mA = 0% and 4 mA = 100%)?
Invert the scaling boundaries: set Scale.Low to 100.0 and Scale.High to 0.0. Pcs7AnIn handles negative slope scaling automatically.
Technical References
- Siemens Industry Online Support: SIMATIC PCS 7 Advanced Process Library (APL) Manual.
- SIOS Entry 109742323: PCS 7 Compendium Part A - Configuration Guidelines (Section: Analog Processing).
- NAMUR Recommendation NE 43: Standardization of the Output Signal Level of Measuring Transmitters.
- Siemens Support FAQ: How to Configure Analog Scaling in SIMATIC PCS 7 APL.
Related Articles
- How to Configure Engineering Units and Find Unit Codes (RPM / U/min) in PCS 7 APL
- Best Practices for Structuring APL Channel Drivers and Control Blocks in PCS 7
- How to Diagnose and Resolve QBAD Faults on Digital Input Channels in PCS 7
Related Tags
- Pcs7AnIn
- Analog Scaling
- APL
- Scale
- Polygon
- NAMUR NE 43
- Industrial Automation