Overview
This reference walks through a field-proven integration of a Siemens SIMATIC S7-314C-2DP Profibus master with an ICP DAS GW-7552 Profibus-to-Modbus RTU gateway. The gateway polls a 1-channel Modbus RTU thermocouple / RTD module (commonly referred to as the "Modbus 1TE" module, e.g. ICP DAS M-2018 or M-2018C) and exposes the measured temperature as cyclic I/O data on the Profibus slave side. The S7-314C-2DP reads the value, scales it from 0.1 °C to °C, and makes it available to the user program.
The original commissioning reported three issues that this document addresses explicitly:
- The GSD file imports and the gateway enters
RUN, but the user is unsure how to address the temperature word in OB1. - The Profibus input address range on the configured slot is limited; values above ~byte 82/83 do not update.
- The raw value displayed in the watch table is ten times higher than the real temperature (e.g. 23.0 °C shown as 230), requiring explicit scaling.
L PID 256 / T MD 100 shown in community guidance is legacy STEP 7 syntax for the S7-300 in Simatic Manager. TIA Portal accepts the same instructions in an STL source section, but a structured SCL block is more portable and recommended for ongoing maintenance.System Architecture
Three physical segments connect to a single PROFIBUS DP segment terminated at both ends with 220 Ω, 1 W bus terminators (typically the PROFIBUS connector with the integrated switch in the ON position at the physical ends).
Prerequisites
| Item | Detail |
|---|---|
| CPU | Siemens SIMATIC S7-314C-2DP (e.g. 6ES7 314-6CG03-0AB0) with integrated Profibus DP master on the X2 (DP) port. |
| Engineering | TIA Portal V15.1 or later (V16 / V17 / V18 also work). Legacy STEP 7 V5.5 + SP2 with HW Config is the alternative path. |
| Firmware | CPU firmware ≥ V2.6 for full PN/DP compatibility. S7-300 CPUs ship with DP master enabled by default on the X2 port. |
| Gateway | ICP DAS GW-7552 (Profibus slave, Modbus RTU master). Order code GW-7552 CR or GW-7552-G CR. The device has a Profibus slave address range 0–99 selected by two rotary switches on the front. |
| GSD file |
ICP0AAA0.GSD (or the device-specific file shipped with the GW-7552). Always use the file bundled with the firmware revision on the gateway. |
| Modbus 1TE | 1-channel Modbus RTU temperature module (e.g. ICP DAS M-2018 for thermocouple or M-2018C for type K only). Default Modbus address 1, 9600-8N1. |
| Cabling | Profibus cable purple, 9-pin D-Sub connectors with 220 Ω termination at both ends. Modbus side: twisted pair on the GW-7552 RS-485 D+ / D- terminals. |
GW-7552 Hardware Configuration
The gateway has three elements that must match the PLC project before any GSD work begins:
- Profibus slave address (rotary switches MSB/LSB): Range 0–99. The DP master must allow this address; on the S7-300 the default "Reserved address for PROFIBUS master = address 2" still leaves 1, 3–126 free. Set, for example, address 3 (MSB = 0, LSB = 3).
- Profibus baud rate: Auto-detect up to 12 Mbps. The DP master baud rate is set in TIA Portal under Properties > PROFIBUS address > Transmission rate. Both sides must converge; if the master is set to 1.5 Mbps and the slave supports it, link quality improves with shielded, terminated cable.
- Modbus RTU side: Default 9600 bps, 8 data bits, no parity, 1 stop bit (9600-8N1). Configure with the ICP DAS GW-7552 Utility over the device micro-USB. Set the Modbus polling table: Function 04 (Read Input Registers), slave address 1, starting register 0x0001, quantity 1. This is where the gateway picks up the scaled temperature word.
Installing the GSD File in TIA Portal
- Open the TIA Portal project and select the S7-300 station in the project tree.
- Open Devices & Networks and double-click the CPU.
- Switch to Device View. Click on the DP interface (port X2) of the CPU.
- In the Hardware catalog pane on the right, click Options > Manage general station description files (GSD).
- Browse to the
ICP0AAA0.GSDfile and check the folder containing the bitmap. Confirm the import. - After the import succeeds, the catalog entry appears under Other field devices > PROFIBUS DP > Gateway > ICP DAS > GW-7552.
- Drag the gateway to the PROFIBUS DP master system graphic. TIA Portal prompts for a slave address — use the same address set on the rotary switches (3 in this example).
RUN but the slot mapping may differ. Always cross-check the GSD revision in Properties > Identification against the version printed on the device label.Slot Configuration and I/O Mapping
The GW-7552 GSD file ships a fixed modular slot map. The default module used to read a 16-bit integer is module index 1 ("8 Byte In / 0 Byte Out" or similar). The configured slot produces a contiguous block of input bytes mapped to the S7 process-image input area (PI).
| GSD module | Length | Default I-address range | Meaning |
|---|---|---|---|
| Mod 1 — "Read Modbus reg 0x0001" | 2 bytes In | PIW 256 / 258 / 264 / 272 / ... | Temperature (0.1 °C, INT16, two's complement) |
| Mod 2 — "Read Modbus reg 0x0002" | 2 bytes In | PIW 258 / 260 / 266 / 274 / ... | Optional 2nd word (status / type code) |
| Mod 3 — "Write single coil" | 2 bytes Out | PQW 256 / 258 / ... | Gateway control outputs (only required for write commands) |
Why addresses > ~84 do not work on this CPU
The S7-314C-2DP's process-image input partition for the integrated DP master has historically been allocated byte addresses 0–127. In some firmware revisions of the CPU, the configured start address for newly added DP slaves defaults to the next free pair in the high half of the PI range. The driver loaders in certain TIA Portal builds have exhibited a defect where the master only refreshes input bytes whose offset is < 84 within the process image. The symptom reported in the original case was:
"Driver had problems with this high addresses. After changing word input address from bytes 256 and 257 to smaller values — in my case 82 and 83 — the value updated."
To avoid wasting time on the same defect:
- In TIA Portal, click the DP slave > Properties > I/O addresses of the slot.
- Override the default start address. Pick the next free pair below 84 (e.g. PIW 82, PIW 84, PIW 86). Names like
IW_Temp_Raware useful for diagnostics. - Compile (Hardware > Compile) and download the hardware configuration only — the program is unaffected.
Confirm by re-reading Online & Diagnostics > Diagnostic status on the slave: the Slave is exchanging data LED must be green before continuing.
PLC Programming — Reading the Temperature
STL snippet (works in both Simatic Manager and TIA Portal STL view)
// Read the raw 0.1 °C INT from PIW 82
L PIW 82 // load 16-bit input word
ITD // convert INT to DINT (sign-extend)
DTR // convert DINT to REAL
L 1.000000e+001 // load divisor
/R // REAL division: temp_C := raw / 10.0
T MD 100 // store real to flag area
RND // optional: convert to engineering integer
T MW 104 // scaled value, e.g. 230 for 23.0 °C
This block matches the community suggestion in spirit but makes the scaling explicit. The original guidance was:
L PID 256 // load 32-bit input area
T MD 100 // transfer to flag area
Note that PID reads a 32-bit double-word, while the source word is only 16 bits. If the upstream register width is 16 bits, the high word read into the DINT contains the next input word — usually status, not temperature. Prefer PIW plus explicit ITD sign-extension for INT16 sources.
SCL block in TIA Portal
FUNCTION_BLOCK FB1000 "ModbusTempScale"
VAR
RawTemp : INT; // from PIW 82, 0.1 °C units
EngTempReal : REAL; // engineering value, °C
EngTempInt : INT; // rounded, °C
END_VAR
BEGIN
RawTemp := WORD_TO_INT("IW_Temp_Raw");
EngTempReal := INT_TO_REAL(RawTemp) / 10.0;
EngTempInt := REAL_TO_INT(EngTempReal);
// Latch outputs to global data block for HMI / recipe use
"dbTemp".Raw := RawTemp;
"dbTemp".Celsius := EngTempReal;
"dbTemp".CelsiusR := EngTempInt;
END_FUNCTION_BLOCK
Call FB1000 once per OB1 cycle. With a 16-bit INT source the maximum representable reading is ±3276.7 °C, comfortably above any practical 1TE module's full-scale range (M-2018 covers -100 °C to +1370 °C, type K).
Ladder Logic Equivalent (Step 7 V5 / TIA Portal LAD)
NETWORK 1 -- Read raw temperature word
PIW 82 ----[ MOVE ]---- MW 100 (raw INT 0.1 °C)
NETWORK 2 -- Convert INT to REAL
MW 100 ----[ ITD ]----- MD 102 (DINT)
MD 102 ----[ DTR ]----- MD 106 (REAL)
NETWORK 3 -- Divide by 10.0
MD 106 ----[ /R ]---- MD 114 (REAL °C)
MD 114 ----[ ROUND ]--- MW 120 (INT °C)
Data Scaling — Why the Reading Is Ten Times High
Modbus temperature modules standardise on a 16-bit signed integer where 1 LSB = 0.1 °C. The raw register content of the M-2018 with a 23.0 °C input is therefore 230. The same convention is used by ICP DAS M-2000 series, M-2018, M-2018C, M-2019, M-2024, M-2026, M-2028, and most third-party units. The register map for the M-2018 is:
| Register (Modbus 4xxxx) | Type | Content |
|---|---|---|
| 0x0000 | R | Module type / 0x2018 (M-2018), 0x2018 (M-2018C), 0x2019 (M-2019) |
| 0x0001 | R | Temperature value in 0.1 °C units, signed INT16, range -1000 to +13700 for type K |
| 0x0002 | R | Thermocouple type / fault code (0 = OK, non-zero = open TC, out-of-range) |
| 0x0003 | R | CJC temperature (cold-junction compensation, 0.1 °C units) |
Therefore, if the watch table shows 230 at 23.0 °C, the math is correct, the data is correct, and only the engineering-units step is missing. Division by 10 is the standard practice. The OPC / HMI layer can either subscribe to the scaled REAL value in the data block or perform the same divide internally.
Verification with Watch Table
- Open Online & Diagnostics > Watch tables in TIA Portal. Create a new watch table named
wtModbus. - Add the following entries:
IW_Temp_Raw(PIW 82),dbTemp.Raw,dbTemp.Celsius,dbTemp.CelsiusR. - Toggle the gateway power briefly; the watch table should show the raw word following the actual temperature within one Profibus cycle (typ. 1–10 ms at 1.5 Mbps).
- Heat the TC junction with a hot air gun or apply a 100 Ω precision resistor at the input for an RTD module. Confirm that the reading tracks the source within the module's specified accuracy (M-2018: ±0.2 °C + 0.2 % of reading, type K).
DATA+ / DATA- lines.Diagnostics and Troubleshooting Matrix
| Symptom | Likely cause | Fix |
|---|---|---|
Gateway LED is green, PLC SF off, but PIW reads 0 |
GSD slot not selected or module index does not include the polled Modbus register | Re-import the GSD, drag the correct module to the slot, recompile HW |
| PIW reads 16#FFFF (–1 in INT) and does not change | Modbus slave address / baud / parity mismatch, or 1TE module not powered | Use GW-7552 Utility > Modbus Diagnostic to poll manually; verify the 1TE unit is on 9600-8N1 |
| PIW shows correct reading, MW shows 0 | STL ladder does not transfer PIW → MW, or the OB1 cycle is in STOP | Watch OB1 in Single-step with PIW 82 monitored; confirm the MOVE executes |
| PIW at default address 256/257 reads random / stale values | Defect in master driver: input bytes above ~84 are not refreshed | Override the slot's start address to < 84 (e.g. PIW 82) |
| Value is 10× actual temperature | Modbus scaling is 0.1 °C per LSB; division by 10 missing | Insert /R 10.0 after DTR, as shown above |
| Reading drifts by 1–2 LSB every cycle | Modbus scan is asynchronous to Profibus cycle; the GW-7552 latches each new poll | Acceptable; this is normal gateway behaviour. Add low-pass filter if a clean HMI display is needed |
Profibus BF lamp on, gateway RUN flashing |
Different baud rate, address conflict with another slave, or broken cable | Recheck the rotary switches and TIA Portal baud; measure termination resistance (≈110 Ω between pins 3 and 8 with both ends terminated) |
| Modbus error counter in GW-7552 utility ticks up | RS-485 polarity inverted, missing 120 Ω on the Modbus bus, or noise from VFD cabling | Swap D+ / D-, add 120 Ω at one end of the Modbus trunk, route away from drives |
Edge Cases and Field-Proven Caveats
- Negative temperatures. A reading of –3276.7 °C corresponds to INT16 = –32767. Verify that the configured PIW start address lands on a word boundary and that the partner word is not another Modbus register (e.g. status). When the I/O pair is misaligned, the high byte is the next register's low byte, corrupting the sign.
- Endianness. Modbus RTU is big-endian. The GW-7552 swaps to little-endian (Intel) on the Profibus side to match S7 PIW. If the reading is always 256× the expected value, the GSD slot was configured in byte pairs the wrong way round — typically caused by selecting a 1-byte module when the upstream register is 16 bits. Re-select the 2-byte input module.
-
Watchdog. The S7-300 CPU raises
SFif the Profibus slave goes intoclearstate. With the GW-7552 this happens when Modbus retries are exhausted. The CPU fault buffer records "DP slave failure" plus the configured diagnosis. Add a 100 msOB82time-stamping routine so faults are logged in chronological order. - Multiple Modbus slaves. The GW-7552 supports a polling table of up to 12 Modbus commands. Each command must be placed in a separate GSD module, in the same DP slave, to keep the I/O map contiguous. Plan the I/O address plan before importing the GSD to avoid hand-renumbering every address.
- Redundancy. The S7-314C-2DP does not support Profibus HSR / MRP. For redundant designs, a second GW-7552 on a different DP master is the only path; the S7-300 family does not include a redundant DP master.
- Firmware mismatch. If you replace a GW-7552 with one of a different firmware revision, re-import the matching GSD file. Older gateway firmware (≤ 1.0) uses a 4-byte-in / 4-byte-out module, while firmware ≥ 1.2 uses 2-byte modules per command. Mixing them causes "module does not match GSD" errors during DP parameterisation.
- Compliance with EMC. Profibus cable must be run in a separate tray from VFD output cables, with at least 200 mm clearance. If the cabinet is shared, use a grounded separator plate. This is enforced by the IEC 61784-1 EMC guidance for CP 3/2 class installations.
Performance Notes
At 1.5 Mbps Profibus with a single GW-7552 in the segment, the typical end-to-end latency from a TC event on the 1TE module to the S7 PIW is:
- Modbus RTU poll: 0.5 ms (8 bytes at 9600 bps, plus inter-frame 3.5 char times).
- Gateway buffering: 0.4–1.0 ms (FIFO 1 cycle).
- Profibus cycle: 1–5 ms (depends on bus configuration and Ti/To times).
- S7-300 OB1 update: ≤ 10 ms for typical programs.
Worst-case end-to-end: ~20 ms. For 99 % of process control loops (heating, slow ramp, OEE display) this is irrelevant. For a 50 ms motion loop, do not use the GW-7552 path — wire the thermocouple to a TM131 or use an SM 331 directly.
Reference Procedure Summary
- Set the GW-7552 Profibus slave address (rotary switches) and Modbus polling table (utility).
- Install the GSD file in TIA Portal; drag the gateway to the DP master system.
- Select the 2-byte input module that matches the polled Modbus register (0x0001).
- Override the start address to PIW < 84 to avoid the master driver defect.
- Add a data block with three tags (Raw, Celsius, CelsiusR) and an FB to scale the reading.
- Call the FB from OB1, place on watch table, verify scaling and sign.
Why does my watch table show 230 when the temperature is 23.0 °C?
Modbus 1TE modules return temperature in 0.1 °C units. A reading of 230 corresponds to 23.0 °C. Divide the raw INT by 10.0 (after converting to REAL) to recover the engineering value.
How do I avoid the input address defect on the S7-314C-2DP?
Set the GW-7552 input slot's start address below 84, for example PIW 82, then recompile the hardware. Addresses above 84 may fail to refresh on certain TIA Portal / CPU firmware combinations.
Do I need STEP 7 V5.5, or is TIA Portal enough?
Both work. TIA Portal V15.1 or later supports the S7-300 family fully. The original L PID 256 / T MD 100 snippet is STL and is valid in TIA Portal's STL view as well. For long-term maintenance, prefer an SCL FB called from OB1.
What is the right Modbus function code for reading the temperature?
Function 04 (Read Input Registers), starting address 0x0001, quantity 1. Configure this in the GW-7552 utility's polling table. The S7 program never sees the Modbus side — it only addresses the gateway's Profibus slot.
Can I read more than one 1TE module on the same gateway?
Yes. The GW-7552 supports up to 12 Modbus commands. Add a separate GSD module per command, place them in adjacent slots, and reserve a contiguous I/O range in the S7 process image. Plan the address range before importing the GSD to avoid renumbering.
What if the Profibus BF LED comes on but the gateway shows RUN?
The GW-7552 is exchanging data, but the S7 master has lost the frame. Check the address rotary switches match the project, verify termination (≈110 Ω across pins 3 and 8 with both ends on), and confirm the baud rate is identical on both sides.
How fast does the temperature update in the PLC?
Typical end-to-end latency is 5–20 ms at 1.5 Mbps Profibus with one gateway. The dominant components are the Modbus RTU poll at 9600 bps and the Profibus cycle time. This is suitable for process loops but not for high-speed motion.