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
- Deep-Dive into the Mode Parameter Structure
- Deep-Dive into the PV_ST Quality Code Structure
- Precedence and Conflict Resolution in Channel Drivers
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
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 theModestructure 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_STis 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:
- Hardware Fault Trumps Signal Status: If
Mode.Byte3 == 16#00(Hardware Invalid), the block forces:
*QBAD = 1
*Bad.Value = 1
* Technological output quality codePV_Out.ST = 16#00(Bad)
This occurs even ifPV_STat the input pin reports16#80. The rationale: a static16#80input byte is untrustworthy if the hardware module reporting it has suffered a communication failure. - Signal Status Trumps Process Values: If
Mode.Byte3 == 16#80(Hardware Healthy) but the field instrument reportsPV_ST = 16#00(Bad / Sensor Out of Limits), the block also assertsQBAD = 1and marksPV_Out.ST = 16#00. - Healthy Process State: Only when both
Mode.Byte3 == 16#80ANDPV_ST == 16#80does the block outputQBAD = 0andPV_Out.ST = 16#80(Good).
Verification
Confirm the proper diagnostic evaluation between Mode and PV_ST:
- 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 in80)PV_ST=16#80QBAD=0PV_Out.ST=16#80
- Induced Wire-Break Test:
* Disconnect the physical 4-20 mA field loop wire.
* ObserveMode: Channel diagnostic driver assertsMode.Byte3 = 16#00.
* Confirm thatQBADtransitions to1and downstream interlocks trip as expected. - Reconnection Test:
* Reconnect the wire; confirm thatMode.Byte3returns to16#80andQBADclears.
Limitations and Operational Precautions
- Never Interconnect Mode to Fixed Constants: The
Modepin must always be generated by the PCS 7 driver generator linking toMODblocks; connecting a static constant masks real hardware failures. - Simulation Mode (
SimOn): Activating simulation (SimOn = 1) forcesPV_Out.ST = 16#60(Uncertain - Simulated) regardless ofModeorPV_STinput 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
Modediagnostics 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 propagate16#60(Uncertain - Simulated process value) whenSimOn = 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
- Interpreting FbAnIn Mode Byte 16#1 and Discrepancies with PV_ST in SIMATIC PCS 7 APL
- Diagnosing PCS 7 System Alarms for Module Errors and Asynchronous PLC Faults on S7-400 Controllers
Related Tags
PCS 7, APL, Channel Drivers, Mode, PV_ST, NAMUR NE 107, Diagnostics, Quality Codes