How to Configure Hardware Addressing, Mode Settings, and Process Image Partitions for Analog Transmitters in PCS 7

How to Configure Hardware Addressing, Mode Settings, and Process Image Partitions for Analog Transmitters in PCS 7

In SIMATIC PCS 7, analog transmitters (such as level, pressure, or temperature sensors) must strictly be addressed as 16-bit Input Words (IW or PIW) in STEP 7 HW Config, rather than Input Bytes (IB), because standard analog-to-digital converter (ADC) modules deliver 16-bit signed integer counts (typically 0 to 27648 for 4-20 mA). To resolve 'Bad Process Value' errors on channel blocks like Pcs7AnIn, engineers must: (1) assign the transmitter address to an Input Word (e.g., IW 512), (2) configure the correct hardware operating 'Mode' setting (e.g., 16#80000203 for standard 4-20 mA current inputs), and (3) assign the I/O address to the matching Process Image Partition (PIP) corresponding to the cyclic interrupt OB executing the chart.

Table of Contents

Analog Data Representation in SIMATIC Controllers: Bytes vs Words

A common conceptual error when commissioning analog instruments in PCS 7:
* The Single-Byte Fallacy: An engineer assumes a digital level signal or normalized 0-100% reading can be read as a single byte (IB).
* The Controller Reality:
* Analog modules (such as SM 331 8x12Bit or AI 8xI 2-/4-wire BA) deliver digitized signals across 16 bits (one Word / two bytes).
* In the SIMATIC S7 integer format, standard measuring ranges span from 0 to 27648 (representing 4 to 20 mA or 0 to 10 V).
* Overshoot ranges extend up to 32511, while negative undershoot extends down to -4864 (Namur NE43 wire break detection).
* An analog input must always be declared as an Input Word (IW) or Peripheral Input Word (PIW); attempting to read a single byte truncates high-order resolution and corrupts the measurement.

The Critical Role of the Channel Block 'Mode' Parameter (16#80000203)

In the APL analog channel block Pcs7AnIn (FB1869):

  • What Is Parameter Mode?: A 32-bit DWORD that informs the channel driver how the physical ADC module is configured in HW Config.
  • Standard 4-20 mA Mode Code:
  • For standard 2-wire / 4-wire current transmitters (4-20 mA), the standard mode setting is: 16#80000203.
  • Automated vs Manual Mode Configuration:
  • If Generate Module Drivers is executed during CFC compilation, the compiler automatically determines the correct Mode setting from HW Config and injects it into Pcs7AnIn.Mode.
  • If module driver generation is bypassed or disabled, the engineer must manually enter 16#80000203 at parameter Mode; leaving it at 16#00000000 causes Pcs7AnIn to treat the channel as unconfigured, outputting ST = 16#00 (Bad Quality).

Process Image Partitions (PIP) and Cyclic OB Synchronization

In large PCS 7 automation stations, I/O updates are synchronized using Process Image Partitions (PIP):

  • The Problem with Asynchronous Peripheral Access (PIW): Directly reading peripheral addresses introduces jitter and inconsistent multi-word reads across fast cycles.
  • The PIP Solution:
  • PCS 7 assigns specific I/O modules to Process Image Partitions tied to cyclic Organization Blocks.
  • PIP 1: Typically updated at the start of OB35 (100 ms).
  • PIP 2: Updated at the start of OB34 (200 ms).
  • PIP 3: Updated at the start of OB32 (1000 ms).
  • HW Config Assignment: In HW Config, double-click the analog input module: open the Addresses tab. Under Process Image, select the PIP matching the OB where the CFC chart executes.

Configuring Pcs7AnIn for Level Transmitters in Continuous Function Charts

To configure a level transmitter in CFC:

  1. Interconnect Peripheral Address:
    * Drag Pcs7AnIn into the chart (placed in OB35).
    * Interconnect input PV_In to the peripheral word (e.g., IW 512).
  2. Configure Engineering Scaling (Scale):
    * Set Scale.High := 100.0 (% or meters).
    * Set Scale.Low := 0.0.
  3. Interconnect to Technological Block:
    * Connect Pcs7AnIn.Out (Struct) to MonAnL.PV (Struct).
    * Compile CFC with Generate Module Drivers checked.

Comparison of Analog Signal Ranges and Hardware Mode Codes

The table below outlines standard SIMATIC S7-300/400 analog measuring ranges and mode settings.

Sensor Measurement TypePhysical RangeS7 Integer CountStandard Mode CodeNamur NE43 Wire Break LimitCurrent (2-Wire / 4-Wire)4 to 20 mA0 to 2764816#80000203< 3.6 mA (-1185 counts)Current (Unipolar)0 to 20 mA0 to 2764816#80000201N/A (0 mA is valid zero)Voltage (Bipolar)-10 V to +10 V-27648 to +2764816#80000103N/AResistance Thermometer (RTD)Pt100 Standard-2000 to +8500 (0.1 deg C)16#80000402Open circuit (> 32767)Thermocouple (TC)Type K-2700 to +1372016#80000501Break (> 32767)

Verification

To confirm that analog transmitter addressing and mode settings are operational:
1. In HW Config, verify that the analog module's start address is set to an Input Word (e.g., 512 -> IW 512) and assigned to PIP 1.
2. Compile CFC with Generate Module Drivers: confirm module drivers compile without errors.
3. In CFC Test Mode, inspect Pcs7AnIn:
* Confirm parameter Mode displays 16#80000203.
* Confirm Out.Value displays the scaled level measurement (e.g., 50.0%).
* Confirm Out.ST displays 16#80 (Good Quality).
4. Simulate field current variations using a 4-20 mA calibrator: verify that 4 mA yields 0.0%, 12 mA yields 50.0%, and 20 mA yields 100.0% without jitter.

Limitations and Operational Precautions

  • Never declare an analog module input as an Input Byte (IB); doing so truncates resolution and causes erratic level calculations in downstream PID and safety interlocks.
  • Ensure 2-wire vs 4-wire range jumpers on the physical module side-caddy match the setting configured in HW Config; improper jumper placement can burn out internal shunt resistors.
  • If modifying Process Image Partitions, always verify that the host cyclic interrupt OB is active and running in the S7-400 CPU.
  • Always validate final hardware modules, signal conditioners, and software licensing against the applicable Siemens catalog and authorized distributor quotation.

Engineer FAQ

Why did my level transmitter give a 'Bad' process value in CFC?

The channel block was addressed as an Input Byte instead of a Word, the Mode parameter was left at zero, or module drivers were not generated following a hardware address change.

What is the purpose of Process Image Partitions (PIP)?

PIPs ensure that I/O modules are read and updated in direct synchronization with specific cyclic interrupt Organization Blocks (e.g., OB35), preventing data tearing and jitter.

Can I enter scale limits directly on Pcs7AnIn?

Yes. Parameters Scale.High and Scale.Low define the physical engineering unit range (e.g., 0.0 to 10.0 meters) mapped to the 4-20 mA (0 to 27648) integer count.

Technical References

Related Articles

Related Tags

  • Analog Addressing
  • Pcs7AnIn
  • Mode Setting
  • Process Image Partition
  • Level Transmitter
6 respuestas