How to Interface Absolute and Incremental Encoders in SIMATIC PCS 7
In SIMATIC PCS 7, interfacing incremental and absolute encoders for high-speed counting, speed measurement, or shaft angle positioning is accomplished using certified hardware modules and fieldbus profiles. Incremental encoders (24V HTL or RS422 TTL) are interfaced using the certified FM 350-2 Counter Module (6ES7350-2AH01-0AE0) paired with the official PCS 7 Basis Library block package CNT_CTL. Absolute encoders measuring angular shaft positions are integrated via SSI counter modules (e.g., ET 200M 1SSI 6ES7138-4DB03-0AB0) or connected directly to PROFIBUS-DP / PROFINET (such as PVM58/PVM14 encoders) using standard Encoder Profile GSD files. Non-released modules like FM 351 must be avoided.
Table of Contents
- Encoder Types and High-Speed Processing in PCS 7
- Incremental Encoders: FM 350-2 Counter Module Integration
- Absolute Encoders: PROFIBUS-DP and SSI Module Integration
- Encoder Hardware and Software Interface Reference Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Encoder Types and High-Speed Processing in PCS 7
In process automation applications such as centrifuge speed tracking, conveyor positioning, valve stroke angle detection, and agitator rotation monitoring, engineers frequently need to integrate rotary optical or magnetic encoders.
Due to the cyclic interrupt execution of continuous controllers (where OB35 typically runs at 100 ms to 1000 ms), high-frequency encoder pulse trains (e.g., 10 kHz to 500 kHz) cannot be captured using standard digital input modules.
Encoders fall into two fundamental technological categories:
1. Incremental Encoders: Output quadrature square-wave pulse trains (Channels A, B, and zero pulse Z) representing relative displacement and rotational velocity.
2. Absolute Encoders: Output a discrete, unique multi-bit digital code (Gray code or natural binary) representing absolute physical shaft angle (single-turn 0-360°) and number of rotations (multi-turn), retaining position even after a power shutdown.
Incremental Encoders: FM 350-2 Counter Module Integration
For incremental pulse processing, Siemens provides the officially certified FM 350-2 Counter Module (MLFB 6ES7350-2AH01-0AE0), installed in an S7-400 central rack or distributed ET 200M station:
Integration Architecture
- Hardware Sizing: The FM 350-2 provides 8 independent 24V / RS422 counter channels capable of counting frequencies up to 20 kHz (or 500 kHz with RS422).
- PCS 7 Library Block (
CNT_CTL/FM_CNT): Siemens provides an official PCS 7 Function Block package (FB_FM350_2/CNT_CTL) integrated into the PCS 7 Basis Library. - Operating Modes: The module is parameterized in HW Config for continuous counting, periodic counting, frequency measurement, or speed calculation.
- CFC Interconnection: The block cyclically reads peripheral I/O words (
PIW), manages control commands (Gate,Set Counter), and exposes measured pulses, frequency, and rotational velocity directly to technological charts.
Absolute Encoders: PROFIBUS-DP and SSI Module Integration
When measuring exact shaft angles (e.g., determining shaft turn angle in degrees without homing cycles), absolute encoders are implemented via two supported paths:
Method 1: Fieldbus-Connected Absolute Encoders (PROFIBUS-DP / PROFINET)
Industrial absolute encoders (e.g., Pepperl+Fuchs PVM58, PVM14, or Siemens SIMODRIVE sensor):
1. Fieldbus Connection: The encoder connects directly to the PROFIBUS-DP or PROFINET network as a standard slave/device using its vendor GSD/GSDML file.
2. Standard Encoder Profile: Devices comply with the PROFIBUS DP Encoder Profile 3.062 (Class 1 or Class 2).
3. Data Telemetry: The encoder cyclically sends a 32-bit double word into the AS input peripheral space (PID):
* Bits 0-11 (or 0-12): Single-turn resolution (e.g., 4096 steps = 0.088° per step).
* Bits 12-28: Multi-turn revolution count.
4. CFC Mathematical Processing: A custom SCL block or standard mathematical block converts raw counts to engineering units:
Angle_Degrees = (Raw_SingleTurn_Count / Total_Steps_Per_Rev) * 360.0;
Method 2: Synchronous Serial Interface (SSI) via ET 200M / ET 200SP
For encoders with hardwired point-to-point SSI interfaces:
* Use the ET 200M 1SSI Module (MLFB 6ES7138-4DB03-0AB0) or ET 200SP TM PosInput 1.
* The module handles the high-speed SSI clock burst, converts Gray code to binary, and maps the absolute angle value into standard peripheral words.
Encoder Hardware and Software Interface Reference Matrix
The following table outlines the supported hardware interfaces and software blocks for encoders in SIMATIC PCS 7:
6ES7350-2AH01-0AE0)CNT_CTL / FM_CNT6ES7138-4DB03-0AB0)Always verify module order numbers against the PCS 7 Released Modules manual before procurement.
Verification
To verify encoder operation and angle accuracy in PCS 7:
1. In HW Config, confirm that the encoder module or DP slave is parameterized and online with zero bus faults (BF LED off).
2. Open the CFC chart containing the encoder driver block or mathematical scaling logic in Test Mode.
3. Physically rotate the equipment shaft by exactly 90 degrees, 180 degrees, and 360 degrees.
4. Verify that:
* The calculated shaft angle tracks smoothly without count skipping or sign inversion.
* Completing one full rotation increments the multi-turn counter by exactly 1 and rolls the angle back to 0.0 degrees.
5. In WinCC Runtime, verify that the process graphic or analog gauge displays the shaft orientation in real time.
Limitations and Operational Precautions
- Avoid Unreleased Modules: Do not attempt to use the FM 351 positioning module in PCS 7; it is designed for Step 7 machine positioning and lacks PCS 7 Driver Wizard and APL support.
- Absolute encoder Gray code decoding must match the sensor configuration; failing to enable Gray code conversion in the SSI module results in erratic, non-linear position readings.
- Ensure encoder cable shielding complies with strict EMC guidelines: ground 360 degrees at the cabinet entry gland to prevent electrical noise from corrupting pulse trains.
- Validate final hardware selections against the Siemens catalog and consult an authorized distributor for official quotation.
Engineer FAQ
Why is the FM 351 module not recommended for PCS 7?
The FM 351 is a machine-tool positioning module designed for Step 7 machine control. It has never been tested or released for PCS 7, meaning the Driver Wizard cannot generate diagnostic blocks or faceplates for it.
How do I calculate shaft turn angle from a 12-bit single-turn absolute encoder?
A 12-bit encoder outputs 4096 steps per revolution (0 to 4095). In CFC or SCL, calculate angle as: Angle_Deg := (DINT_TO_REAL(Raw_Value AND 16#0FFF) / 4096.0) * 360.0.
Can the FM 350-2 module be installed in an ET 200M distributed station?
Yes. The FM 350-2 is fully supported in distributed ET 200M stations communicating with the S7-400 or CPU 410-5H over PROFIBUS-DP or PROFINET.
Technical References
- SIMATIC S7-300 FM 350-2 Counter Module Manual
- SIMATIC PCS 7 Released Modules Manual (V8.1/V8.2)
- PROFIBUS-DP Technical Profile for Absolute Value Encoders (Profile 3.062)
Related Articles
- How to Implement a 10-Minute Maximum Value Peak Tracker in SCL for SIMATIC PCS 7
- How to Configure Controller and I/O Hardware Diagnostics on the WinCC OS in PCS 7
- Configuring CP 443-1 Firmware Versions and Handling Firmware Mismatches in Redundant PCS 7 Systems
Related Tags
- FM350_2
- Absolute_Encoder
- Incremental_Encoder
- SSI_Interface
- Released_Modules