Configuring FM 350-1 Counter Modules with Pcs7Cnt1 and Resolving FM_DATA Interconnection Errors in PCS 7

Configuring FM 350-1 Counter Modules with Pcs7Cnt1 and Resolving FM_DATA Interconnection Errors in PCS 7

When configuring an FM 350-1 counter module with channel driver Pcs7Cnt1 in SIMATIC PCS 7 and CFC compilation fails with 'cfc(1).1.FM_DATA is not interconnected with a data source', the error occurs because Pcs7Cnt1 does not automatically generate the complex parameter database required for function modules. While standard analog/digital drivers auto-generate instance data, FM counter modules require an external global data block structured according to UDT1 (from the FM 350 setup library). To resolve it, create a new DB in the CPU block folder based on UDT1, name it DB_FM_DATA, interconnect this DB directly to the FM_DATA block pin of Pcs7Cnt1, and recompile CFC charts.

Table of Contents

Executive Summary

Integrating specialized intelligent function modules into SIMATIC PCS 7 requires bridging standard hardware configuration with the automated module driver architecture (Generate Module Drivers). For pulse counting, incremental encoder tracking, and velocity measurement, the single-channel FM 350-1 counter module (6ES7350-1AH03-0AE0) utilizes channel driver block Pcs7Cnt1 (FB840) from the PCS 7 Basis Library. When engineers insert Pcs7Cnt1 into a Continuous Function Chart (CFC) and connect its Connect pin to the hardware channel address in HW Config, initial compilation appears poised to succeed. However, the compiler halts abruptly with the critical error: 'cfc(1).1.FM_DATA is not interconnected with a data source'. Understanding the relationship between Pcs7Cnt1 and the underlying FM_DATA UDT structure provides the clean resolution.

The Role of Pcs7Cnt1 and Driver Interconnection Requirements

Pcs7Cnt1 acts as the standardized PCS 7 technological driver for FM 350-1 modules:

  • Converts raw hardware counter telegrams into normalized process values (ACT_CNTV).
  • Handles cyclic control words (start count, stop count, software gate, preset load).
  • Interfaces with APL monitoring blocks (such as MonAnL) and generates diagnostic alarms upon sensor wire-break or power loss.

Why the CFC Driver Generator Leaves FM_DATA Unconnected

In standard digital and analog I/O (e.g. SM 321 or SM 331), the CFC driver generator creates and wires diagnostic blocks (MOD_D1, MOD_HA) automatically:

  • Function Modules (FM) operate with complex multi-parameter data records that require dedicated working memory.
  • Siemens designed the driver so that parameter FM_DATA expects a pointer to an external global Data Block structured according to the module's User-Defined Data Type (UDT1).
  • Because the driver generator does not know which DB number the user prefers, it leaves FM_DATA unconnected. An unconnected data structure pointer causes the CFC semantic compiler to reject the program.

UDT1 Structure and Parameter Data Block Generation

The FM 350-1 installation package provides UDT1:

  • UDT1 contains all operational control, status, comparator limit, and diagnostic variables required for communication via system functions SFC58/SFC59 (WR_REC / RD_REC).
  • Instantiating a Data Block (e.g. DB350) typed to UDT1 satisfies the structural pointer requirement of Pcs7Cnt1.FM_DATA.

FM Counter Module Driver Configuration Matrix

The following table compares driver blocks and parameter requirements across Siemens counter modules in PCS 7:

Counter ModuleChannelsRecommended Driver BlockRequired Structural UDTAuto-Connected by Driver Wizard?FM 350-11 Channel (500 kHz)Pcs7Cnt1 (FB840)UDT1 (FM_DATA)No (Manual DB Link Required)FM 350-28 Channels (20 kHz)CNT_CTL / FM_CNTUDT1 (FM_DATA_8CH)No (Manual DB Link Required)ET 200SP TM Count1 Channel (High Speed)CountOh / APL DriverStandard Process ImageYes (Automatic APL Generation)Standard DI CardStandard DigitalsPcs7DiInNone (Direct Addressing)Yes (Automatic Driver Generation)

Step-by-Step Procedure to Resolve the FM_DATA Compilation Error

Method: Generating UDT1 Data Block and Interconnecting in CFC

  1. Open SIMATIC Manager on the Engineering Station.
  2. Open the FM 350 setup library (File > Open > Libraries > FM 350-1 Counter).
  3. Locate UDT1 in the library's Blocks folder and copy it into your target CPU's S7 Program > Blocks folder.
  4. In your project's Blocks folder, select Insert > S7 Block > Data Block.
  5. Open the DB properties, name the block (e.g. DB350), and under Type, select UDT1.
  6. In the Symbol Table, assign the symbolic name FM_DATA_DB to DB350.
  7. Open the CFC chart containing Pcs7Cnt1.
  8. Locate input pin FM_DATA.
  9. In the CFC block catalog, switch to the Blocks tab, locate DB350 (FM_DATA_DB), and drag it directly onto the FM_DATA pin.
  10. Execute Chart > Compile > Changes Only.
  11. Confirm that compilation completes with 0 Errors.

Verification

To verify that the FM 350-1 driver compiles and operates cleanly:

  1. Compilation Cleanliness: Confirm that the CFC compile log finishes with 0 errors and zero unlinked parameter warnings.
  2. Online Status Check: Switch CFC to Test Mode. Confirm that parameter RETVAL on Pcs7Cnt1 evaluates to 0 (communication healthy).
  3. Pulse Validation: Rotate the connected encoder. Confirm that ACT_CNTV updates smoothly in real time without communication faults.

Limitations and Operational Precautions

  • Dedicated DB per Module: Each physical FM 350-1 module requires its own independent UDT1 Data Block; never link multiple Pcs7Cnt1 blocks to the same data block.
  • Do Not Delete UDT1: Deleting UDT1 from the offline block folder invalidates the DB structure and breaks CFC compilation.
  • HW Config Address Consistency: Ensure the logical address entered on parameter LADDR exactly matches the hardware start address assigned in HW Config.

Engineer FAQ

Can Pcs7Cnt1 automatically generate DB350?

No. The user must create the global DB typed to UDT1 in the block folder; CFC cannot instantiate user-defined types automatically.

Does Pcs7Cnt1 support frequency measurement as well as pulse counting?

Yes, depending on module mode configuration in HW Config, Pcs7Cnt1 handles count values, frequency, or rotational velocity.

What happens if FM_DATA points to a DB that is not based on UDT1?

CFC compilation will fail with a data type conflict error, indicating that the interconnected block structure does not match the formal parameter.

Technical References

Related Articles

Related Tags

  • https://industrialautomation.net/search?query=simatic-pcs7
  • https://industrialautomation.net/search?query=fm350-1
  • https://industrialautomation.net/search?query=cfc-editor
  • https://industrialautomation.net/search?query=hardware
6 respuestas