Understanding the Architectural Difference Between Mode and PV_ST on PCS 7 Channel Drivers

Understanding the Architectural Difference Between Mode and PV_ST on PCS 7 Channel Drivers

In SIMATIC PCS 7 Advanced Process Library (APL) channel driver blocks, the Mode parameter and the Process Value Quality Code (PV_ST) serve fundamentally different architectural roles. Mode is a 32-bit hardware configuration and diagnostic structure originating from system diagnostic blocks (MOD), tracking physical module health and signal measuring types. In contrast, PV_ST is a technological quality code conforming to NAMUR NE 107 and PA Profile standards, reflecting the operational validity of the process variable. Hardware diagnostics evaluated via Mode always take precedence over static PV_ST values.

Table of Contents

Architectural Division: Hardware Diagnostics vs Process Signal Status

A foundational concept in SIMATIC PCS 7 driver engineering is the separation between hardware-level physical diagnostics and application-level process value validity:

  • Hardware Diagnostic Domain (Mode): Managed automatically by the PCS 7 driver generator (Generate Module Drivers). System diagnostic blocks (MOD_D1, MOD_HA, MOD_PA, OB_DIAG) monitor controller organization blocks (OB82, OB83, OB85, OB86). They output the Mode structure to inform channel drivers whether the underlying I/O card is healthy, missing, unconfigured, or reporting an electrical fault.
  • Process Signal Domain (PV_ST): Represents the technological signal status conforming to NAMUR Recommendation NE 107 and PROFIBUS PA Profile 3.02. In fieldbus devices, PV_ST is transmitted cyclically alongside the measured value by the intelligent field instrument itself.

Understanding this division clarifies why a channel driver can have a valid PV_ST byte while simultaneously asserting a channel fault due to an invalid Mode.

Deep-Dive into the Mode Parameter Structure

The Mode parameter (Data type: DWORD) encapsulates module type, measuring range, and hardware channel validity:

  • Byte 0 (Most Significant Byte): Reserved / Sub-system flags.
  • Byte 1 & 2 (Measuring Range / Channel Type): Defines the technological configuration assigned in HW Config:
  • 16#0001: Current (4-20 mA with HART or PA Profile).
  • 16#0201: Voltage (e.g., +/- 10V).
  • 16#0401: RTD / Thermocouple.
  • Byte 3 (Least Significant Byte / Channel Quality): Evaluates the physical channel validity:
  • 16#80: Channel Valid (Module is healthy, communicating, and operating within electrical parameters).
  • 16#00: Channel Invalid (Hardware fault, wire break detected, missing auxiliary power, or station failure).
+-------------------------------------------------------------------+
|               Structure of the 32-Bit Mode Parameter              |
+-------------------------------------------------------------------+
|  Byte 0 (MSB) |    Byte 1    |    Byte 2    |    Byte 3 (LSB)     |
|   [Reserved]  |     [Measuring Range / Type]   |  [Channel Status]   |
|               |       e.g., 16#0001 = 4-20mA   |  16#80 = Valid      |
|               |                                |  16#00 = Invalid    |
+-------------------------------------------------------------------+

Deep-Dive into the PV_ST Quality Code Structure

The PV_ST parameter (Data type: BYTE or APL structured variable STRUCT.ST) conveys signal quality according to standardized industrial criteria:

  • Bit 6 & 7 (Quality Class):
  • 16#80 (0b10000000): Good (Signal is valid and reliable).
  • 16#40 (0b01000000): Uncertain (Signal degraded, sensor approaching limit, or substitute value active).
  • 16#00 (0b00000000): Bad (Process value is invalid, sensor defective, or out of range).
  • Bit 2 to 5 (Sub-Status / Diagnostics):
  • 16#84: Good - Maintenance update required.
  • 16#68: Uncertain - Device in manual / simulated state.
  • 16#28: Bad - Device failure or channel short circuit.

Precedence and Conflict Resolution in Channel Drivers

In channel drivers like Pcs7AnIn and FbAnIn, internal logic evaluates both parameters using a strict safety hierarchy:

  1. Hardware Fault Trumps Signal Status: If Mode.Byte3 == 16#00 (Hardware Invalid), the block forces:
    * QBAD = 1
    * Bad.Value = 1
    * Technological output quality code PV_Out.ST = 16#00 (Bad)
    This occurs even if PV_ST at the input pin reports 16#80. The rationale: a static 16#80 input byte is untrustworthy if the hardware module reporting it has suffered a communication failure.
  2. Signal Status Trumps Process Values: If Mode.Byte3 == 16#80 (Hardware Healthy) but the field instrument reports PV_ST = 16#00 (Bad / Sensor Out of Limits), the block also asserts QBAD = 1 and marks PV_Out.ST = 16#00.
  3. Healthy Process State: Only when both Mode.Byte3 == 16#80 AND PV_ST == 16#80 does the block output QBAD = 0 and PV_Out.ST = 16#80 (Good).

Verification

Confirm the proper diagnostic evaluation between Mode and PV_ST:

  1. CFC Online Variable Inspection:
    * Open the channel driver block in CFC Test Mode.
    * Verify that when the loop is healthy:
    • Mode = 16#00800001 (or ending in 80)
    • PV_ST = 16#80
    • QBAD = 0
    • PV_Out.ST = 16#80
  2. Induced Wire-Break Test:
    * Disconnect the physical 4-20 mA field loop wire.
    * Observe Mode: Channel diagnostic driver asserts Mode.Byte3 = 16#00.
    * Confirm that QBAD transitions to 1 and downstream interlocks trip as expected.
  3. Reconnection Test:
    * Reconnect the wire; confirm that Mode.Byte3 returns to 16#80 and QBAD clears.

Limitations and Operational Precautions

  • Never Interconnect Mode to Fixed Constants: The Mode pin must always be generated by the PCS 7 driver generator linking to MOD blocks; connecting a static constant masks real hardware failures.
  • Simulation Mode (SimOn): Activating simulation (SimOn = 1) forces PV_Out.ST = 16#60 (Uncertain - Simulated) regardless of Mode or PV_ST input states.
  • NAMUR NE 43 Conformance: Ensure analog modules are configured in HW Config for NAMUR NE 43 live-zero monitoring (3.8 mA to 20.5 mA) to allow Mode diagnostics to detect open circuits.

Engineer FAQ

  • What is the fundamental difference between Mode and PV_ST?
    Mode represents the physical hardware health and measuring range from controller diagnostic blocks, whereas PV_ST represents process signal quality from the instrument.
  • Why does a channel driver report QBAD = 1 even though PV_ST is 16#80 (Good)?
    Because Mode Byte 3 is 16#00 (hardware channel fault or communication dropout), which safely overrides the static PV_ST value.
  • Which byte in the Mode parameter indicates channel validity?
    Byte 3 (the lowest byte in standard notation), where 16#80 indicates valid and 16#00 indicates invalid.
  • How is the Mode parameter connected in CFC?
    The PCS 7 driver generator automatically creates interconnections between system diagnostic blocks (MOD) and the channel driver's Mode pin during chart compilation.
  • What standard governs the structure of PV_ST?
    PV_ST conforms to NAMUR Recommendation NE 107 and the PROFIBUS PA Profile 3.02 quality code specification.
  • Can a damaged analog input card cause Mode to become invalid?
    Yes, an internal ADC failure, wire break, or missing auxiliary power triggers OB82, causing the MOD block to set Mode Byte 3 to 16#00.
  • Does PV_ST exist on standard analog inputs (Pcs7AnIn)?
    Yes, Pcs7AnIn evaluates both Mode and PV_ST, although on standard analog cards PV_ST is often set to 16#80 by default unless mapped to HART variables.
  • What quality code is propagated downstream when simulation is active?
    APL blocks propagate 16#60 (Uncertain - Simulated process value) when SimOn = 1.
  • What happens to downstream PID controllers if QBAD is asserted?
    Downstream PID blocks (PIDConL) typically switch to manual mode, hold their output, or shed to safety positions based on configured tracking settings.
  • How does the driver generator know which MOD block to connect to Mode?
    During compilation, the compiler parses the module hardware address configured in HW Config and matches it to the corresponding rack and slot diagnostic block.

Technical References

  • Siemens Industry Online Support (SIOS) Portal: Advanced Process Library (APL) - Signal Status and Quality Code Processing (Entry ID: 109760968).
  • NAMUR Recommendation NE 107: Self-Monitoring and Diagnosis of Field Devices.
  • PROFIBUS PA Profile for Process Control Devices (Version 3.02).

Related Articles

Related Tags

PCS 7, APL, Channel Drivers, Mode, PV_ST, NAMUR NE 107, Diagnostics, Quality Codes

20 respuestas