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
- Root Causes of Non-Measurement Bad Output Conditions
- Step-by-Step Troubleshooting and Parameter Verification
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
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:
ModeParameter Configuration Mismatch:
* TheModeinput 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
Modewas manually overwritten, the driver detects an unsupported mode and forcesBad = 1.
- 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 setsQMODF = 1orQRACKF = 1, which propagates toPcs7AnIn. - Invalid Engineering Scaling (
Scale.High <= Scale.Low):
* If an engineer accidentally configuresScale.High = 0.0andScale.Low = 100.0(or both equal to zero), mathematical division by zero is prevented by the block settingBad = 1and clamping the output. - Active Simulation with Bad Parameter Values:
* IfSimOn = 1, the block processesSimPV_Ininstead of field hardware. If the simulated value is out of range or uninitialized,Badremains active.
Step-by-Step Troubleshooting and Parameter Verification
Follow this structured sequence to resolve the issue:
- Verify Scaling Parameters in CFC:
* Open the CFC chart containingPcs7AnIn.
* Expand the structured inputScale:- Verify that
Scale.High > Scale.Low(e.g.,Scale.High = 100.0,Scale.Low = 0.0).
- Verify that
- Verify Module Driver Generation and Mode Interconnection:
* Check input pinMode. In a healthy project,Modeis interconnected to output pinoMode_xxof the diagnostic driver in an@chart.
* IfModehas no interconnection, recompile CFC with Generate module drivers enabled. - Inspect Upstream Diagnostic Drivers:
* Trace theDataXchgorModeconnection back to the parent module driver block (e.g.,@MOD_D16_PN).
* Check ifQRACKF = 1orQMODF = 1. If active, resolve the hardware module diagnostic interrupt in the CPU diagnostic buffer (OB 82 / OB 86). - Check Simulation Status:
* Confirm thatSimOn = 0. If testing in simulation, ensure thatSimPV_Inis within valid scale limits.
Verification
- In SIMATIC CFC, open
Pcs7AnInin dynamic test mode. - Verify that:
Badtransitions from1to0.PV_Out.STdisplays16#80(Good).PV_Out.Valueaccurately 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
Modeinput 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,Badcan 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.Pcs7AnInevaluates system health, module diagnostics, and parameter validity before certifying the value as good. - What does signal status 16#00 vs 16#68 indicate?
16#00indicates a definitive failure (hardware fault or out-of-range value).16#68indicates 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
- Why Pcs7AnIn Outputs Uncertain Status 16#68 Instead of Bad on ET 200SP HA Rack Failure.
- Diagnosing Analog Input Module Interrupts (OB 82) in SIMATIC S7-400 Controllers.
Related Tags
PCS 7, APL, Pcs7AnIn, Bad Output, Analog Inputs, Diagnostics, Mode Parameter, Channel Drivers