Fix STEP5 v7.x CPU 928B COM1 Serial Communication Timeouts
Online monitoring of a Siemens SIMATIC S5-135U CPU 928B with STEP5 v7.x frequently aborts with a "PLC timeout" fault when the programming device is a portable PC. The same workstation communicates reliably when replaced by a desktop, indicating that the failure is not a STEP5 software bug or a CPU 928B firmware defect, but a link-layer problem on the COM1 port and/or the 20 mA TTY current-loop interface. This reference documents the root cause, the function of every keyword in s5@@@@AS.ini, the recommended cable and grounding practice, and the field-proven procedure to eliminate the timeout.
1. Problem Statement
With STEP5 v7.0 (or v7.2x) loaded on a laptop, the following symptoms are reported when targeting a CPU 928B over the serial AS511 link:
- Online Monitor and Status functions open successfully, block headers are read, and the first few program-scan refreshes are displayed.
- After a variable period (typically 5 to 60 seconds) the dialog freezes and STEP5 raises a timeout message such as "PLC timeout", "No response from AS", or "Communication error".
- The same
s5@@@@AS.inisection, the same cable, and the same STEP5 project work without timeout on a desktop PC connected to the identical 928B. - Replacing the laptop eliminates the fault. The COM1 UART on the laptop is the only variable that changes between the two test cases.
The user attempted to compensate for the laptop COM1 behaviour by editing s5@@@@AS.ini, but the parameter set shipped with STEP5 v7.x for the S5-135U/928B target is fixed at the values shown below; arbitrary tuning of RESPONSE_TIME, CHAR_TIME, BLOCK_TIME or SIO_SPEED does not restore the link and may make it worse.
2. Affected Hardware and Software
| Component | Version / Order Number | Notes |
|---|---|---|
| PLC CPU | 6ES5 928-3UA12 / 6ES5 928-3UB12 / 6ES5 928-3UB21 | CPU 928B for S5-135U and S5-155U; integral TTY 20 mA interface on the front panel |
| Backplane | 6ES5 135-3 / 6ES5 155-3 | Central or expanded rack |
| Programming software | STEP5 v7.0, v7.2, v7.23 (DOS), v7.4 (Windows) | Last official release line for the S5 family |
| Serial port on PG | COM1, base address 0x3F8, IRQ 4 | Standard IBM-PC 16550 UART |
| Interface converter | Siemens 6ES5 734-1BD20 (RS-232 ↔ TTY) or compatible active converter | Active current-source, 24 V isolated |
| Cable | Shielded, twisted pair, ≤ 15 m for TTY current loop | Beldin 8162 or equivalent; industrial-grade preferred |
| Configuration file |
S5_<USER>\s5@@@@AS.ini in the STEP5 install directory |
Per-port [COMx] section is read on driver initialisation |
Refer to the official S5-135U CPU 928B Programming Guide (PDF) for the architecture of the 928B module and the pinout of the 25-pin front-panel TTY socket.
3. Root Cause Analysis
The laptop COM1 timeout is not a single fault but a stack of four interacting root causes, each of which must be ruled out before a successful link can be maintained.
3.1 Floating ground on a battery-powered PG
A desktop PC is connected to mains earth through its PSU. A laptop running on battery or on a 2-pin Europlug charger has no low-impedance path to earth. The 20 mA TTY loop references its transmit and receive pairs to the CPU chassis, which in turn is bonded to the cubicle protective earth (PE). When the laptop chassis is floating, the common-mode voltage between the PC UART ground and the 928B ground can rise to 30-80 V at the switching edges of the converter, pulling the optocoupler inside the CPU 928B into saturation and corrupting the incoming byte. STEP5 detects the bad frame and reports timeout after the receive buffer is starved.
3.2 EMI from the LCD backlight inverter
The 928B serial link runs at 9600 bit/s, which is already at the upper limit of what an opto-isolated 20 mA loop can sustain over more than a few metres. The high-frequency common-mode noise radiated by a laptop's CCFL or LED backlight inverter, by its USB hubs, and by the Wi-Fi antenna can couple into the floating laptop chassis and add jitter to the UART clock of the built-in COM1. The result is intermittent frame errors that look like timeouts to STEP5 even though the bytes technically arrived.
3.3 UART timing on PC-Card (PCMCIA) or docking-station COM ports
Many business laptops do not have a true 16550 on the rear I/O. The COM1 at 0x3F8/IRQ4 is often bridged through a CardBus, ExpressCard, USB-C dock, or a docking-station chip. Each of these bridges adds 1-3 ms of latency to interrupt delivery. STEP5's RESPONSE_TIME=2000 ms is calculated from the 16550 interrupt at 1.8432 MHz; if the interrupt is delayed by the bridge, the AS511 driver concludes the CPU is not responding and posts a timeout.
3.4 Cable shield not bonded at both ends
Field-fabricated TTY cables (such as the "Four Starts" cable referenced in the case) frequently leave the shield floating at one end, which is correct for RS-232 voltage but wrong for a 20 mA current loop that must be referenced to PE at the PLC end. Without a solid PE bond, the loop has no defined return path and the converter's internal current source cannot maintain the 20 mA.
4. s5@@@@AS.ini Parameter Reference
The STEP5 v7.x AS511 driver reads a per-port section from s5@@@@AS.ini on startup. The section that controls COM1 on the 928B is:
[COM1:]
IO=3f8
IRQ=4
BAUD=9600
STOPBITS=2
PARITY=EVEN
RESPONSE_TIME=2000
CHAR_TIME=15000
BLOCK_LENGTH=256
BLOCK_TIME=200
TIME_AFTER_BREAK=0
SIO_SPEED=SLOW
| Keyword | Value | Unit | Function |
|---|---|---|---|
IO |
3F8 |
hex | UART base I/O port. 3F8 = COM1, 2F8 = COM2, 3E8 = COM3, 2E8 = COM4. Must match BIOS-assigned address. |
IRQ |
4 |
decimal | Hardware interrupt number. COM1 = 4, COM2 = 3, COM3 = 4 (shared with COM1), COM4 = 3. Some docking stations reassign; verify in Device Manager. |
BAUD |
9600 |
bit/s | AS511 link rate. Do not change. The 928B does not support any other rate on its front-panel TTY port. |
STOPBITS |
2 |
bits | Number of stop bits. Required for the 928B front-panel interface. |
PARITY |
EVEN |
— | Required parity setting. NONE will produce silent timeout. |
RESPONSE_TIME |
2000 |
ms | Maximum time the driver waits for the first byte of a response from the AS. Below 1500 ms the link is unreliable; above 4000 ms the user perceives the link as dead. |
CHAR_TIME |
15000 |
µs | Inter-character timeout. At 9600 bit/s, 10 bits per character = 1.04 ms; the value 15000 µs is 14 character times, the correct inter-frame guard. |
BLOCK_LENGTH |
256 |
bytes | Maximum AS511 block payload. Do not change; the 928B will reject larger blocks. |
BLOCK_TIME |
200 |
ms | Maximum time the driver waits for the complete block to arrive. |
TIME_AFTER_BREAK |
0 |
ms | Quiet time after a transmit break. 0 is correct for the 928B; do not increase. |
SIO_SPEED |
SLOW |
— | Forces the driver to use polled I/O on slow UARTs. Set to SLOW for any PCMCIA/CardBus/USB-bridged COM port. FAST relies on the 16550 FIFO and assumes a true 16550 with native IRQ delivery. |
RESPONSE_TIME only as a last resort, and only on the single value cited by Siemens for the specific SIO_SPEED setting. SIO_SPEED=SLOW already gives you a 2000 ms response budget; setting FAST with a bridged UART will make the timeout worse, not better.5. COM1 Hardware Configuration
Before touching s5@@@@AS.ini, confirm that Windows (or the DOS extender under STEP5 v7.0) actually owns a real 16550 at 0x3F8/IRQ4.
- Boot the laptop into Device Manager → Ports (COM & LPT) → Communications Port (COM1) → Properties → Resources. Verify I/O range
03F8-03FFand IRQ04. If the values are different, editIO=andIRQ=to match. - Open Advanced and set the FIFO buffer to Level 1 (lowest). The default "High" level buffers 14 bytes, which interacts badly with
BLOCK_LENGTH=256because the 16550 watermark can swallow characters from a partial block. - Disable power management on the COM port: in Power Management, uncheck "Allow the computer to turn off this device to save power". The Windows USB selective suspend for serial bridges is the single most common cause of mid-session timeouts on laptops.
- Disable the laptop's Wi-Fi, Bluetooth, and any 3G/4G modem for the duration of the online session. These share IRQ and DMA resources with the COM1 bridge on most docking chipsets.
- Set the BIOS COM1 option to Enabled, 3F8/IRQ4 and disable Auto mode; the BIOS auto-assignment will re-route the port on the next warm-boot.
6. TTY Cable and Grounding Requirements
The front-panel socket on the CPU 928B is a 25-pin female sub-D carrying a passive 20 mA current loop. The pin assignment per the official CPU 928B Programming Guide is:
| Pin | Signal | Direction |
|---|---|---|
| 1 | Shield / PE | Chassis earth bond |
| 9 | TTY_Tx+ | PLC → converter |
| 11 | TTY_Tx− | PLC → converter |
| 15 | TTY_Rx+ | Converter → PLC |
| 16 | TTY_Rx− | Converter → PLC |
| 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 17-25 | Reserved / not connected | — |
The cable shield must be bonded to pin 1 at the PLC end and to the converter shell at the converter end. A two-end shield bond is acceptable for a 20 mA loop because the loop is current-mode and therefore tolerant of small ground-potential differences up to ~5 V. Bonding only one end will allow the cable to act as an antenna for the LCD inverter noise described in §3.2.
6.1 Earth-bonding the laptop
Connect a short (≤ 1 m) earthing strap from the laptop chassis screw or the converter's PE stud to the protective-earth terminal of the PLC power supply. Use a 4 mm² green/yellow wire with a ring lug at each end. If the cubicle has no accessible PE bar, use the same mains socket that feeds the PLC; the green/yellow pin of a Schuko socket is the easiest reference. A floating laptop is the dominant root cause of "stable on desktop, unstable on laptop" — bonding the chassis to PE normally restores the link without changing a single byte of s5@@@@AS.ini.
6.2 Cable length and routing
- Maximum length: 15 m for the 20 mA current loop at 9600 bit/s.
- Minimum bend radius: 10 × outer diameter.
- Route the cable at least 200 mm away from VFD motor cables, contactor coils, and 24 V DC switched-mode supplies.
- Do not run the TTY cable in the same trunking as 230/400 V AC; cross at 90° if crossing is unavoidable.
7. Step-by-Step Resolution Procedure
-
Identify the COM1 hardware. Run
msinfo32on the laptop, expand Components → Ports, and write down the UART type. A genuine 16550A, a PCI Express bridge (e.g. OXPCIe952), and a USB-C dock (e.g. FTDI FT232H) require differentSIO_SPEEDvalues. - Disable selective suspend and power management on the COM1 node as described in §5.
- Bond the laptop chassis to PE with a 4 mm² earthing strap to the PLC supply PE bar.
- Verify the cable shield is bonded at both ends and that the shield is not shorted to any signal pin. Measure with a multimeter: pin 1 to shield = 0 Ω, pin 1 to pin 9 = > 10 MΩ.
- Re-seat the converter in the 25-pin socket and tighten the jack screws. A loose converter is the second most common cause of intermittent timeout.
-
Confirm
s5@@@@AS.inistill matches the [COM1:] block shown in §4. Do not edit any keyword; the file shipped with STEP5 v7.0 is correct for the 928B. -
Set
SIO_SPEED=SLOWif the UART is on PCMCIA, CardBus, ExpressCard, or a USB bridge.FASTis reserved for native 16550A on a desktop southbridge. - Launch STEP5, open the online session, and keep the laptop on mains power for the entire monitoring window. Battery-only operation reintroduces ground floating on most laptops.
8. Verification and Diagnostic Tests
After the eight steps above, run the following checks. All four must pass before the session is declared stable.
-
Loopback test with the converter alone: disconnect the cable from the CPU 928B, install the loopback plug supplied with the 232/TTY converter, and run
mode com1:96,E,8,2from a Windows command prompt. Type characters; they must echo. This confirms that COM1 + converter + 16550 FIFO are healthy. - STEP5 "Online → Test AS": the test must report "AS responds correctly" and must do so repeatedly when re-run at one-second intervals for 60 seconds. If even one repetition fails, the fault is still on the link and not in STEP5.
- Continuous monitor for 30 minutes: open a large FB and click Monitor ON. The block must refresh without freezing. A clean run of 30 minutes corresponds to > 17 million AS511 frames at 1 s scan; this is the empirical floor for production use.
- Check the 928B diagnostic LEDs: the BASP LED must remain off (output disable is asserted by the STOP command, not by the serial link), and the SF (system fault) LED must remain off. If SF lights during a STEP5 timeout, the problem is in the CPU firmware, not the cable.
For a third-party display or HMI that needs to talk to the same 928B, the Pro-face SIMATIC S5 CPU Direct Driver manual (PDF) documents the same AS511 frame format and the same 9600/E/8/2/P settings.
9. Advanced Diagnostics and Workarounds
9.1 Replacing the bridged COM1 with a USB-RS232 adapter
If the laptop's COM1 is bridged through a docking chip and the link still times out after bonding and SIO_SPEED=SLOW, use an industrial-grade USB-to-RS232 adapter based on the FTDI FT232R or the Moxa UPort 1110. Map the adapter to a free COM number (typically COM5 or COM7) and create a parallel section in s5@@@@AS.ini:
[COM5:]
IO=f6e0
IRQ=11
BAUD=9600
STOPBITS=2
PARITY=EVEN
RESPONSE_TIME=2000
CHAR_TIME=15000
BLOCK_LENGTH=256
BLOCK_TIME=200
TIME_AFTER_BREAK=0
SIO_SPEED=SLOW
Plug the 232/TTY converter into the USB-RS232 adapter, and start STEP5 with STEP5 /COM5 on the command line. The native FTDI FIFO reduces interrupt jitter, but you must set the FTDI latency timer to 1 ms with the FT_Prog utility, otherwise the AS511 driver will see the same delay the docking-station UART introduced.
9.2 Reducing the scan load on the COM1
If the timeout is observed only when a large FB is open in monitor, reduce the Cycle Time in the Monitor dialog from 1 s to 2 s. The 928B's serial handler is single-tasked; at 1 s it can be pre-empted by the OB1 cycle, and the driver interprets the gap as a timeout.
9.3 Caching STATUS instead of MONITOR
For long debugging sessions where live updates are not required, use Online → Status (F8) and let STEP5 take a static snapshot every 5 s. The Status path uses a single AS511 frame per refresh and never overruns the 256-byte BLOCK_LENGTH.
10. Troubleshooting Matrix
| Symptom | Likely Cause | Section | Corrective Action |
|---|---|---|---|
| Timeout within 5-10 s, random | Laptop chassis not bonded to PE | §3.1, §6.1 | Install 4 mm² earthing strap to PLC PE bar |
| Timeout within 30-60 s, cyclic | USB selective suspend on COM1 | §5 step 3 | Uncheck "Allow the computer to turn off this device" |
| Timeout only when large FB is open | Monitor scan pre-empts 928B OB1 | §9.2 | Set Monitor cycle to 2 s or use Status |
| Timeout only on battery power | Chassis floats when PSU is disconnected | §3.1 | Run laptop on mains, keep earthing strap |
| Works on desktop, fails on laptop | COM1 is on a docking/USB bridge | §3.3, §5 | Force SIO_SPEED=SLOW or use USB-RS232 + FTDI |
| Timeout appears after Windows update | Driver reset FIFO level | §5 step 2 | Set 16550 FIFO to level 1 |
| Timeout only when Wi-Fi is on | Shared IRQ and radiated EMI | §3.2 | Disable Wi-Fi/BT for the session |
| Timeout + SF LED on CPU 928B | CPU firmware fault, not a link issue | §8 step 4 | Read diagnostic buffer with PG, contact Siemens support |
Timeout with PARITY=NONE in AS.ini |
Wrong parity keyword | §4 | Restore PARITY=EVEN
|
11. Frequently Asked Questions
Why does STEP5 v7.x connect to a CPU 928B with the default s5@@@@AS.ini on a desktop PC but time out on a laptop?
The desktop is bonded to PE through its mains cord, giving the 20 mA TTY loop a defined return path. A laptop running on battery or on a 2-pin charger is floating; the resulting common-mode voltage corrupts incoming AS511 frames. Bond the laptop chassis to the PLC PE bar with a 4 mm² strap before changing any keyword in s5@@@@AS.ini.
Is it safe to change RESPONSE_TIME, CHAR_TIME, BLOCK_TIME, or SIO_SPEED in s5@@@@AS.ini?
No. The eleven keywords in the [COM1:] section form a single AS511 protocol set tuned for the 928B. Tweak RESPONSE_TIME only as a last resort and only by 500 ms increments. SIO_SPEED must be SLOW for any PCMCIA, CardBus, ExpressCard, or USB-bridged COM port; FAST requires a true 16550A on a desktop southbridge.
Can I connect the laptop's COM1 directly to the CPU 928B with a straight RS-232 cable?
No. The 928B front-panel port is a passive 20 mA current loop (TTY), not an RS-232 voltage port. A 232/TTY converter (Siemens 6ES5 734-1BD20 or equivalent) is mandatory. A direct RS-232 connection will not work and may damage the opto-isolator on the CPU module.
What baud rate and frame format must I use for the CPU 928B?
9600 bit/s, even parity, 8 data bits, 2 stop bits (9600/E/8/2). These are the only values the 928B front-panel TTY port accepts. Setting BAUD to any other rate, or PARITY to NONE, will produce a silent timeout with no bytes returned.
My timeout appeared after a Windows 10/11 cumulative update. What changed?
Cumulative updates frequently reset the COM port's 16550 FIFO buffer level and re-enable USB selective suspend. Open Device Manager → COM1 → Properties → Advanced, set the FIFO buffer to Level 1 (lowest), and in Power Management uncheck "Allow the computer to turn off this device to save power". The timeout normally disappears after the next STEP5 session is restarted.