How-to
Configuring WinCC Professional Modbus TCP tags to read a device
Short answer
You never build a Modbus request in WinCC Professional. Add the WinCC RT Professional device, create a connection on the Modicon Modbus TCP/IP driver, create an external tag for the register, and bind an I/O field to it — runtime polls automatically. Modbus TCP is not Modbus RTU: TCP frames carry an MBAP header and no CRC, so an RS-485 slave needs a Modbus TCP-to-RTU gateway, not a passive adapter.
On this page
You never build a Modbus frame in WinCC Professional. The Modicon Modbus TCP/IP communication driver generates each request, matches the reply, decodes the registers and reports the communication errors; your work is configuration: add the runtime device, create a connection to the server, create one external tag per register, set its acquisition cycle, and bind an I/O field to the tag. Runtime polls the tag on its own — a send button has nothing to send. The driver name says Modicon, but the connection speaks standard Modbus TCP to any server, so the Ethernet simulator connects directly. The RS-485 microcontroller does not: RTU frames carry a CRC and no MBAP header, TCP frames carry an MBAP header and no CRC, so that device belongs behind a Modbus TCP-to-RTU gateway rather than a passive adapter.
No button sends the request #
An external tag is a runtime variable tied to one address on one configured connection. The I/O field displays it and writes it only when you enable input; creating a new data type in the project maps no register and attaches no field, because area, address and binding are three separate settings and all three must exist.
Modbus defines a client that asks and a server that answers. WinCC is the client, so the simulator must run in server mode — one left in client mode answers nothing regardless of tag settings. The direction is not symmetric: when a PLC is the Modbus master reading an HMI as slave, that arrangement fails for its own reasons, which why a PLC Modbus master read returns nothing from an HMI works through.
Before typing any address, get the device's register map: address convention, access rights, numeric representation, scale factor, and word order for values spanning two registers. A reply that arrives with an unexpected value is an addressing or interpretation fault, not a broken connection, and no script repairs either.
Read one holding register in seven steps #
The steps below are written against WinCC Professional V12; the same structure carries into later versions that still list Modicon Modbus TCP/IP for RT Professional. Run them on an isolated bench network with the simulator, never against a production controller.
- Start the simulator as a server. On the second PC, put the Modbus simulator in server mode, load one holding register with a recognizable value such as 1701, and note its address convention and data format.
- Prove the service, not just the network. Put both PCs on one reachable network, have the simulator listen on the standard Modbus TCP port 502 unless its documentation names another, and allow that port through any firewall on the simulator PC. A successful ping proves IP reachability and nothing more.
- Add the runtime device. In the project, add the WinCC RT Professional device; the PC-station form behaves the same way for this driver.
- Create the connection. In the runtime device's connection settings, pick Modicon Modbus TCP/IP, enter the simulator PC's IP address and port, and set the unit identifier to the value the simulator expects — 1 and 255 are the usual ones.
- Create the external tag. One tag on that connection: 16-bit unsigned integer for a plain holding register, the holding-register area served by function code 03, the address from step 1, and a 1 s acquisition cycle.
- Bind the field read-only. Place an I/O field on the screen, connect its process value to the tag, and leave it output-only for this test so a read exercise cannot write anything anywhere.
- Start runtime and watch. The field shows 1701 within about a second; change the value in the simulator and the field follows. That is the entire mechanism.
Why the CRC byte array cannot ride on TCP #
The array sketched in the question — device address, function code, start address, register count, CRC — is a correct Modbus RTU frame and the wrong payload for this driver. Count the bytes for reading two holding registers from offset 0:
- RTU over RS-485: 1 (address) + 1 (function) + 2 (start) + 2 (count) + 2 (CRC) = 8 bytes.
- Modbus TCP: 7 (MBAP header — 2 transaction ID, 2 protocol ID which is zero for Modbus, 2 length, 1 unit ID) + 1 (function) + 2 (start) + 2 (count) = 12 bytes.
The length field counts the unit ID plus the five request bytes after the header: 1 + 5 = 6. The unit ID does the job the address byte did, and the CRC is gone because TCP already delivers bytes in order and checked. A server handed those 8 RTU bytes on a TCP socket reads the opening bytes as header fields, the request lands misaligned, and it is refused or dropped.
None of this is yours to assemble. The driver stamps a fresh transaction ID on every request and matches it on the reply; devices that mishandle that pairing surface as Modbus TCP MBAP request-ID errors on the wire, not as tag configuration faults.
Bringing the RS-485 device in through a gateway #
RS-485 is an electrical interface, Modbus RTU is the framing that rides it, and Modbus TCP is different framing on TCP. A level converter or a plain DB9 cable changes no bytes, so the microcontroller cannot appear on the Ethernet driver through one.
| Path from WinCC Professional | What it needs | The decision |
|---|---|---|
| Simulator or any Modbus TCP server | Modicon Modbus TCP/IP connection | Configure directly; one connection per server IP |
| RS-485 Modbus RTU slave | Modbus TCP-to-RTU gateway | The gateway ends TCP, frames RTU with the CRC, answers by unit ID |
| RS-485 network on a serial card in the PC | A serial protocol path the installed edition documents, or an OPC server that owns the port | The Modbus TCP/IP driver cannot use the card |
| RS-485 through a custom DLL | You own polling, timeouts, retries, threading | Last resort, after the gateway |
Two gateway behaviors exist, and you must know which one you bought. A transparent gateway routes by unit identifier, so the tag's unit ID selects the serial slave; a gateway with its own configured poll list does internal mapping and often expects one fixed unit ID from the client.
The DB9 between gateway and slave still earns a wiring check against both manuals: the shell shape fixes neither pin assignment, signal polarity, common reference nor termination. On the bench, measure the healthy slaves' update intervals before and during a deliberate disconnection of one slave, because retries on a dead device eat the poll budget. If the RTU side then stays silent, work through fixing HMI Modbus device no response over RS-485 before touching a single tag.
OPC is an alternative layer, not a requirement: choose it when a server's RTU driver and its per-device status earn their place, and reading raw PLC tags as diagnostics in WinCC over OPC shows what that status looks like on screen.
When the number is wrong rather than missing #
A connection that returns a wrong number is almost always one of three tag faults:
- Address convention. Maps in the Modicon style number holding registers from 40001 while the wire offset starts at 0, so a documented 40010 is offset 40010 - 40001 = 9. Enter the offset in the notation the driver's address field expects; reading offset 10 fetches register 40011 — a stable neighbor value that looks like success.
- Scaling. A raw 1234 with a documented factor of 0.1 displays 1234 × 0.1 = 123.4 once the factor is applied. A field showing 1234 is missing the factor, not the data.
- Word order. A 32-bit value spanning two registers, read with the words swapped, comes back wrapped or absurd. Fix the order in the tag.
Prove one register you can change by hand in the simulator before building screens on top of the mapping.
The decision for each path #
For the Ethernet exercise: one Modicon Modbus TCP/IP connection straight to the simulator, one 16-bit external tag at a 1 s cycle, one output-only I/O field — no button, no script, no new data type. For production with the microcontroller: buy the Modbus TCP-to-RTU gateway, the transparent kind that routes by unit ID, and treat the healthy-slave update measurement as the acceptance test. For wrong numbers: correct the tag's offset, scale or word order, and leave the connection, the driver and the screens alone.
Questions asked
Can one Modicon Modbus TCP/IP connection read several devices?
Not with one connection: the driver maps a connection to one server at one IP address, so a second server gets its own connection. The exception is a transparent Modbus TCP-to-RTU gateway, where a single connection reaches the gateway and the unit identifier picks which serial slave behind it answers.
How do I write to a register from the screen?
Configure the I/O field for input as well as output and connect it to the same external tag; when an operator commits an entry, runtime writes the value to that register over the same connection. Prove the read path first and keep the very first test screen output-only, because an early mistake in the address would otherwise command the device.
The tag reads fine but the number is absurdly large. Is the connection bad?
No, the connection is working; the interpretation is not. A 32-bit value spread across two registers, read with the words swapped, comes back wrapped or enormous, and a scale factor applied at the wrong end shifts the decimal point. Correct word order and scaling in the tag definition and leave the connection alone.
What acquisition cycle should the first test tag use?
One second. That is fast enough to watch the field follow a change you make in the simulator and slow enough that a failed poll floods nothing. Move a tag to continuous acquisition only when a script must read it reliably while no screen displays it; tags that only appear on screens can stay tied to screen use.