Configuring Two SIWAREX WP231 Modules on S7-1200 CPU 1214C

David Krause2 min read
S7-1200SiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

The SIWAREX WP231 is a single-channel weighing module from the Siemens SIWAREX family that integrates directly into the S7-1200 backplane (S7-bus). It processes signals from strain-gauge load cells (full-bridge, 1 mV/V to 4 mV/V) at 24-bit resolution and offers a documented accuracy class of III up to 10,000 d (depending on the connected load cell and parameter set), with calibration either via SIWATOOL V7 or directly via the data record interface in TIA Portal.

When multiple WP231 modules are installed on the same CPU 1214C — for example, two independent scales with separate load cells — each module must be served by its own call of FB231 with a dedicated Instance-DB. The Instance-DB is the per-scale memory area where gross weight, net weight, tare, status bits, and the s_IO_DATA interface image live. Data Record 30 (DR30) is the standardized floating-point readout that contains the live gross and net process values and is the canonical source for HMI display and higher-level control.

This reference walks through the architecture, hardware topology, TIA Portal V16 device configuration, FB231 instantiation, DR30 mapping, OB35 cyclic interrupt handling, and verification of two WP231 modules on a CPU 1214C (firmware V4.x). Sample project naming follows the canonical Siemens distribution: CPU1214_WP231PR_KTP400Basic(...).zap15.

A WP231 module does not require a LAN or PROFINET cable to the CPU. Communication runs over the S7-1200 backplane (S7-bus). Treat any reference to "through link" in field discussions as a misnomer for backplane-coupled I/O.

Prerequisites

Before commissioning two WP231 modules, confirm the following hardware, firmware, and software baseline:

Item Requirement Notes
CPU SIMATIC S7-1200 CPU 1214C DC/DC/DC or DC/DC/RLY Firmware V4.2 or higher recommended for FB231 V2.x block interface compatibility
Weighing module 2× SIWAREX WP231 (6ES7 231-1QF32-0XB0, newer -1PF32-0XB0 revisions) Each occupies one slot to the right of the CPU in the S7-1200 rack
Load cells 1–4 parallel, full-bridge, 1 mV/V to 4 mV/V, 87–10,000 Ω Use the SIWAREX IS Ex interface for intrinsically safe cells
Engineering software TIA Portal V16 (or V16 Update 3+), STEP 7 Basic WinCC Basic or Comfort for the KTP400 Basic panel HMI
SIWATOOL V7 Optional, for offline calibration and trace verification USB service port on WP231 front face
Sample project CPU1214_WP231PR_KTP400Basic(...).zap15 Provided in the SIWAREX WP231 HSP / function block delivery
Documentation SIWAREX WP231 manual (A5E41178639) and S7-1200 manual collection See SIWAREX electronic weighing systems (S7-1200 manual collection)

Hardware Topology and S7-Bus Wiring

The WP231 is an S7-1200 SM (signal module) and snaps directly onto the DIN rail next to the CPU 1214C. The internal S7-bus connector carries power and process data between the CPU and the module — there is no separate fieldbus or LAN wiring required for cyclic data exchange. The wiring architecture is shown conceptually below.

CPU 1214CFW V4.x WP231 #1Slot 1 WP231 #2Slot 2 Load cellsLC1 / LC2 S7-busS7-busmV/V

The 4-wire load cell cable is terminated on the front face of each WP231 module at terminals 1–4 (SIG+, SIG−, SEN+, SEN−). For long cable runs or noisy environments, use shielded cable and bond the shield at the cabinet entry point only (do not ground at the load cell end as well).

TIA Portal Project Structure

Open the supplied sample project CPU1214_WP231PR_KTP400Basic(...).zap15 in TIA Portal V16. The default project tree ships with:

  • Device configuration: CPU 1214C + 1× WP231 (slot 101) + KTP400 Basic HMI
  • Program blocks: FB231 WP231PR, an associated Instance-DB (e.g. WP231PR_DB), and the cyclic interrupt OB35
  • HMI tags: bound to the Instance-DB static variables for display on the KTP400
  • Technology objects: none — WP231 is controlled via data record exchange, not TO
If you copied the sample project and renamed blocks manually, do not duplicate the Instance-DB by Save as. Always regenerate it through the FB231 call so that the S7-1200 retains its internal block consistency and the Instance-DB offset table matches the FB231 interface definition.

Adding the Second WP231 Module

Two WP231 modules cannot share a logical slot. Each module occupies a discrete slot in the device view. To add the second scale:

  1. In the project tree, double-click Device & Networks and select the CPU 1214C.
  2. From the hardware catalog on the right, expand SIMATIC S7-1200 > Signal modules > Weighing > SIWAREX WP231.
  3. Drag a second WP231 onto the rack, immediately to the right of the first WP231 (slot 102).
  4. For both modules, set the Module parameters > Properties > General: assign distinct names such as WP231_Scale1 and WP231_Scale2. Confirm each module's PROFIBUS/PROFINET identification: a unique hardware identifier (HW-ID) is generated automatically — note these (e.g. 260 and 262) for later use in the program.
  5. Compile the hardware configuration and download to the CPU.

After this step, the S7-1200 recognizes both modules and the online diagnostics should report no configuration errors. Both modules now expose the same Data Record interface (DR0 command interface, DR3 calibration parameters, DR30 process values, etc.).

FB231 Architecture and Why Each Module Needs Its Own Instance-DB

The function block FB231 WP231PR is supplied by Siemens (HSP package or as a download from the SIWAREX WP231 manual entry page). It encapsulates the entire data record exchange, command handling, and status decoding. Internally it maintains an s_IO_DATA structure (input image), a cmd structure (output image), and a state machine that periodically issues WRREC/RDREC calls to the module.

The critical rule for multiple WP231 modules:

Each call of FB231 in the user program represents exactly one physical WP231 module. Each call must be supplied with its own Instance-DB so that the runtime data (gross weight, net weight, tare, status bits, command echo, error codes) is partitioned per scale. Do not call a single FB231 instance for two different HW-IDs.

This is conceptually identical to calling two PID_Compact blocks: each instance maintains its own state. The Instance-DB stores:

Static member (path)TypeMeaning
Static.s_IO_DATA.PROCESS_VAL_1REALLive process value 1 (gross weight, kg/lb per unit setting)
Static.s_IO_DATA.PROCESS_VAL_2REALLive process value 2 (net weight, after tare)
Static.s_IO_DATA.PROCESS_VAL_3REALFiltered process value (depends on filter parameters)
Static.s_IO_DATA.STATUSWORDBit-coded status (bit 0 = ready, bit 1 = stable, etc.)
Static.s_IO_DATA.STATUS2WORDSecondary status word (errors, command complete)
Static.cmdSTRUCTCommand request: tare, zero, calibrate, etc.
Static.configSTRUCTModule configuration parameters (resolution, unit, filter)

Reading PROCESS_VAL_1 and PROCESS_VAL_2 directly from each Instance-DB is often the fastest path to the live gross/net weight without invoking the DR30 read explicitly. The DR30 data record (described later) is identical in content and is intended for cross-PLC or non-S7 consumers.

Step-by-Step: Inserting FB231 per Module

  1. Open the project tree and double-click OB1 (or your main cyclic OB).
  2. In the right pane, expand Instructions > Weighing > WP231 (or wherever the FB231 was added by the HSP). Drag WP231PR (FB231) into a network.
  3. TIA Portal immediately prompts: "Generate instance DB for the call". Click Single instance and accept the suggested name (e.g. WP231PR_DB_Scale1). The Instance-DB is created in Program blocks > System blocks.
  4. Wire the FB231 inputs:
    • HW_ID — set to the hardware identifier of the first WP231 module (e.g. 260).
    • SCALE_ID — free text tag (e.g. 'Silo_1') used for logging and operator display.
    • SCALE_NAME — optional display string (e.g. 'Raw material hopper').
    • SAMPLE_TIME — leave default (100 ms) or match OB35 cycle.
    • RESET — wire to a Boolean tag if a remote reset is required.
  5. Repeat steps 1–4 for the second module in a separate network within OB1 (or OB35 — see next section). When you drag FB231 a second time, accept the prompt to create another Instance-DB, e.g. WP231PR_DB_Scale2.
  6. Wire the second FB231 call's HW_ID input to the second module's hardware identifier (e.g. 262).
  7. Compile (Build) and download to the CPU.
If you drag FB231 onto an existing network and accidentally inherit the same Instance-DB, the build will succeed but the runtime will reflect only one scale's data. Always verify the Instance-DB name on the call header before downloading.

OB35 Cyclic Interrupt Configuration

The FB231 is internally driven by a state machine that does not require an external clock — but Siemens' reference implementation strongly recommends calling FB231 from OB35 (Cyclic interrupt) so that DR30 reads, command processing, and error handling are deterministic and decoupled from the OB1 scan time.

OB35 default cycle time is 100 ms. To adjust:

  1. Open OB35 in the project tree.
  2. Open Properties > General > Time-of-day interrupt / Cyclic interrupt.
  3. Set Phase offset (e.g. 0 ms) and Cycle time (e.g. 100 ms).
  4. Inside OB35, call FB231 once per WP231 module, each with its own Instance-DB and HW_ID.

For two scales, the typical OB35 looks like:

// Network 1: Scale 1
CALL WP231PR_DB_Scale1
  HW_ID := 260
  SCALE_ID := 'SILO_1'
  SAMPLE_TIME := T#100ms
  RESET := FALSE

// Network 2: Scale 2
CALL WP231PR_DB_Scale2
  HW_ID := 262
  SCALE_ID := 'SILO_2'
  SAMPLE_TIME := T#100ms
  RESET := FALSE

The two FB231 calls share OB35's 100 ms tick; FB231's internal scheduler staggers its RDREC/WRREC operations such that no bus collision occurs on a single S7-1200 backplane. With two modules the combined bus load is well under the 100 ms budget.

DR30 Data Record (Process Values)

Data Record 30 is the canonical floating-point readout from the WP231. It is the most stable interface for external consumers (HMIs, SCADA, edge gateways) because it is byte-identical regardless of the FB231 version. Layout:

OffsetBytesTypeField
04REALProcess value 1 — gross weight (in calibrated unit)
44REALProcess value 2 — net weight (after tare)
84REALProcess value 3 — filtered / alternate value
122WORDStatus 1 (bit-coded)
142WORDStatus 2 (bit-coded)
162WORDReserved / scale status
182WORDFiller

To read DR30 explicitly from the user program (e.g. for an OPC UA push to a higher-level MES), use the RDREC instruction in SCL:

// Read DR30 from Scale 1 into a byte buffer
IF bTrigger_DRD30_Scale1 THEN
  bTrigger_DRD30_Scale1 := FALSE;
  bBusy_DRD30_Scale1 := TRUE;
  RDREC(
    REQ  := TRUE,
    ID   := 260,
    INDEX := 30,
    MLEN := 20,
    VALID := bValid_DRD30_Scale1,
    BUSY := bBusy_DRD30_Scale1,
    ERROR := bError_DRD30_Scale1,
    STATUS:= wStatus_DRD30_Scale1,
    RECORD := arr_DRD30_Scale1);
END_IF;

// Byte 0..3 = Gross, Byte 4..7 = Net (use AT view as REAL)
gross_Scale1 := REAL_AT_0(arr_DRD30_Scale1);
net_Scale1  := REAL_AT_4(arr_DRD30_Scale1);

You can read DR30 from both modules simultaneously because the RDREC mechanism is per-HW-ID. However, calling RDREC on a module that FB231 is already polling is harmless — the records are read-only snapshots and the module updates them internally faster than either consumer can read.

HMI Integration on KTP400 Basic

The supplied sample binds the HMI tags directly to the Instance-DB static variables. With two Instance-DBs, you have two sets of tags. Recommended bindings:

HMI tag (KTP400)PLC tag pathFormat
Gross_Scale1WP231PR_DB_Scale1.Static.s_IO_DATA.PROCESS_VAL_19999.9
Net_Scale1WP231PR_DB_Scale1.Static.s_IO_DATA.PROCESS_VAL_29999.9
Status_Scale1WP231PR_DB_Scale1.Static.s_IO_DATA.STATUSHex 16-bit
Gross_Scale2WP231PR_DB_Scale2.Static.s_IO_DATA.PROCESS_VAL_19999.9
Net_Scale2WP231PR_DB_Scale2.Static.s_IO_DATA.PROCESS_VAL_29999.9
Status_Scale2WP231PR_DB_Scale2.Static.s_IO_DATA.STATUSHex 16-bit

For the operator panel, build two screens (or a screen with selector toggle) with: gross weight, net weight, zero button, tare button, status word, and a process tag view.

Calibration and Commissioning Sequence

Whether one scale or two, each WP231 must be calibrated independently. The canonical procedure:

  1. Power up the CPU 1214C; both WP231 modules will pulse their RDY (green) LED after about 5 s.
  2. Open SIWATOOL V7 on a PC and connect to the WP231 front USB service port. Select the correct COM port and log in.
  3. For each scale: enter the load cell characteristic (mV/V, capacity, dead load), set the unit (kg, lb, t), define the low/high calibration weights (default: zero and nominal), and trigger Calibrate.
  4. Verify the calibration by applying a test weight (typically 50% of nominal) and reading gross weight via DR30 or the Instance-DB PROCESS_VAL_1.
  5. In TIA Portal, go online with the CPU and watch the FB231 STATUS word. Bit 1 should toggle to 1 when the load is stable.
  6. Repeat for scale 2.
Each WP231 has its own USB service port. Calibrating scale 2 does not affect scale 1's parameters — the modules are fully independent, even though they share the S7-bus.

Verification Checks

After download, run the following end-to-end checks before signing off:

  • Online diagnostics: In TIA Portal, Online & diagnostics > Diagnostics buffer shows no configuration errors for either WP231 HW-ID.
  • FB231 status word: For both Instance-DBs, bit 0 (Ready) and bit 1 (Standstill) should update when load is applied.
  • DR30 readability: Trigger the RDREC example above for each scale; confirm bValid_DRD30_ScaleX := TRUE and the gross/net REALs return sensible values.
  • OB35 cycle time: Add a RUNTIME measurement to OB35. Two FB231 calls should consume < 25 ms on a CPU 1214C at default scan rate, leaving margin under the 100 ms budget.
  • Tare round-trip: Send a tare command to each scale (write to Static.cmd.tare); verify the net weight goes to 0.0 and gross stays unchanged.
  • Power cycle: Power down/up the cabinet; confirm both scales come back online within 6 seconds and resume polling without any manual reset.

Troubleshooting Matrix

SymptomLikely causeRemedy
One scale always shows 0.0 / 2147483647HW_ID on FB231 is wrongOpen online & check the actual HW-ID under System constants; re-wire FB231
Both scales show identical valuesBoth FB231 calls share one Instance-DBRight-click FB231 → Generate new single instance DB
SF (red) LED on a WP231 moduleLoad cell wiring open / short / shield on both endsDisconnect load cell, measure resistance at module terminals; re-bond shield
Status bit 0 always 0Module not parameterized (no calibration)Run SIWATOOL V7 calibration; or write DR3 via FB231 command interface
HMI shows "###" or old valueInstance-DB path broken after copy/pasteRebind HMI tag to the exact dot-notation path
OB35 overflowsUser code in OB35 too heavyMove non-time-critical code to OB1; keep FB231 calls only in OB35
OB1 still has FB231 — values don't refreshTwo calls in OB1 + two calls in OB35 = raceRemove FB231 from OB1, leave only the OB35 instances
RDREC for DR30 returns ERROR=TRUESimultaneous RDREC on a freshly parameterized moduleRetry with debounce; let FB231 own the bus for 5 s after parameterization

Edge Cases and Field-Proven Caveats

  • Three or more WP231 modules: The same pattern scales. Each module gets its own HW-ID, FB231 call, and Instance-DB. OB35 cycle time should still be 100 ms; total bus load grows roughly linearly but stays well below the 1214C's CPU capacity.
  • WP231 hot swap: The S7-1200 does not support live module replacement. Power down before inserting or removing a module.
  • Firmware drift: If the FB231 version is upgraded (e.g. V2.1 → V2.2), the Instance-DB offsets may shift. After a block upgrade, recompile all Instance-DBs.
  • Intrinsic safety: For Ex zones, route the load cell through the SIWAREX IS interface and verify the WP231 is installed outside the hazardous area.
  • EMC: Do not run the load cell cable in parallel with VFD power cables. Maintain ≥ 200 mm separation, or use a dedicated cable tray.
  • Sample project naming: Older TIA Portal versions ship ..._zap13; newer versions _zap15. The block logic is the same; only the project metadata differs.

Related Siemens Documentation

The S7-1200 manual collection is the authoritative reference for the WP231 family of electronic weighing systems, including WP231, WP241, and WP251 variants. It documents the backplane integration, electrical specifications, calibration data record layout, and CE/UL approvals. Always verify against the latest revision in your local Siemens Industry Online Support portal. For the manual collection page, see SIWAREX electronic weighing systems.

FAQ

Do I need one FB231 or one FB231 per WP231 module?

One FB231 call per WP231 module. Each call must be instantiated as its own single Instance-DB; the FB231 itself is reused, but it must be called once per HW-ID. Sharing one FB231 call between two modules will not work — the Instance-DB stores only one set of process values and status bits.

Why does the WP231 not need a LAN cable?

The WP231 is an S7-1200 signal module and connects to the CPU 1214C through the S7-1200 backplane (S7-bus). Power and cyclic process data share the same connector; no Ethernet, PROFINET, or PROFIBUS wiring is required for the basic operation. Configuration and calibration can be done via the front USB service port using SIWATOOL V7.

Where do I read gross and net weight — Instance-DB or DR30?

Both. WP231PR_DB.Static.s_IO_DATA.PROCESS_VAL_1 (gross) and PROCESS_VAL_2 (net) inside each Instance-DB are updated every FB231 cycle (default 100 ms). DR30 (Data Record 30) carries the same two REALs plus a filtered third value and two status words, and is preferred when sending data to external consumers that cannot bind directly to the Instance-DB.

Should FB231 be called from OB1 or OB35?

OB35 (cyclic interrupt) is recommended. Calling FB231 from OB35 guarantees a deterministic 100 ms cycle independent of the OB1 scan time, decouples weighing logic from the main program, and matches the example in the SIWAREX WP231 manual. Avoid placing the FB231 call in both OB1 and OB35 — this causes bus contention and erratic values.

My HMI shows correct values but a red SF LED is on one module — what now?

SF on a WP231 indicates either a load cell error (open wire, short, sensor out of range) or an internal diagnostic fault. Disconnect the load cell, measure the bridge resistance at the module terminals (expect ~350 Ω nominal for a 4-wire cell, or ~700–1000 Ω for two parallel cells). If the resistance is correct and the SF LED stays on with no cell connected, the module itself is suspect — replace and re-calibrate.

Back to blog