How to Integrate Third-Party Field Hardware into SIMATIC PCS 7 Without Standard Module Drivers

How to Integrate Third-Party Field Hardware into SIMATIC PCS 7 Without Standard Module Drivers

To integrate third-party field devices (such as non-Siemens encoders, flowmeters, or specialized communication cards) into SIMATIC PCS 7 when no native PCS 7 module drivers exist, engineers must choose between application-level diagnostic programming or authoring custom module driver blocks. Because the PCS 7 Driver Generator (Generate Module Drivers) only processes Siemens-approved hardware catalog components, third-party I/O addresses placed in CFC will not automatically generate @ diagnostic charts. The recommended approach is to read input process values directly via standard channel blocks or peripheral I/O words (PIW), evaluate device health using system function blocks (SFC 51 RDSYSST, SFB 52 RDREC, or SFB 54 RALRM), and connect device health status to the channel block QUALITY or BAD pins to feed standard APL faceplate alarms.

Table of Contents

The Role of the PCS 7 Driver Generator in System Diagnostics

In SIMATIC PCS 7, the CFC compiler features a specialized compiler pass called Generate Module Drivers. When enabled, the driver wizard automatically scans the project's Hardware Configuration (HW Config) and all CFC charts:

  1. It identifies every channel driver block (such as Pcs7DiIn, Pcs7AnIn, FbAnIn) interconnected to peripheral input/output addresses.
  2. It generates system @ charts containing hierarchical diagnostic blocks (e.g., OB_BEGIN, OB_DIAG1, RACK, MOD_D1, MOD_HA).
  3. It interconnects the diagnostic outputs (MS, SubnTyp, RackNo, SlotNo) to the channel blocks to manage signal status, simulate modes, and trigger operator station alarms upon hardware failure.

For third-party hardware integrated via generic GSD/GSDML files without a Siemens Hardware Upgrade Package (HUP), the driver wizard does not recognize the module's diagnostic structure and issues compilation warnings, leaving the channel blocks without diagnostic connections.

Architectural Options for Third-Party Device Integration

Process engineers have three distinct integration strategies when connecting third-party hardware:

Strategy 1: Application-Level Direct Addressing (Most Common)

Read the third-party device's I/O data directly into CFC using standard APL channel blocks (Pcs7AnIn, Pcs7DiIn) or elementary data access blocks. Plausibility checks (rate-of-change, range monitoring, sensor watchdog counters) are programmed in SCL or CFC to validate signal health without requiring deep hardware diagnostic blocks.

Strategy 2: System Diagnostic Interrogation via SFCs/SFBs

Query the PROFIBUS-DP / PROFINET station health directly using system functions:
* SFC 51 (RDSYSST): Queries the System Status List (SSL) to determine whether the remote slave is present, active, and communicating without bus faults.
* SFB 52 (RDREC): Performs acyclic reading of diagnostic data records (e.g., standard DP-V1 diagnostic record DS16 or vendor-specific diagnostic blocks).
* SFB 54 (RALRM): Catches hardware interrupts and diagnostic alarms generated by the field device.

The resulting status bit is fed into the BAD or QUALITY input of the APL channel block, forcing the signal to invalid status (16#00 or 16#28) upon device failure.

Strategy 3: Authoring Custom Driver Blocks for the Driver Wizard

Author dedicated SCL driver blocks accompanied by XML description files defining how the driver wizard should instantiate and interconnect the block in @ charts. This approach follows the Siemens manual Process Control System PCS 7 - Programming Instructions Driver Blocks (Order No. 6ES7653-1XD16-8YX8).

Implementing Application-Level Diagnostics via SFC 51 and RDREC

To build a robust diagnostic wrapper in SCL for a third-party encoder or transmitter:

  1. Create a custom Function Block FB_3rdParty_Diag.
  2. In the cyclic OB (e.g., OB35), call SFC 51 (RDSYSST) with SZL_ID := 16#0094 (Rack or module status) or 16#0292 (Distributed I/O station status) and the logical diagnostic base address of the third-party slave.
  3. If the slave reports a communication loss or diagnostic interrupt, assert an internal boolean flag Device_Fault.
  4. In the CFC chart, place the third-party channel block (e.g., Pcs7AnIn) and connect Device_Fault directly to the Bad input or manipulate Quality (ST).
  5. This ensures that any downstream APL control blocks (e.g., PIDConL, MotL) detect the signal degradation immediately, initiate safety interlocks, and display maintenance alarms on the WinCC operator station.

Authoring Custom Driver Wizard Blocks and Metadata Files

For projects requiring full native integration where diagnostic blocks must be automatically placed into @ charts during CFC compilation:

  1. Develop the Diagnostic Block: Write an SCL function block that interfaces with standard PCS 7 higher-level diagnostic blocks (RACK, SUBNET). The block must implement standard driver block parameters (MODE, MS, LNK_MOD, EN_DIAG).
  2. Define XML Configuration: Author the XML metadata file specifying:
    * The hardware ID (Vendor ID, Device ID from GSD).
    * The target @ chart name and execution group.
    * Parameter interconnection rules between the diagnostic block and channel drivers.
  3. Register the Driver Package: Place the compiled blocks into a custom library and configure the PCS 7 Driver Generator rules.
    Because custom driver block development requires specialized Siemens development licenses and in-depth knowledge of driver generator internals, Siemens Customer Support also offers driver authoring as an engineering service.

Device Integration and Diagnostic Comparison Matrix

The following table compares the three primary methods for integrating third-party devices in PCS 7:

Integration ApproachImplementation ComplexityDriver Wizard SupportDiagnostic GranularityMaintenance EffortDirect I/O PlausibilityLow (hours)None (bypassed)Basic (signal out of range, frozen value)Low; easily modified in standard CFCSFC 51 / RDREC WrapperMedium (1–2 days)Semi-automated (manual CFC links)High (bus status, module fault, channel breakdown)Medium; transparent SCL logicCustom Driver Wizard BlockHigh (weeks)Fully automated in @ chartsComplete native PCS 7 diagnostic integrationHigh; requires library maintenance across PCS 7 versions

Always validate software entitlements and driver compatibility before deploying custom diagnostic structures in production systems.

Verification

To verify that a third-party device is reliably integrated into PCS 7:
1. In HW Config, verify that the third-party slave displays 'Online: Normal' with no bus communication errors.
2. In CFC, test simulated hardware disconnection (e.g., unseat fieldbus cable from third-party instrument).
3. Confirm that the diagnostic logic (SFC 51 output or custom wrapper) detects the failure within one OB cycle.
4. Verify that the associated APL channel block asserts Bad = TRUE and that the downstream process block switches to fallback mode.
5. Confirm that the WinCC faceplate updates with an invalid signal icon and triggers an operator maintenance message.

Limitations and Operational Precautions

  • Do not disable 'Generate Module Drivers' globally during CFC compilation, as this suppresses critical diagnostic blocks for standard Siemens I/O.
  • Using non-approved STEP 7 Hardware Support Packages (HSPs) inside PCS 7 can corrupt the HW Config database; only use officially released HUPs.
  • Direct peripheral addressing (PIW) bypasses process image updates; ensure process image partitions (PIP) are properly configured if using standard %IW addresses in cyclic OBs.
  • Custom driver blocks developed for older PCS 7 releases (e.g., V6.1) must be recompiled and tested before migration to newer releases (V8.x or V9.x).

Engineer FAQ

Why does CFC compiler throw warnings about missing module drivers for my 3rd party device?

CFC issues warnings when it detects I/O addresses belonging to hardware modules that lack native PCS 7 driver descriptor rules. The warnings indicate that @ diagnostic charts will not be generated automatically.

Can I connect raw peripheral words (PIW) directly to APL channel blocks?

Yes. Blocks like Pcs7AnIn and Pcs7DiIn can read directly from peripheral addresses, but you must manually configure device fault detection via the Bad or SimOn inputs.

Where can I find the official Siemens guide for developing custom driver blocks?

The guide is titled 'Process Control System PCS 7 - Programming Instructions Driver Blocks' (Order No. 6ES7653-1XD16-8YX8) and is available through Siemens technical support channels.

Technical References

Related Articles

Related Tags

  • Custom Module Drivers
  • Driver Wizard
  • SFC 51 RDSYSST
  • Third-Party Integration
  • APL Channel Blocks
6 respuestas