WinCC Flexible 2008 to Siemens S5 PLC: AS511 and RK512 Setup

David Krause14 min read
HMI / SCADASiemensTutorial / 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: Integrating WinCC Flexible 2008 with Legacy S5 Controllers

Many production lines built between the mid-1980s and late 1990s remain in service with SIMATIC S5 CPUs (S5-90U, S5-95U, S5-100U, S5-115U, S5-135U, S5-155U, S5-155H). When the operator interface (HMI) has to be replaced or extended, SIMATIC WinCC flexible 2008 remains a viable HMI/SCADA choice because the runtime supports both the SIMATIC S5 AS511 and SIMATIC S5 RK512 channel drivers out of the box. This article documents the two physical paths that connect a WinCC flexible Runtime PC to a SIMATIC S5, the protocol trade-offs (AS511, 3964R, RK512), the byte-order conversion needed between S5 and S7/PC addressing, and the verification steps that confirm a stable tag exchange.

Two viable paths exist between the PC and the S5:

  1. Via the CPU programming port using the AS511 protocol over a TTY 20 mA current-loop interface, requiring an active TTY-to-RS232 converter on the PC side.
  2. Via an S5 communications processor (CP544, 6ES5 544-3UB11 in the example) using RK512 (with 3964R framing) over RS232 or TTY.

Both paths are supported natively by WinCC flexible 2008 as long as the correct channel driver is selected in the project. If the application needs data to be visible from more than one PC, an OPC server or an S5-to-S7 gateway must be inserted between the S5 and the WinCC flexible Runtime.

Windows 10 compatibility: Service Pack 5 for SIMATIC WinCC flexible 2008 added support for Windows 10 (64-bit) installation. Any deployment on a current PC must use SP5 or later; earlier service packs are limited to Windows XP/Windows 7. See the official delivery release note at Service Pack 5 for SIMATIC WinCC flexible 2008.

Prerequisites

Item Specification / Notes
HMI software SIMATIC WinCC flexible 2008, Service Pack 5 or later (for Windows 10 64-bit)
HMI runtime WinCC flexible Runtime (PC-based) on the operator station
S5 CPU S5-90U / S5-95U / S5-100U / S5-115U / S5-135U / S5-155U (CPU 9x through CPU 948)
Path A — CP544 6ES5 544-3UB11 (RS232 and TTY variants exist); check the hardware variant against the available backplane slot
Path B — Programming port 15-pin TTY 20 mA connector on the S5 CPU front
Cable / converter — Path A Standard 9-pin RS232 null-modem cable if CP544 is configured for RS232
Cable / converter — Path B Active TTY 20 mA ↔ RS232 converter (passive adapters do not work)
OPC DA 2.0 server (optional) Used when multiple HMI clients read the same S5 over the single AS511 port

System Architecture and Path Selection

The selection between the two paths is dictated by hardware already present on the S5 and by the data volume that has to move between the controller and the HMI.

Path A: CP544 with RK512 / 3964R

A CP544 (6ES5 544-3UB11) is a communications processor that occupies one slot in the S5 central rack (CR) or expansion rack (ER). It offloads the serial protocol handling from the CPU and supports RK512 (with 3964R as the underlying transport) on either RS232 (V.24) or TTY 20 mA. RK512 allows:

  • Reading and writing S5 data blocks (DB, DX) by absolute address.
  • Coordinated access from multiple partners (one master, several slaves by CP number).
  • Higher throughput than AS511 (up to 19200 bit/s in practice on a CP544).

Path A is recommended whenever an S5 already has a CP544 installed and wired to a SCADA system, or whenever the application reads or writes more than a handful of tags.

Path B: Programming port with AS511

Every S5 CPU exposes a programming port on the front panel (15-pin sub-D, TTY 20 mA current loop). The AS511 protocol was originally intended for STEP 5 programming but is sufficient for low-volume HMI polling. The drawback is that only one master can own the port at a time, so the same port cannot be shared between WinCC flexible Runtime and STEP 5 simultaneously.

Path B is preferred when no CP is installed, when the existing CP is reserved for another system, or when the operator station is a single PC that polls a small tag count.

Hardware Wiring

Path A — CP544 to PC (RS232)

If the CP544 variant supports an RS232 interface, the connection is a standard serial extension. Typical pin-out (refer to the CP544 manual for the exact variant):

CP544 (25-pin or 9-pin male) Signal PC COM (9-pin male)
2 TxD (transmit data) 3
3 RxD (receive data) 2
7 Signal ground 5
4 / 5 RTS / CTS (if hardware handshaking used) 7 / 8
20 DTR (if hardware handshaking used) 4
CP544 variants differ. The 6ES5 544-3UB11 front panel exposes two sub-D connectors; confirm whether the active channel is RS232 (V.24) or TTY 20 mA before purchasing a cable. The S5-115U / S5-135U / S5-155U manuals in the SIMATIC S5 documentation set describe the connector pin-out and the DIP-switch settings that select RS232 vs TTY.

Path B — S5 programming port to PC (TTY ↔ RS232)

The 15-pin programming port on an S5 CPU is a TTY 20 mA current-loop interface. A PC COM port is RS232 (±12 V levels). A passive level-shifter does not work; an active current-loop ↔ RS232 converter is mandatory. Typical active converters (third-party industrial products) accept the S5 15-pin plug on one side and provide a 9-pin RS232 male or female on the other, with onboard 20 mA sourcing.

The S5 side expects the following signals (refer to the CPU manual):

  • Pin 1 — +20 mA transmit loop (out)
  • Pin 14 — -20 mA transmit loop (return)
  • Pin 2 — +20 mA receive loop (in)
  • Pin 15 — -20 mA receive loop (return)
  • Pin 8 — Shield / functional ground

Connect the shield at one end only (typically the converter end) to avoid ground loops.

Protocol Selection in WinCC Flexible 2008

Open the WinCC flexible ES, create or open the HMI project, and edit the Connections node under the target PC station. Add a new connection and choose the appropriate driver:

WinCC flexible driver S5 protocol Physical port on PC Required hardware on S5
SIMATIC S5 AS511 AS511 (point-to-point, 9600 bit/s) COM1..COMn, RS232 after converter CPU programming port
SIMATIC S5 RK512 (3964R) RK512 over 3964R COM1..COMn, RS232 CP544 (or CP5431) configured as RK512 partner

For the CP544 path, set the CP parameters using STEP 5 COM 544 / COM 115 / COM 135/155 (depending on the S5 family) so that:

  • Protocol = RK512
  • Interface = V.24 (RS232) or TTY, depending on the CP544 variant and the cable used
  • Baud rate = 9600 or 19200 (both ends must match)
  • Parity = Even (default for 3964R)
  • CP number = the logical CP address the HMI will reference

Tag Address Mapping (S5 Byte Order to WinCC / S7 Byte Order)

S5 stores a 16-bit word as high byte : low byte (Motorola / big-endian), with the left byte (DL) before the right byte (DR). WinCC flexible and the S7 world store a 16-bit word as low byte : high byte (Intel / little-endian). Every word read from the S5 must therefore be byte-swapped before it is interpreted as an S7 word. The WinCC flexible driver handles this swap automatically when the tag is entered in the DBW form, but the underlying byte mapping is:

S5 element S5 meaning WinCC / S7 byte WinCC / S7 word
DW 0 Word 0 (16 bit) — DBW 0
DL 0 Left (high) byte of DW 0 DBB 0 —
DR 0 Right (low) byte of DW 0 DBB 1 —
DW 1 Word 1 (16 bit) — DBW 2
DL 1 Left (high) byte of DW 1 DBB 2 —
DR 1 Right (low) byte of DW 1 DBB 3 —
DW n Word n — DBW (2·n)

The general rule for WinCC tag entry is:

  • S5 DW n ↔ WinCC DBW (2·n) in the same data block.
  • S5 DL n ↔ WinCC DBB (2·n)
  • S5 DR n ↔ WinCC DBB (2·n + 1)

This byte swap applies regardless of whether the path is AS511 or RK512; it is a property of the S5 storage model.

Entering a WinCC tag as DBW 0 and assuming it equals S5 DW 0 is correct only after the driver applies the swap. If you see a value that is the byte-swapped complement (e.g. 0x1234 shows as 0x3412 in the HMI), the swap is missing — typically the tag has been entered as raw bytes rather than as a word.

Creating a Tag in WinCC Flexible 2008

  1. Open the project in WinCC flexible ES, expand Communication > Tags.
  2. Double-click the connection that was created earlier (AS511 or RK512).
  3. Add a tag, name (e.g. Motor_Speed), data type INT or WORD.
  4. Set Address to the appropriate S5 address using the WinCC syntax, for example:
    • DB 10, DW 0 — 16-bit word from data block 10, byte-swapped automatically.
    • DB 10, DR 0 — single byte (the low byte of DW 0).
  5. Select the acquisition mode (cyclic on poll, or change-driven).
  6. Compile and download (or transfer) to the WinCC flexible Runtime target.

OPC Server Integration for Multiple Clients

Both AS511 and the CP544 serial port allow only a single master at a time. If two operator stations (or one HMI plus a historian) need to read the S5, an OPC DA 2.0 server that owns the serial port is required. The WinCC flexible Runtime then acts as an OPC client and reads tags from that server instead of the COM port directly.

Architecture:

SIMATIC S5 ──(TTY/RS232)──> OPC DA Server (PC #1)
                                  │
                                  ├──> WinCC flexible Runtime (PC #1 or #2)
                                  ├──> WinCC flexible Runtime (PC #3)
                                  └──> Historian / third-party SCADA

Steps to point WinCC flexible at an existing OPC server:

  1. Confirm the OPC server is installed and running locally or on a remote node (DCOM configured).
  2. In WinCC flexible ES, on the PC station, open OPC > OPC Connections.
  3. Browse for the OPC DA 2.0 server (it will appear with its ProgID, e.g. a vendor-specific S5 server).
  4. Select the items you want to expose; their addresses follow the same S5 byte-swap convention described above.
  5. Compile and download.
An OPC server already used by a legacy InTouch or similar SCADA on the same PC can be reused. The S5 port is occupied by the OPC server; WinCC flexible does not open its own COM channel in that case.

Third-Party S5-to-S7 Gateway Alternative

When the application has to feed both a WinCC flexible Runtime and a modern S7-1200 / S7-1500 controller, a dedicated S5 gateway can be inserted between the S5 programming port and the WinCC PC. The gateway presents itself as an S7 MPI/PROFINET device on one side and an AS511 / RK512 master on the other. WinCC flexible continues to use its SIMATIC S5 AS511 or SIMATIC S5 RK512 driver without modification; the gateway handles the physical conversion. Address mapping inside the gateway follows the same S5-to-S7 byte-swap rules given above.

Commissioning and Verification

  1. Power on the S5, confirm the CPU is in RUN or RUN-P (the AS511 port requires the CPU not to be in STOP-only mode on most CPU types).
  2. Confirm the CP544 is in RUN with no SF (red) LED if Path A is used; the CP should have the RK512 firmware loaded and the configured CP number should be visible on the front display.
  3. Start the WinCC flexible Runtime on the PC.
  4. Open Tools > Tag Simulation or a small diagnostic screen that displays a known tag (e.g. DB 10, DW 0).
  5. Use STEP 5 to write a recognizable pattern (e.g. DW 0 = KH 1234) into the same data block, then read it back in the HMI. The displayed value must equal 0x1234, not 0x3412 — confirming the byte-swap is correct.
  6. Force the S5 to toggle a bit (e.g. D 0.0) and verify the cyclic update rate in the WinCC tag. AS511 typically polls at 1–2 Hz on a 9600 bit/s link; RK512 / 3964R can sustain faster rates up to ~10 Hz depending on block size.
  7. Check the WinCC flexible Runtime event log for channel status messages. A successful connection shows periodic polling acknowledgements; a failure shows No connection to PLC or Timeout events.

Troubleshooting Matrix

Symptom Likely cause Diagnostic step Remediation
Runtime shows No connection to PLC immediately after start Wrong COM port selected in WinCC flexible; cable not connected; CPU not in RUN Windows Device Manager → Ports; check CPU mode LED; ping the COM port with a terminal program (e.g. PUTTY) at 9600/8E1 Correct the COM port, fix cable, switch CPU to RUN-P
Connection establishes but values are reversed (e.g. 0x1234 shows as 0x3412) Tag entered as raw bytes rather than as a word, or driver swap disabled Re-enter tag as DW or DBW; do not enter DL and DR separately for word values Use the word address (DBW) form so the driver applies the byte-swap
Intermittent timeouts at high polling rate AS511 is single-master and busy; PC COM buffer overflow; ground loop noise Reduce acquisition cycle to 1 s; check cable shield termination; monitor CP544 SF LED Use CP544 path, increase baud rate, replace cable
CP544 path: SF LED steady red CP not configured for RK512; CP number mismatch between STEP 5 and WinCC Open STEP 5 COM configuration; verify CP number and protocol Reload CP parameters with correct RK512 / CP number
WinCC flexible installs but will not start on Windows 10 Service Pack earlier than SP5 Help → About in WinCC flexible ES Apply SP5; see delivery release note
Two PCs cannot read the S5 simultaneously AS511 / CP544 serial port is single-master Try the connection from both PCs; the second fails Insert an OPC DA server that owns the serial port, or use a gateway
Values freeze after a few hours RS232 line driver timeout; PC power management disabling COM Windows Device Manager → Power Management → uncheck "Allow the computer to turn off this device to save power" Disable selective suspend on the COM port; replace converter

Field-Proven Cautions

  • WinCC flexible 2008 Service Pack levels below SP5 are not certified for Windows 10. If the operator PC has been refreshed to Windows 10, an upgrade to SP5 is mandatory; otherwise the runtime will refuse to install or will fault on launch.
  • The S5 programming port and the CP544 port are mutually exclusive at any one time on the same CPU; they cannot both be addressed simultaneously by different masters in the same session.
  • Always ground the cable shield on one side only (the converter or the PC chassis) to prevent ground loops that cause intermittent data corruption.
  • S5 data block numbers above 255 require STEP 5 V6 or later and a CPU that supports extended DB ranges (e.g. CPU 948). Confirm the CPU firmware revision if your tags reference DB 256+.
  • When migrating from an existing SCADA (InTouch, WinCC, etc.) that already polls the S5, do not open a second COM channel on the same port. Configure WinCC flexible Runtime to read from the OPC server that already owns the port, instead.

FAQ

Can WinCC flexible 2008 talk directly to an S5 CPU without a CP?

Yes. WinCC flexible 2008 supports the SIMATIC S5 AS511 driver, which connects to the CPU programming port (TTY 20 mA) through an active TTY-to-RS232 converter. No CP is required for this path.

What is the difference between AS511, 3964R, and RK512 in this context?

AS511 is a point-to-point programming protocol used directly on the CPU programming port. 3964R is a lower-level framing/transport protocol with handshaking. RK512 is a higher-level data-block read/write protocol that runs on top of 3964R and is implemented on S5 communications processors such as the CP544 (6ES5 544-3UB11). WinCC flexible exposes both as selectable drivers: SIMATIC S5 AS511 and SIMATIC S5 RK512.

Why do my S5 word values appear byte-swapped in WinCC flexible?

S5 stores 16-bit words as high-byte-first (Motorola order), while WinCC flexible and S7 use low-byte-first (Intel order). The WinCC flexible driver performs the byte swap automatically when the tag is entered as a word (DW / DBW). Entering the tag as DL and DR bytes disables that swap, producing the reversed value.

Can two operator stations read the same S5 at the same time?

Not directly through the same serial port — both AS511 and the CP544 serial channel are single-master. Install an OPC DA 2.0 server that owns the port and let both WinCC flexible runtimes act as OPC clients, or use an S5-to-S7 gateway.

Does WinCC flexible 2008 run on Windows 10?

Service Pack 5 added support for Windows 10 (64-bit). Earlier service packs are limited to Windows XP / Windows 7. Always install SP5 or later for any modern PC; see the official Service Pack 5 delivery release note.

Do I need a TTY 20 mA converter for the CP544 path?

Only if the CP544 variant you have is the TTY model. Many CP544 variants expose an RS232 (V.24) interface, in which case a standard serial null-modem cable connects directly to the PC. Check the part number suffix (for example 6ES5 544-3UB11) and the CP manual to confirm which physical interface is active.

Back to blog