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
- The Role of Pcs7Cnt1 and Driver Interconnection Requirements
- Why the CFC Driver Generator Leaves FM_DATA Unconnected
- UDT1 Structure and Parameter Data Block Generation
- FM Counter Module Driver Configuration Matrix
- Step-by-Step Procedure to Resolve the FM_DATA Compilation Error
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
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_DATAexpects 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_DATAunconnected. 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:
UDT1contains 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 toUDT1satisfies the structural pointer requirement ofPcs7Cnt1.FM_DATA.
FM Counter Module Driver Configuration Matrix
The following table compares driver blocks and parameter requirements across Siemens counter modules in PCS 7:
Pcs7Cnt1 (FB840)FM_DATA)CNT_CTL / FM_CNTFM_DATA_8CH)CountOh / APL DriverPcs7DiInStep-by-Step Procedure to Resolve the FM_DATA Compilation Error
Method: Generating UDT1 Data Block and Interconnecting in CFC
- Open SIMATIC Manager on the Engineering Station.
- Open the FM 350 setup library (File > Open > Libraries > FM 350-1 Counter).
- Locate
UDT1in the library'sBlocksfolder and copy it into your target CPU's S7 Program > Blocks folder. - In your project's Blocks folder, select Insert > S7 Block > Data Block.
- Open the DB properties, name the block (e.g.
DB350), and under Type, select UDT1. - In the Symbol Table, assign the symbolic name
FM_DATA_DBtoDB350. - Open the CFC chart containing
Pcs7Cnt1. - Locate input pin
FM_DATA. - In the CFC block catalog, switch to the Blocks tab, locate
DB350(FM_DATA_DB), and drag it directly onto theFM_DATApin. - Execute Chart > Compile > Changes Only.
- Confirm that compilation completes with 0 Errors.
Verification
To verify that the FM 350-1 driver compiles and operates cleanly:
- Compilation Cleanliness: Confirm that the CFC compile log finishes with 0 errors and zero unlinked parameter warnings.
- Online Status Check: Switch CFC to Test Mode. Confirm that parameter
RETVALonPcs7Cnt1evaluates to0(communication healthy). - Pulse Validation: Rotate the connected encoder. Confirm that
ACT_CNTVupdates 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
UDT1Data Block; never link multiplePcs7Cnt1blocks to the same data block. - Do Not Delete UDT1: Deleting
UDT1from the offline block folder invalidates the DB structure and breaks CFC compilation. - HW Config Address Consistency: Ensure the logical address entered on parameter
LADDRexactly 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
- Siemens AG: SIMATIC S7-300 FM 350-1 Counter Module Manual (Doc No. A5E00057788)
- Siemens AG: Configuring the SIMATIC FM 350-2 Counter Module in SIMATIC PCS 7 (Doc No. A5E03419561)
- Siemens AG: SIMATIC Process Control System PCS 7 Basis Library Manual (Doc No. A5E03415129)
Related Articles
- https://industrialautomation.net/search?query=pcs7+fm_data+compilation+error+fm350-1+fix
- https://industrialautomation.net/search?query=pcs7cnt1+udt1+data+block+creation+procedure
- https://industrialautomation.net/search?query=fm350-1+cfc+driver+generator+laddr+configuration
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