Why Pcs7AnIn Outputs Bad = 1 When Raw Analog Measurement Is Within Range

Why Pcs7AnIn Outputs Bad = 1 When Raw Analog Measurement Is Within Range

The APL channel block Pcs7AnIn asserts 'Bad = 1' despite healthy 4-20 mA electrical current when an upstream module driver fault is detected, when the Mode parameter mismatches the hardware configuration, or when scale parameters are invalid. In PCS 7, Bad status is driven not only by raw signal thresholds (underflow/overflow), but also by hardware diagnostic states: if Mode does not match the card type (e.g., 16#0203 for 4-20 mA HART), if Scale.High <= Scale.Low, or if the rack driver asserts QRACKF = 1, Pcs7AnIn forces Bad = 1 to protect the process.

Table of Contents

Diagnostic Architecture of the Pcs7AnIn Channel Driver

In the SIMATIC PCS 7 Advanced Process Library (APL), the analog input driver block Pcs7AnIn (FB 1869) serves as the primary gateway between physical analog input modules (ET 200SP HA, ET 200M) and process control algorithms (PIDConL, MonAnL).

The block evaluates signal health holistically, combining:
1. Raw Measurement Value (PV_In): 16-bit analog integer value (e.g., 0 to 27648 representing 4 to 20 mA).
2. Channel Operating Mode (Mode): 32-bit hex configuration word defining measuring range, live zero behavior, and HART capabilities.
3. Upstream Hardware Diagnostics (DataXchg, MS): Communication links to system driver blocks (MOD_D16_PN, MOD_HA_PA) monitoring module power, wire break, and backplane health.

When any underlying integrity check fails, Pcs7AnIn asserts Bad = 1 and downgrades the output signal status PV_Out.ST to 16#00 (Bad) or 16#68 (Uncertain), even if the raw electrical signal reads exactly 12.0 mA.

Root Causes of Non-Measurement Bad Output Conditions

When an engineer confirms that physical loop calibrators read a healthy 4-20 mA current yet Bad remains 1, inspect these four primary non-measurement failure modes:

  1. Mode Parameter Configuration Mismatch:
    * The Mode input must precisely match the measurement type configured in HW Config:
    • 16#0201: 4 to 20 mA standard 2-wire.
    • 16#0203: 4 to 20 mA HART.
    • 16#0205: 0 to 20 mA.
    • If the block was copied manually without running Generate module drivers, or if Mode was manually overwritten, the driver detects an unsupported mode and forces Bad = 1.
  2. Upstream Module or Rack Failure (QRACKF / QMODF):
    * The hardware module driver in the @ diagnostic charts detects an internal module fault, lost 24 V sensor supply voltage, or communication bus degradation. It sets QMODF = 1 or QRACKF = 1, which propagates to Pcs7AnIn.
  3. Invalid Engineering Scaling (Scale.High <= Scale.Low):
    * If an engineer accidentally configures Scale.High = 0.0 and Scale.Low = 100.0 (or both equal to zero), mathematical division by zero is prevented by the block setting Bad = 1 and clamping the output.
  4. Active Simulation with Bad Parameter Values:
    * If SimOn = 1, the block processes SimPV_In instead of field hardware. If the simulated value is out of range or uninitialized, Bad remains active.

Step-by-Step Troubleshooting and Parameter Verification

Follow this structured sequence to resolve the issue:

  1. Verify Scaling Parameters in CFC:
    * Open the CFC chart containing Pcs7AnIn.
    * Expand the structured input Scale:
    • Verify that Scale.High > Scale.Low (e.g., Scale.High = 100.0, Scale.Low = 0.0).
  2. Verify Module Driver Generation and Mode Interconnection:
    * Check input pin Mode. In a healthy project, Mode is interconnected to output pin oMode_xx of the diagnostic driver in an @ chart.
    * If Mode has no interconnection, recompile CFC with Generate module drivers enabled.
  3. Inspect Upstream Diagnostic Drivers:
    * Trace the DataXchg or Mode connection back to the parent module driver block (e.g., @MOD_D16_PN).
    * Check if QRACKF = 1 or QMODF = 1. If active, resolve the hardware module diagnostic interrupt in the CPU diagnostic buffer (OB 82 / OB 86).
  4. Check Simulation Status:
    * Confirm that SimOn = 0. If testing in simulation, ensure that SimPV_In is within valid scale limits.

Verification

  • In SIMATIC CFC, open Pcs7AnIn in dynamic test mode.
  • Verify that:
  • Bad transitions from 1 to 0.
  • PV_Out.ST displays 16#80 (Good).
  • PV_Out.Value accurately reflects the scaled engineering unit value corresponding to the field current.
  • Open the operator faceplate in WinCC Runtime. Confirm that the yellow/bad signal status badge disappears from the analog bar graph.

Limitations and Operational Precautions

  • Never hard-code the Mode input with constants unless operating in standalone simulation outside a PCS 7 multiproject; always rely on the automated Module Driver Generator.
  • In redundant S7-410 systems, verify that both CPU subnets are synchronized; a redundancy fault on the fieldbus interface module can force channel drivers to uncertain status.

Engineer FAQ

  • Can a wire break cause Bad = 1 if current is measured?
    Yes. If current drops momentarily below 3.6 mA, the module latches a diagnostic interrupt. If the module requires diagnostic acknowledgment or if discrepancy timers are running, Bad can linger until cleared.
  • Why does the raw peripheral value show valid counts when Bad is 1?
    The peripheral input word (PIW 512) simply reports raw analog-to-digital converter counts. Pcs7AnIn evaluates system health, module diagnostics, and parameter validity before certifying the value as good.
  • What does signal status 16#00 vs 16#68 indicate?
    16#00 indicates a definitive failure (hardware fault or out-of-range value). 16#68 indicates an uncertain, device-related degraded state (such as upstream rack communication disturbance).

Technical References

  • SIMATIC PCS 7 Advanced Process Library (APL) Function Manual: Pcs7AnIn Block (A5E43360408-AA).
  • SIMATIC PCS 7 Channel Blocks and Diagnostic Blocks Manual (A5E41356241-AA).
  • NAMUR NE107: Diagnostic Field Device Architecture.

Related Articles

Related Tags

PCS 7, APL, Pcs7AnIn, Bad Output, Analog Inputs, Diagnostics, Mode Parameter, Channel Drivers

20 respuestas