Processing Raw Values and Non-Released I/O in Pcs7AnIn Using Feature Bit 27 and Manual Mode Configuration

Processing Raw Values and Non-Released I/O in Pcs7AnIn Using Feature Bit 27 and Manual Mode Configuration

In SIMATIC PCS 7 Advanced Process Library (APL), when analog input values are forced or simulated via S7-PLCSIM (or read from non-released, third-party PROFINET/PROFIBUS distributed I/O) where PV_In receives raw integer counts but PV_Out remains locked at 0.0 despite status showing Good (16#80), the failure occurs because the automated module driver generator did not instantiate diagnostic blocks or populate the channel Mode parameter. To resolve this and process raw values directly without module drivers, set Feature.Bit27 = TRUE ('Evaluate raw value directly / Process third-party I/O without driver blocks') on the Pcs7AnIn block, manually configure parameter Mode (e.g., 16#0303 or 16#0201 for standard 4..20 mA), configure Scale.High and Scale.Low, and compile without 'Generate module drivers'.

Table of Contents

Executive Summary

Integrating non-standard, OEM, or third-party distributed I/O devices (such as third-party PROFINET remote terminals, specialized flow meters, or non-PCS 7 released ET 200SP modules) into SIMATIC PCS 7 frequently encounters signal conversion barriers. When an engineer links raw peripheral counts (IW) directly to Pcs7AnIn.PV_In, the block often displays valid signal status (0x80) while PV_Out.Value stubbornly reports 0.0. This phenomenon occurs because APL channel drivers default to strict diagnostic handshakes with Siemens Basis Library driver blocks. By activating Feature.Bit27 and manually defining the electrical measurement Mode, engineers unlock direct raw value scaling, bypassing module driver dependencies for testing or third-party device integration.

Architecture and Fundamental Mechanics

The signal processing engine of Pcs7AnIn (FB 1869) bifurcates based on whether automated driver management or direct raw value processing is active:

  1. Standard Automated Driver Mode (Feature.Bit27 = 0):
    * By default, Pcs7AnIn expects the PCS 7 module driver generator to establish connections between the channel block and diagnostic blocks (MOD_D1, RACK, SUBNET).
    * The driver generator writes the hardware configuration profile into parameter Mode (a 32-bit DWORD). If Mode is 16#00000000 (uninitialized), the internal scaling algorithm treats raw counts as invalid or uncalibrated, forcing PV_Out.Value to 0.0.
    * In S7-PLCSIM or when interfacing third-party GSDML devices that lack PCS 7 driver generator rules, the driver generator skips the module, leaving Mode at zero.
  2. The Direct Processing Mode (Feature.Bit27 = 1):
    * Feature Bit 27 Definition: 'Evaluate raw value directly / Process non-standard I/O'.
    * When Feature.Bit27 = 1, Pcs7AnIn detaches its conversion logic from the automated diagnostic driver framework.
    * The block directly reads the 16-bit signed integer counts applied to PV_In (0..27648 for unipolar, -27648..+27648 for bipolar), applies the mathematical formula: PV_Out = Scale.Low + ((PV_In / 27648.0) * (Scale.High - Scale.Low)).
    * It sets PV_Out.ST = 16#80 (Good) and outputs the calibrated engineering value directly.
  3. The Role of the Mode Parameter under Feature.Bit27:
    * Even with Feature.Bit27 = 1, Pcs7AnIn requires a valid electrical mode format to interpret live limits:
    • Mode = 16#0201: 4..20 mA standard 2-wire
    • Mode = 16#0303: 4..20 mA with HART or extended limits
    • Mode = 16#0206: 0..10 V unipolar voltage
    • Manually setting Mode informs the block of over-range/under-range thresholds (NAMUR NE43: under 3.6 mA or over 21.0 mA).

Step-by-Step Implementation Procedure

Follow these procedures to configure Pcs7AnIn for direct raw value processing from S7-PLCSIM or third-party I/O:

  1. Open the CFC Chart and Locate Pcs7AnIn:
    * In CFC, double-click the Pcs7AnIn block to open its parameter table (or inspect block inputs directly).
  2. Configure Feature Bit 27:
    * Locate the structured input parameter Feature.
    * Expand Feature to locate Bit27.
    * Set Feature.Bit27 = TRUE (or set Feature = 16#08000000 if entering hex bitmasks directly).
  3. Manually Parametrize the Mode Parameter:
    * Locate input parameter Mode.
    * In CFC, parameter Mode is often hidden by default. In the block properties under the I/Os tab, find Mode and uncheck the Invisible attribute to expose it on the chart.
    * Set Mode to the appropriate hex value for your measurement type:
    • For standard 4..20 mA (2-wire transmitter): Enter 16#0303 or 16#0201.
    • For 0..20 mA: Enter 16#0202.
    • For 0..10 V: Enter 16#0206.
  4. Configure Engineering Scaling (Scale):
    * Verify that input parameter Scale is populated with your process span:
    • Scale.High = 100.0 (or maximum engineering unit, e.g., 150.0 °C)
    • Scale.Low = 0.0 (or minimum engineering unit, e.g., -20.0 °C)
  5. Compile Without Overwriting Module Drivers:
    * In CFC, select Chart > Compile > Scope: Changes only.
    * Uncheck the box Generate module drivers to ensure the compiler does not overwrite your manual Mode parameter.
    * Download changes to the AS controller or S7-PLCSIM in RUN.
  6. Feed Raw Values via S7-PLCSIM:
    * In S7-PLCSIM, open the variable table (VAT) or memory view.
    * Force raw integer counts onto the input word mapped to PV_In (e.g., write 13824 for 50% scale, or 27648 for 100% full scale).
    * Observe that PV_Out.Value immediately calculates 50.0 (or 100.0) with PV_Out.ST = 16#80.

Verification

In CFC online test mode, verify that modifying PV_In in S7-PLCSIM causes an instantaneous proportional calculation on PV_Out.Value. Check that Bad.Value = FALSE and PV_Out.ST = 16#80. Open the WinCC OS faceplate; verify that the analog meter and numerical readout match the simulated engineering value without displaying simulation warning glyphs.

Limitations and Operational Precautions

When using Feature.Bit27 = 1 on production controllers with third-party devices, hardware diagnostics (wire break detection, short circuit alerts, module failure alarms) are not automatically handled by the PCS 7 Basis Library. You must program explicit limit checking or evaluate device-specific status words manually.

Engineer FAQ

What is the exact function of Feature Bit 27 on Pcs7AnIn?

Feature.Bit27 enables direct evaluation of the raw input value on PV_In, allowing signal scaling without requiring automatic module driver generation or Basis Library diagnostic blocks.

Why did the output stay at 0.0 if the quality code was 16#80?

If Mode is 16#0000, the block's conversion engine lacks measurement type scaling parameters, defaulting the scaled output value to 0.0 even while the quality code reports good.

What hex value should I enter for Mode for a 4-20mA sensor?

Enter 16#0201 (standard 4..20 mA) or 16#0303 (4..20 mA with extended diagnostic range).

Can I re-enable 'Generate module drivers' later?

Yes, but if the module is unreleased or third-party, re-enabling driver generation will overwrite Mode back to 16#0000 unless custom XML driver rules are created.

Technical References

Related Articles

Related Tags

  • Pcs7AnIn
  • Feature Bit 27
  • Mode Parameter
  • Third-Party I/O
  • S7-PLCSIM
  • Raw Value Scaling
20 respuestas