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
- The Critical Role of the Channel Block 'Mode' Parameter (16#80000203)
- Process Image Partitions (PIP) and Cyclic OB Synchronization
- Configuring Pcs7AnIn for Level Transmitters in Continuous Function Charts
- Comparison of Analog Signal Ranges and Hardware Mode Codes
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
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 Driversis executed during CFC compilation, the compiler automatically determines the correctModesetting from HW Config and injects it intoPcs7AnIn.Mode. - If module driver generation is bypassed or disabled, the engineer must manually enter
16#80000203at parameterMode; leaving it at16#00000000causesPcs7AnInto treat the channel as unconfigured, outputtingST = 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:
- Interconnect Peripheral Address:
* DragPcs7AnIninto the chart (placed in OB35).
* Interconnect inputPV_Into the peripheral word (e.g.,IW 512). - Configure Engineering Scaling (
Scale):
* SetScale.High := 100.0(% or meters).
* SetScale.Low := 0.0. - Interconnect to Technological Block:
* ConnectPcs7AnIn.Out(Struct) toMonAnL.PV(Struct).
* Compile CFC withGenerate Module Driverschecked.
Comparison of Analog Signal Ranges and Hardware Mode Codes
The table below outlines standard SIMATIC S7-300/400 analog measuring ranges and mode settings.
16#8000020316#8000020116#8000010316#8000040216#80000501Verification
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
- SIMATIC S7-300 Module Data System Manual
- Siemens Industry Online Support FAQ: Mode Settings for PCS 7 Channel Blocks
- SIMATIC Process Control System PCS 7 Advanced Process Library System Manual
Related Articles
- Why Classic Driver Blocks CH_AI and CH_DI Are Missing in PCS 7 V8.1 and How to Migrate to APL Channel Drivers
- How to Implement Module-Level and Channel-Level Diagnostics in SIMATIC PCS 7 APL
- Troubleshooting CFC Module Driver Generation Failures in PCS 7
Related Tags
- Analog Addressing
- Pcs7AnIn
- Mode Setting
- Process Image Partition
- Level Transmitter