Integrating SITRANS FM MAG6000 on PROFIBUS DP with S7 PLCs

David Krause18 min read
ProfibusSiemensTutorial / 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 Siemens SITRANS FM MAG5100 electromagnetic flow sensor combined with the SITRANS FM MAG6000 transmitter is a work-horse combination for conductive liquid measurement in water, wastewater, chemical, and process industries. When the application specifies a PROFIBUS DP connection into a SIMATIC S7-300, S7-400, ET 200S, or S7-1500 (with PROFIBUS CM), the engineering team faces several decisions that the field rarely documents: which GSD file to import, which profile to use, how to read process values without SIMATIC PDM, and what the engineering units are on the wire.

This reference consolidates the wiring, GSD selection, hardware configuration, and cyclic data extraction steps required to bring a MAG6000 online on PROFIBUS DP. It is written for the engineer at the panel during commissioning, not the marketing engineer at the desk. The MAG6000 transmitter is the device on PROFIBUS; the MAG5100 (or MAG1100, MAG3100, MAG5100 W) sensor is the flow tube that feeds it. The pair is treated as one PROFIBUS DP-V0 slave at a unique station address.

The MAG5000/6000 product family evaluates the electrode signals from the associated sensor, converts them into a standardized 4 to 20 mA analog output and a PROFIBUS PA/DP process value, and exposes the full diagnostics block to the automation system. The PROFIBUS interface eliminates the analog loop, the shielded twisted pair, the A/D conversion in the PLC, and the scaling math in the user program — at the cost of getting the GSD, the slot mapping, and the byte order correct.

System Architecture and Topology

A typical MAG5100/MAG6000 PROFIBUS DP segment consists of:

  • Sensor: SITRANS FM MAG5100 (or MAG1100, MAG3100, MAG5100 W) — the wet flow tube containing the coils and electrodes. The MAG5100 W variant is the wafer-style version commonly used in water and waste-water duties, while the MAG3100 is the flanged ANSI/DIN version for industrial process use. Refer to the SITRANS FM MAG5100 W Operating Instructions for sensor-specific installation data.
  • Transmitter: SITRANS FM MAG6000 — the PROFIBUS DP/PA-capable converter. Provides coil drive to the sensor, signal conditioning, HMI, and bus interface. Refer to the SITRANS FM MAG 5000/6000 Operating Instructions for the electrical and bus interface details.
  • DP master: SIMATIC S7 CPU with PROFIBUS DP master port (CPU 31x-2 DP, CPU 41x-2 DP, ET 200S master, or S7-1500 with CM 1542-5).
  • Bus medium: PROFIBUS DP cable (typically Siemens 6XV1830-0EH10 violet cable) with bus terminators active at both physical ends of the segment.
  • Engineering station: SIMATIC Manager (Step 7 V5.5 / V5.6) for hardware configuration and GSD import.
Wiring check: Confirm that the MAG6000 is ordered with the PROFIBUS option board (ordering option F4: PROFIBUS PA/DP) and not the HART, FOUNDATION Fieldbus, or Modbus variant. The PROFIBUS module exposes a 9-pin D-sub female connector on the transmitter housing; the shield must be terminated 360° to the metallic connector backshell to keep the segment EMC clean.

PROFIBUS Profile Selection: Profile 2 vs Profile 3

Siemens ships multiple GSD files for the MAG6000, broken down by two orthogonal axes: the physical network (PA versus DP) and the application profile (Profile 2 versus Profile 3). Selecting the wrong file will not damage hardware, but the slave will fail to enter cyclic data exchange and SIMATIC Manager will report a configuration fault at startup.

PA vs DP

PROFIBUS PA (Process Automation) and PROFIBUS DP (Decentralized Periphery) are physically and electrically distinct networks. PA runs on MBP (Manchester Bus Powered) physics at 31.25 kbit/s and is intrinsically safe (Ex i) — typical of chemical and petrochemical plants. DP runs on RS-485 at 9.6 kbit/s to 12 Mbit/s, is not intrinsically safe, and is the standard fieldbus in factory automation. The MAG6000 module can be configured for either, but you must install the GSD that matches the network you are connecting to. Mixing the two will cause the slave to fail to participate in token-pass and token-handshake, and the diagnostic LED will report a parameterization fault.

For the S7 PLC and water/wastewater use case, select the PROFIBUS DP GSD. PA GSDs are only used when the MAG6000 sits on a segment behind a PA/DP coupler or link (e.g., Siemens DP/PA coupler FDC 157-0).

Profile 2 vs Profile 3

Profile 2 and Profile 3 are the two device-profile implementations of the PROFIBUS PA/DP profile for process instrumentation (NE 107 / VDI/VDE 2650):

Attribute Profile 2 Profile 3
Specification basis PROFIBUS Profile for Process Automation, version 2.0 (legacy) PROFIBUS Profile for Process Automation, version 3.0 (current)
Block model Single AI block + DI block + totalizer Modular AI / TOT / DI blocks with explicit slot assignment
Diagnostics Manufacturer-specific diagnostics Profile-conformant NE 107 status (OK, Maintenance, Out-of-Spec, Failure)
Interoperability Older master systems Modern masters, GSD import in TIA Portal, SIMATIC PDM V8+
Recommended for new projects No — only for legacy S7-300 with older GSD libraries Yes

For any new S7-1500 or S7-300 integration, select Profile 3 for DP. Profile 3 is the only profile the latest SIMATIC PDM and TIA Portal versions can fully enumerate; Profile 2 is retained for service and replacement of older devices already in the field.

Catalog filename convention: Siemens GSD files for the MAG6000 are typically named SIEM810F.GSD (PA Profile 2), SIEM811F.GSD (PA Profile 3), and the DP equivalents SIEM812F.GSD / SIEM813F.GSD (exact filenames vary by firmware revision — always download the file shipped with the current firmware on the Siemens Product Support page).

Prerequisites

Before commissioning, verify the following are present and verified:

  1. Hardware: MAG5100 sensor installed per the MAG5100 W Operating Instructions with gaskets, grounding rings (required for lined tubes on non-conductive piping), and a coaxial signal cable run between sensor junction box and the MAG6000 transmitter. Maximum sensor-to-transmitter separation is 50 m for the MAG6000; longer runs require the MAG6000 I (intelligent) version with the pre-amplifier in the sensor head.
  2. Transmitter power: 24 V DC or 115/230 V AC depending on the MAG6000 order code. Power consumption is approximately 9 W (24 V DC, with display backlight) plus the PROFIBUS termination current.
  3. PROFIBUS station address: Set on the MAG6000 keypad (Menu → Service → Bus Address). Default is 126. Set a unique address between 1 and 125 for the segment.
  4. Engineering software: SIMATIC Manager Step 7 V5.5 SP4 or later, or TIA Portal V13 SP1 or later if the master is an S7-1500. SIMATIC PDM V8.2 or later is recommended for diagnostics but is not strictly required for cyclic data read.
  5. GSD file: Download the GSD matching the transmitter's firmware revision. The current firmware for MAG6000 PROFIBUS modules is typically V3.04 or higher; the matching GSD ships on the same firmware download bundle.
  6. PLC tag capacity: One MAG6000 occupies 4 input words (8 bytes) of process data in the standard Profile 3 mapping. Reserve 8 bytes in the I/O image or a dedicated DB.

Hardware Configuration in SIMATIC Manager

The following procedure is for SIMATIC Manager Step 7 V5.x with an S7-300 / S7-400 master. TIA Portal flow is analogous — install the GSD, drag the device from the catalog into the device configuration, and assign the PROFIBUS address.

  1. Install the GSD: Open HW Config → Options → Install GSD File → Browse to the SIEM813F.GSD (Profile 3 DP) file. The MAG6000 appears in the catalog under PROFIBUS DP → Other Field Devices → Sensor → Flow → Siemens AG → MAG6000.
  2. Insert the master system: Drag the MAG6000 onto the PROFIBUS DP master system line in HW Config. Assign the bus address set on the transmitter keypad (default 126 must be changed if it conflicts with the DP master at 2).
  3. Slot configuration: The MAG6000 Profile 3 module exposes a fixed slot structure. Verify the default slot mapping produced by the GSD:
Slot Module I/O Type Bytes
0 AI 1 (Volume flow) Input 5 bytes (1 status + 4 value)
1 TOT 1 (Totalizer / Forward total) Input 5 bytes (1 status + 4 value)
2 DI 1 (Empty pipe / diagnostic flag) Input 5 bytes (1 status + 4 value)

Total cyclic input length: 15 bytes (rounded up to 16 bytes — 2 words of padding in the I/O image). If only flow is required, the slot assignment can be reduced by deleting the unused TOT and DI slots; the MAG6000 will then only transmit the AI 1 block.

  1. Save and compile: HW Config → Station → Save and Compile. The DP master is now configured to exchange data with the MAG6000 at the assigned address.
  2. Download to the CPU: PLC → Download to Target → confirm the new PROFIBUS configuration.
  3. Power-cycle the MAG6000: After configuration download, the MAG6000 may show a configuration fault if the slot map does not match. A power-cycle forces re-parameterization.

Reading Process Data Cyclically

Cyclic process data is read using the standard SFC14 (DPRD_DAT) and SFC15 (DPWR_DAT) system function blocks. SIMATIC PDM is a configuration and diagnostics tool, not a process data reader — cyclic I/O is the standard mechanism for process values.

Assuming the MAG6000 occupies input bytes 0–15 starting at I address offset configured in HW Config (the I address appears in the slot properties dialog), the read sequence in Structured Text or LAD is:

// LAD / FBD call
CALL  "DPRD_DAT"
  LADDR  := W#16#100          // Logical base address of the MAG6000 I area
  RET_VAL:= MW100             // Return code: 0 = no error
  RECORD := P#DB20.DBX0.0 BYTE 16   // Target: 16 bytes into DB20

After the call, DB20.DBB0 contains the AI 1 status byte, DB20.DBD1 (bytes 1–4) contains the IEEE-754 single-precision volume flow value in the configured engineering unit, DB20.DBB5 starts the TOT 1 block, and so on. The same record can be read with a single SFC14 call covering all 16 bytes — no per-slot call is required.

Consistent data: SFC14 reads the entire 16-byte image atomically — the four bytes of the flow value cannot tear between two PLC scan cycles. Do not access the same input address range with direct I/O access (PIW); that would only see the first word and would be non-deterministic with respect to cycle time.

Engineering Units and Scaling

The MAG6000 ships from the factory with volume flow in cubic metres per hour (m³/h). The PROFIBUS process value is transmitted as a 32-bit IEEE-754 floating-point number; the engineering unit is configured on the transmitter keypad (Menu → Setup → Units) and is independent of the bus representation. The unit configured on the device is the unit the PLC will see in the floating-point word.

Unit Setting (Transmitter Keypad) Value at PLC (Float32 in Slot 0, Bytes 1–4)
m³/h (factory default) Direct reading — no scaling required
L/s Direct reading in L/s
US gal/min Direct reading in GPM
kg/s (requires density) Direct reading in kg/s — verify density value entered in Setup → Density

For an S7 program that expects litres per second, the engineer has two clean options:

  1. Reconfigure the transmitter to L/s on the keypad and let the floating-point value represent L/s directly.
  2. Keep m³/h and convert in the PLC: L/s = (m³/h) × 1000 / 3600 = (m³/h) × 0.2777778

Option 2 is preferred for serviceability — the transmitter stays at the factory default and any future replacement unit is automatically in the expected unit. The conversion constant can be put in a constant block (FC with VAR_CONST) so the multiplier is documented in the program.

Cyclic I/O vs SIMATIC PDM

A common misconception is that PROFIBUS process values can only be read via SIMATIC PDM. This is incorrect:

Function Cyclic I/O (SFC14/15) SIMATIC PDM
Read volume flow Yes — Slot 0 AI 1, Float32 Yes — same slot, with engineering unit display
Read totalizer Yes — Slot 1 TOT 1, Float32 + count of decimal places Yes
Reconfigure parameter (e.g., change full scale) No — requires acyclic C2 read/write Yes — acyclic over the same PROFIBUS
Read full diagnostics buffer No — only the NE 107 status byte in slot 0 Yes — full event log with timestamps
Commission new device (set address, units, full scale) No Yes — primary tool

SIMATIC PDM is the correct tool for parameterization, but the running volume flow value in the PLC program must be read cyclically. Do not implement an SFC59 / RDREC loop in the OB1 to fetch the flow value — that wastes bus bandwidth and will overrun the device. The PROFIBUS master poll cycle on the DP segment is the correct mechanism.

Acyclic Parameter Access from S7

For applications that need to read non-cyclic data (e.g., empty-pipe detection flag, full diagnostics buffer, calibration date), use the acyclic READ/WRITE record services from the DP master:

// Acyclic read example (S7-300/400, SIMATIC Manager)
CALL  "RDREC"
  REQ   := TRUE
  ID    := W#16#100           // Logical address of the MAG6000
  INDEX := 0                  // Slot 0 record index
  MLEN  := 16
  VALID := M105.0
  ERROR := M105.1
  STATUS:= MW106
  LEN   := MW108
  RECORD:= P#DB30.DBX0.0 BYTE 16

Slot 0 / Index 0 returns the standard PROFIBUS PA profile 3.0 diagnostics block — including the NE 107 condensed status, the device serial number, the manufacturer ID (0x810F for Siemens MAG family), and the operating hours counter. Calling this on demand from the HMI or the engineering workstation gives a maintenance engineer full visibility into the transmitter state without a field visit.

Function Block Libraries for S7

There is no Siemens-supplied, official faceplate FB for the MAG6000 in the standard Step 7 library set. For a structured integration, the recommended practice is to wrap the SFC14 read and the scaling logic in a project-specific FB:

FUNCTION_BLOCK FB200 "MAG6000_Flow_In"
VAR_INPUT
  i_LogicalAddress : INT;          // I-address from HW Config
END_VAR
VAR_OUTPUT
  o_VolumeFlow_m3h : REAL;         // Volume flow in m³/h
  o_Totalizer_m3   : REAL;         // Forward total in m³
  o_Status         : BYTE;          // NE 107 status (0=OK, 1=Maintenance, ...)
  o_Error          : BOOL;         // SFC14 RET_VAL <> 0
END_VAR
VAR
  s_DPRD_DAT : SFC14;              // Cyclic read
  s_DataBuffer : ARRAY[0..15] OF BYTE;
END_VAR
BEGIN
  s_DPRD_DAT(LADDR := WORD#16#100, RET_VAL := #o_Error, RECORD := #s_DataBuffer);
  // Slot 0: AI 1, bytes 1..4 = volume flow IEEE-754
  #o_VolumeFlow_m3h := REAL#0.0;
  IF NOT #o_Error THEN
    // Bit-copy 4 bytes from s_DataBuffer[1..4] into a temporary DWORD
    #o_VolumeFlow_m3h := DWORD_TO_REAL(SHL(WORD_TO_DWORD(BYTE_TO_WORD(s_DataBuffer[2])), 24) OR ...);
  END_IF;
END_FUNCTION_BLOCK

For a clean implementation in TIA Portal, drop a DPRD_DAT instruction in a function block, expose the input as a multi-instance DB, and split the 16-byte record into the AI / TOT / DI blocks in the FB. Most integrators build a single FB (typically FB200 / FB300 in the project) that handles all flow instruments on the segment by varying the i_LogicalAddress input.

Diagnostics and NE 107 Status

The MAG6000 supports the NE 107 (VDI/VDE 2650) status categories on PROFIBUS. The first byte of slot 0 (the AI 1 status byte) is encoded as follows:

Status Byte Value NE 107 Category Typical MAG6000 Cause
0x00 (0) OK Normal operation, value valid
0x40 (64) Maintenance required Coil resistance drifting, sensor aging
0x80 (128) Out of specification Flow out of range, conductivity too low, empty pipe
0xBC (188) Failure Coil open, electrode open, internal error

Map this status byte to an HMI alarm or to a SCADA tag so the operator sees a single “flow meter health” indicator. PROFIBUS offers a clear advantage over the 4–20 mA loop here — a 4 mA output cannot distinguish between zero flow, an empty pipe, and a coil failure; the bus can.

Verification and Commissioning Checklist

Run this checklist before declaring the loop ready for production:

  1. Bus diagnostic: In HW Config → PROFIBUS → Bus Diagnostics, confirm zero station failures, zero repeat counts, and zero lost frames. A non-zero repeat count indicates cable or termination issues — fix before proceeding.
  2. Value validation: Force a known flow (e.g., a calibrated pump at 50 % of full scale) and confirm the value at the PLC matches the transmitter display to within the device's stated accuracy (typically ±0.4 % of flow rate at reference conditions, depending on the calibration). Note the value in the commissioning report.
  3. Status byte: Verify the AI 1 status byte is 0x00 under normal flow. Artificially empty the pipe (close the upstream and downstream valves) and confirm the status byte moves to 0x80 (out of spec) within 2–3 PROFIBUS cycles. Drain cycles of less than 5 seconds indicate a properly configured empty-pipe detector.
  4. Totalizer: Read the TOT 1 block from slot 1 and verify it increments monotonically with flow. Reset the totalizer from SIMATIC PDM (or from the transmitter keypad) to confirm the write path is operational if a reset is required for the application.
  5. Power loss recovery: Power-cycle the MAG6000 and confirm the bus returns to data exchange within 10 seconds — well under the typical PLC warm restart window.
  6. HMI / SCADA tag: Confirm the engineering unit (m³/h or L/s as configured) is correctly displayed in the HMI faceplate. A common bug is to display the raw float with the default decimal place from the project, leading to readouts of "123.45 m³/h" when the actual is "1.2345 m³/h". Use the unit code from the PROFIBUS slot descriptor (byte 1 of the AI block) to drive the HMI suffix.

Troubleshooting Matrix

Symptom Likely Cause Action
Bus diagnostic: station failure on MAG6000 GSD file version mismatch with transmitter firmware Compare the firmware version shown on the transmitter display with the GSD release notes; re-install matching GSD and re-download HW Config
Parameterization fault (PROFIBUS LED red, cyclic LED off) Slot configuration does not match the device profile (e.g., PA GSD used on a DP network) Re-install the DP variant of the GSD; check the segment is wired as RS-485 not MBP
Value at PLC is always 0x7F800000 (NaN) Sensor cable disconnected, coil open, or empty pipe with detector enabled Check sensor cable, measure coil resistance at MAG6000 terminals (typically 50–250 Ω per coil)
Value at PLC is stuck at last good value Wrong LADDR passed to SFC14 Cross-check the I address from HW Config with the LADDR input; ensure both master and slave are configured to the same logical base
Flow reading is correct on transmitter, wrong on PLC Engineering unit mismatch — transmitter set to L/s, PLC expects m³/h Read byte 1 of the AI block (unit code) and confirm with the engineering unit; multiply by 0.2777778 in the PLC or re-set the transmitter to m³/h
Totalizer does not reset from PLC Reset requires acyclic write to slot 1, record 1 Use SFC58 (WRREC) with the reset command, not cyclic write
Intermittent bus errors, high repeat count Missing or improperly seated bus terminator; shield not 360° terminated Verify terminators on at both segment ends only; re-terminate D-sub shield to backshell
AI status byte is 0x80 under normal conditions Empty pipe detector enabled, pipe is partially full, or conductivity is below the configured limit Verify the pipe is full; check fluid conductivity against the sensor specification (minimum 5 µS/cm for most MAG sensors, 20 µS/cm for demineralized water)

Field-Proven Notes

  • Default address trap: The MAG6000 ships at PROFIBUS address 126 — the same address the master typically uses for a new device. Change the address on the keypad before connecting the device, or the master will not find the device on commissioning day.
  • Coil current verification: A common field test is to measure the coil drive current at the MAG6000 terminals — it should be approximately 125 mA per coil with the sensor connected. A reading of 0 mA indicates a broken coil or a damaged internal cable.
  • Grounding: MAG flowmeters require a process-side ground reference. On lined tubes (PTFE, hard rubber), use the supplied grounding rings or grounding electrodes. Without a process ground, the electrodes pick up common-mode noise and the PROFIBUS value will be unstable.
  • Power supply margin: The MAG6000 PROFIBUS option draws its bus-side power from the transmitter 24 V supply, not from the bus. If the segment is at the end of a long run, a weak 24 V supply can cause the transmitter to drop off and rejoin the bus intermittently. Verify the 24 V supply stays above 21.6 V under full load.
  • Firmware upgrades: Newer MAG6000 firmware (V3.04 and later) introduced enhanced NE 107 diagnostics. If the bus diagnostic shows "manufacturer-specific diagnostic pending," the GSD needs to be upgraded to enumerate the new diagnostic bytes. Always re-import the GSD and re-download HW Config after a firmware upgrade.

What is the difference between Profile 2 and Profile 3 GSD files for the SITRANS FM MAG6000?

Profile 3 is the current PROFIBUS PA/DP profile (3.0) with a modular AI / TOT / DI block model and NE 107 status; Profile 2 is the legacy 2.0 profile retained for service replacement of older MAG5000/6000 devices. For new S7-300, S7-400, and S7-1500 integrations, install and use the Profile 3 GSD.

Do I need SIMATIC PDM to read the volume flow from the MAG6000 over PROFIBUS DP?

No. SIMATIC PDM is a configuration and diagnostics tool, not a process data reader. The volume flow is read cyclically into the PLC using SFC14 (DPRD_DAT) from the AI 1 block in slot 0; the result is a 32-bit IEEE-754 float transmitted in the engineering unit configured on the transmitter (factory default: m³/h).

What is the default engineering unit of the MAG6000 process value on PROFIBUS?

Factory default is m³/h. The unit is configured on the transmitter keypad under Menu → Setup → Units. The PROFIBUS value is a float; no scaling is required, and the unit cannot be derived from the float itself — it must be documented in the project or read from the unit code byte in the AI 1 slot.

Can I use the same MAG6000 GSD on PROFIBUS PA and PROFIBUS DP networks?

No. PA and DP use different GSD files because the bus physics, baud rate, and coupler model are different. A PA GSD on a DP network (or vice versa) causes a parameterization fault and the device will not enter data exchange. Use the DP GSD for connection directly to an S7 DP master, and the PA GSD only when the MAG6000 sits on a PA segment behind a DP/PA coupler.

How many PROFIBUS input bytes does a single MAG6000 occupy?

In the standard Profile 3 configuration with all three blocks enabled (AI 1, TOT 1, DI 1), the MAG6000 occupies 15 input bytes plus one padding byte for a total of 16 bytes. If only the volume flow is required, the TOT 1 and DI 1 slots can be removed in HW Config and the input length is reduced to 8 bytes (5-byte AI block plus 3 padding bytes).

Back to blog