Problem Description
When compiling a TIA Portal project that integrates a SIWAREX CF force/weighing module using a Siemens sample project, the compiler reports the diagnostic:
The block can only be compiled with a valid password.
This error appears in the TIA Portal compile log (Project tree > Information > Compile) and prevents the project from being downloaded to the S7 CPU. Users have reported that the fault persists after explicitly setting the WRREC (Write Record) instruction to V1.0, and also after switching to V1.1. The issue affects the standard sample program shipped with the SIWAREX CF function manual, and it is one of the most common integration errors reported against SIWAREX CF Device Manual (Edition 12).
SIWAREX CF Module Identification
Before applying the fix, confirm you are working with the correct module variant. The SIWAREX CF is the force-measurement module in the SIWAREX family and must not be confused with the weighing variants CS, MS, FTA, FTC, M, U, WP321, or DB.
| Parameter | SIWAREX CF Specification |
|---|---|
| Article number (MLFB) | 7MH4920-0AA01 (CF) / 7MH4920-0AA11 (CF with calibration capability) |
| Host system | SIMATIC ET 200S distributed I/O |
| Function | Static force measurement with load cells / force sensors (full-bridge, ≤ 4 mV/V) |
| Resolution | 16-bit signed (DR 3, DR 4) |
| Bus interface | PROFIBUS DP or PROFINET (via ET 200S head module) |
| Cycle time | 10 ms (DR 1, bit 1 – measurement cycle) |
| Calibration-relevant (legal-for-trade) | Optional, depends on variant |
| Sample project blocks | FB "SIWA_CF", DB instance, OB1 wiring; does not use FB42 |
Root Cause Analysis
The "valid password required" message is generated by the TIA Portal compiler when an instance of a know-how-protected block is referenced but the project does not contain the corresponding unprotected source. With the SIWAREX sample projects there are two distinct root causes, both of which are easy to misdiagnose:
- Wrong WRREC version selected. The SIWAREX sample project references a specific revision of the SFB/FB WRREC. If TIA Portal's "Extended instructions > Distributed I/O > DP & PROFINET > WRREC" is set to a version that does not match the project, the compiler cannot resolve the interface and reports the password error against the calling block (the SIWAREX FB).
- Wrong sample project loaded. The CS (weighing) and CF (force) sample projects share similar file names and folder structures. If the CS sample is imported but the CF module is configured in the device view, the FB42 used by the CS sample (a know-how-protected block from the SIWAREX CS library) is referenced from the project but not present, producing the same error. The CF sample uses a different FB and does not require FB42 at all.
The user's report — "I tried compile with V1.0 and V1.1 but I have still error" — is consistent with root cause #2, because changing the WRREC version does not resolve the missing FB42 reference. The reply "You don't need FB42 if you are working with CF" confirms the diagnosis.
Affected Products, Firmware, and TIA Portal Versions
| Component | Versions Known to Reproduce the Error |
|---|---|
| SIWAREX CF firmware | FW V1.0.x, V1.1.x (PROFIBUS) and PROFINET equivalent |
| TIA Portal | V13 SP1, V14 SP1, V15, V15.1, V16, V17, V18 (the version mismatch shifts as TIA Portal evolves) |
| SIWAREX CF sample project | Edition 12 manual, attached S7-PCT / TIA archive (file extension *.zap* or *.ap13+) |
| WRREC instruction | V1.0, V1.1, V2.0, V3.0 (depending on TIA Portal version) |
| Step 7 classic project | STEP 7 V5.5 + SPx with optional HSP for SIWAREX CF |
Prerequisites for the Fix
- TIA Portal installed, with the matching Hotfix set (HSP for ET 200S modules if not yet integrated).
- SIWAREX CF sample project downloaded from the official support entry — do not rely on copies from third parties.
- Project open, with the user logged in as the project owner (read-only cannot change block versions).
- Online support account for escalation: Siemens Industry Online Support — Support Request.
Step-by-Step Resolution
Step 1 — Verify the module type in the device view
- Open the TIA Portal project and switch to the Project view.
- Open the device configuration of the ET 200S station.
- Locate the SIWAREX module in slot 4–6 (typical placement) and read the article number in the Inspector > "Properties > General".
- Confirm the article is 7MH4920-0AA0x (CF). If it shows 7MH4920-0AB0x (CS) you are using the wrong module — swap it before continuing.
Step 2 — Use the CF sample project, not CS
Open the sample ZIP delivered with the SIWAREX CF manual. The folder layout distinguishes the variants:
-
SIWAREX_CF_TIA_Portal_Vxx.zip→ contains the CF sample (target FB: SIWA_CF). -
SIWAREX_CS_TIA_Portal_Vxx.zip→ contains the CS sample (target FB: SIWA_CS, uses FB42).
Extract only the CF archive to a working directory, then in TIA Portal choose Project > Retrieve > Browse and select the matching TIA archive. Do not mix CF and CS blocks in the same project — their data record numbers and command codes differ.
Step 3 — Remove the residual FB42 reference (if present)
- In the project tree, search for
FB42using the search box (Ctrl+F). - If FB42 is present and originates from a CS library, delete the instance DB and the call site. The CF sample does not call FB42.
- Compile the project. If the password error is now gone, root cause #2 was the trigger.
Step 4 — Select the correct WRREC version
- Open a program block that calls
WRREC, e.g.OB1. - In the editor's right-hand pane, navigate to Instructions > Extended instructions > Distributed I/O > DP & PROFINET > WRREC.
- Drag the
WRRECblock into the network (or click the existing instance). - Open the block's properties (right-click > Properties > Information) and inspect the Version field.
- Change the version using the drop-down in the block's call interface header (the small triangle in the top-right of the block). The version that the sample project was built against is shown in the compile-error details; the error message lists "expected version: ...".
- For the SIWAREX CF sample supplied with Edition 12 of the manual, WRREC V1.0 (TIA Portal V13/V14) or V1.1 (TIA Portal V15+) is normally the correct choice. If you are on TIA Portal V17 or V18, V2.0/V3.0 may be auto-inserted by the project retriever — leave that selection in place.
- Recompile (Project tree > right-click CPU > Compile > Software (rebuild all blocks)).
Step 5 — Re-run a full software compile
- Project tree > right-click the S7 CPU > Compile > Software (rebuild all blocks).
- Inspect the Inspector > "Info > Compile" tab.
- Confirm zero errors and zero warnings related to the SIWAREX blocks.
Verification
| Check | Expected Result |
|---|---|
| TIA Portal compile | Zero errors, zero warnings against SIWAREX blocks |
| Block folder integrity | FB SIWA_CF and matching instance DB present; FB42 absent in CF project |
| WRREC interface | ID, MLEN, RECNUM, RECORD all wired with concrete tag names, not placeholders |
| Hardware detection | ET 200S head online; SIWAREX CF slot shows green diagnostic, no SF/ BF |
| SIWATOOL connection (optional) | SIWATOOL V7 connects to the module via Ethernet/PROFINET or RS-232; firmware version visible |
| Force readout | DR 3 returns a stable 16-bit value matching mechanical preload |
SIWAREX CF Data Record and Command Reference
When the project compiles, the next layer of integration is the data-record interface between the S7 CPU and the SIWAREX CF module. The module exposes standardized records that the application must write (commands) and read (process values).
| Data Record (DR) | Direction | Length (bytes) | Purpose |
|---|---|---|---|
| DR 0 | R/W | 128 | Command list — SIWAREX command interface |
| DR 1 | R | 32 | Process status (filter settings, error codes, life counter) |
| DR 2 | R | 8 | Diagnostic information |
| DR 3 | R | 8 | Process value (gross / net force, 16-bit signed per channel) |
| DR 4 | R | 8 | Filtered process value with higher resolution |
| DR 7 | R/W | 32 | Calibration parameters (zero, span, characteristic) |
| DR 8 | R/W | 32 | Filter parameters (low-pass, mean value) |
| DR 9 | R/W | 32 | Limit value 1 / 2 (switching thresholds) |
| DR 10 | R/W | 32 | Limit value 3 / 4 (switching thresholds) |
| DR 30 | R/W | 8 | Trace configuration |
| DR 31–34 | R | 4×128 | Trace buffer rings |
The SIWAREX command list is sent via WRREC to DR 0. A data error or command error is signalled in DR 1 and DR 2 if a command cannot be executed or if a sent data record is rejected. Typical rejections include out-of-range calibration values, illegal filter time constants, or an attempt to write a read-only DR.
WRREC Version Compatibility Matrix
Use the table below to pick the right WRREC version for your TIA Portal release when wiring the SIWAREX CF sample project.
| TIA Portal | STEP 7 version | WRREC version to select | Notes |
|---|---|---|---|
| V13 / V13 SP1 | S7-300/400 | V1.0 | Default for SIWAREX CF Edition 12 sample |
| V14 / V14 SP1 | S7-300/400, S7-1500 | V1.0 or V1.1 | V1.1 supports S7-1500 interface |
| V15 / V15.1 | S7-300/400, S7-1500 | V1.1 | Recommended for ET 200S + PROFINET head |
| V16 | S7-300/400, S7-1500 | V1.1 or V2.0 | V2.0 only on S7-1500 |
| V17 / V18 | S7-300/400, S7-1500 | V2.0 / V3.0 | Auto-selected on import; do not downgrade |
Common Compile-Time Errors After the Fix
| Compile message | Likely cause | Corrective action |
|---|---|---|
| "The block can only be compiled with a valid password" | CS sample (FB42) referenced from CF project, or WRREC version mismatch | Re-import CF sample, set WRREC version per the matrix above |
| "Unknown instruction WRREC" | WRREC not in selected instruction set (Basic vs Extended) | Enable Instructions > Extended instructions > Distributed I/O |
| "Interface of WRREC incompatible with instance DB" | WRREC version changed after wiring tags | Delete and re-create the call so the instance DB is regenerated |
| "DB number already in use" | FB instance DB number collides with a global DB | Re-number the instance DB in the FB properties |
| "No HW identifier for I/O device" | SIWAREX CF not configured in device view | Add SIWAREX CF to ET 200S slot, then compile hardware first |
Diagnostic and Field-Commissioning Notes
Once compilation succeeds, perform the following quick health check on the bench or in the cabinet before mounting the load cell:
- Download the project to the CPU (S7-300/400 or S7-1500) and go online.
- In the project tree, expand the SIWAREX CF module → Online & diagnostics.
- Read DR 2 (diagnostics). Byte 0 = module status, Byte 1 = current command error, Byte 2 = last data error, Byte 3 = reserved.
- Read DR 3 (process value). With no load applied, the value should sit within ± a few LSBs of the calibrated zero point. If the value is at the positive or negative rail, check the wiring polarity of the load cell and the sense-lead jumper positions in the terminal box.
- Connect SIWATOOL V7 via Ethernet/PROFINET or RS-232 to perform a zero / span calibration in the field, then store the parameters in DR 7 via WRREC.
Escalation Path
If the compile error persists after applying the matrix above and the FB42 cleanup, the next step is an official Siemens support request:
- Compress the TIA Portal project (Project > Archive > Project archive with compression).
- Open the Siemens Support Request form.
- Select Product > SIMATIC > SIMATIC ET 200S > SIWAREX CF, attach the archive, and quote the exact compile-error text.
FAQ
Why does TIA Portal ask for a password when I open the SIWAREX CF sample project?
The compile message is misleading. It is triggered by an unresolved or version-mismatched block reference, not by an actual project password. Replace any CS-sample FB42 with the CF sample's SIWA_CF block and select the WRREC version that matches your TIA Portal release (V1.0 for V13/V14, V1.1 for V15, V2.0/V3.0 for V17/V18).
Do I need FB42 for the SIWAREX CF?
No. FB42 belongs to the SIWAREX CS weighing family. The CF force-measurement module ships with its own function block (SIWA_CF) and uses the standard PROFINET/PROFIBUS record interface via WRREC/RDREC on DR 0–DR 34.
Which WRREC version is correct for the SIWAREX CF in TIA Portal V17?
Use the version that the project retriever auto-selects (typically V2.0 or V3.0 on S7-1500). Do not downgrade to V1.0/V1.1, because the S7-1500 system blocks of TIA Portal V17 only ship in V2.0+. On S7-300/400 in TIA Portal V17, V1.1 remains valid.
How do I read the current force value into the PLC?
Use RDREC on data record 3 (DR 3, 8 bytes) for the 16-bit gross/net force value, or DR 4 for the higher-resolution filtered value. Process the returned bytes as a 16-bit signed integer, then scale them in the application with the parameters stored in DR 7 (calibration zero/span) to obtain engineering units (N or kN).
Where can I find the official SIWAREX CF documentation?
The device manual is available on Siemens Industry Online Support at Manual_CF_en_12.pdf. The command list for the SIWAREX record interface is documented in the TIA Portal manual collection at docs.tia.siemens.cloud — SIWAREX command list.