STEP 5 Program Transfer Downloading and Uploading S5 PLC Programs

David Krause13 min read
HMI ProgrammingSiemensTutorial / 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

STEP 5 Program Transfer: Downloading and Uploading S5 PLC Programs

This reference documents the complete engineering workflow for transferring automation programs between a programmer/PC and a Siemens SIMATIC S5 PLC using STEP 5 software (V7.x family). It covers the AS511 point-to-point protocol, the TTY current-loop interface, PG cable part numbers, project structure, online/offline operations, and the verification steps required to confirm a successful download or upload. The guide is engineered to support commissioning engineers maintaining legacy S5 systems, with explicit attention to S5-90U, S5-95U, S5-100U, S5-115U, S5-135U, and S5-155U CPU variants.

Field note: STEP 5 is a legacy programming environment. While the procedures described here are deterministic, modern plant-availability targets increasingly push maintenance teams toward migration to STEP 7 / TIA Portal with a PROFIBUS DP or Ethernet gateway. Retain the AS511 workflow for emergency maintenance only and capture the latest PLC backup as part of the procedure.

1. Overview of the STEP 5 Transfer Workflow

The SIMATIC S5 family uses a single-master, point-to-point serial link for program transfer. The PC or programming device (PG) acts as master and initiates all block read/write operations. Two flow directions exist:

  • Download (PC → PLC): Transfers a project archive, individual blocks (OB, PB, SB, FB, FX, DB, DX), or a complete program image from the STEP 5 file system into PLC user memory.
  • Upload (PLC → PC): Reads the live program image from the PLC back to the PG for backup, comparison, or offline editing.

Both operations run over the AS511 protocol layered on a 20 mA current-loop physical interface (TTY). The PG cable includes an integrated TTY-to-RS232 converter for connection to a standard PC serial port, or a USB-to-TTY adapter for modern hardware without a native COM port.

2. Prerequisites

2.1 Hardware Requirements

Component Specification Notes
Siemens PG 7xx or PC RS-232 (COM) port, or USB + adapter Original PG 720/740/750/770 have integrated AS511
STEP 5 software V7.20 or higher (V7.23 is final release) Install on Windows XP/2000; V7.20–V7.23 supports up to Win7 32-bit with compatibility mode
AS511 cable (PC side) 6ES5 734-1BD20 or 6ES5 734-1BF20 20 mA TTY loop with integrated RS-232 converter; length ≤ 16 m
AS511 cable (USB side) 6ES5 734-1CD10 or third-party USB-TTY Required when no COM port is available
Target PLC S5-90U / 95U / 100U / 115U / 135U / 155U AS511 is not available on S5-100U CPU 100/102/103 without the CP module

2.2 Software Requirements

  • STEP 5 base package (STL, CSF, LAD editors)
  • COM port driver (for native RS-232: Windows COM1–COM4; for USB: vendor driver plus virtual COM mapping)
  • Sufficient disk space for project archive (typical S5-115U project: 200 KB to 4 MB)
  • PLC password (if active block protection is enabled)

2.3 Linkage Topology

The reference linkage is:

PG (or PC + USB-TTY) --- [6ES5 734-1xxx] --- [S5 PLC front AS511 port]
   RS-232 (or USB)         TTY 20 mA loop         15-pin D-sub AG S5

3. AS511 Interface Architecture

3.1 Physical Layer (TTY 20 mA Current Loop)

AS511 is a passive-TTY, full-duplex, optically-isolated current loop operating at 20 mA. The PG cable includes an onboard 24 V supply and a current-source transmitter; the PLC side provides the loop return. Maximum reliable cable length is 16 m at 9 600 baud. The default transfer rate is 9 600 bit/s with 8 data bits, even parity, and 1 stop bit (8E1).

3.2 Protocol Stack

The AS511 frame uses Siemens proprietary framing with the following layers:

Layer Function Detail
Physical TTY 20 mA Galvanic isolation, ≤ 16 m
Data link Start/stop protocol 9 600 baud, 8E1, no flow control
Frame STX/ETX wrapping Header byte 0x02, terminator 0x03, 16-bit BCC
Application Block read/write commands Read block, write block, delete block, status query, password challenge

3.3 Pinout (PG Cable 6ES5 734-1BD20)

PLC Pin (15-pin D-sub) Signal Direction
1 +20 mA source PG → PLC
2 −20 mA source PG → PLC
8 +20 mA return PLC → PG
15 −20 mA return PLC → PG
4, 5, 9–14 n.c. —
Shield Cable shield PG-end ground

4. PG/PC Hardware Configuration

4.1 Native COM Port Setup (Windows XP/2000)

  1. Open Control Panel → System → Hardware → Device Manager → Ports (COM & LPT).
  2. Select the communications port (e.g., COM1) and confirm base I/O and IRQ do not conflict with the PG card.
  3. Set the port to 9 600, 8, Even, 1, None in Properties → Port Settings → Advanced. Disable FIFO if available.

4.2 USB-to-TTY Adapter Setup (Windows 7/10)

  1. Install the vendor driver (e.g., FTDI VCP driver for 6ES5 734-1CD10 or compatible).
  2. Verify the virtual COM port number (Device Manager) and bind it to a stable COM port (e.g., COM3).
  3. Set the same 9 600 8E1 framing. Keep FIFO buffers at the lowest setting to reduce latency.
Critical: When the FIFO is enabled at default depth, AS511 frequently suffers from mid-frame character loss and produces NAK/timeout errors during block writes. Always force FIFO off for the AS511 COM port.

5. STEP 5 Software Configuration

5.1 Selecting the Online Interface

  1. Launch STEP 5 V7.x.
  2. Open the project (or start with an empty container for upload).
  3. Choose PLC → Online → Set Interface from the menu bar.
  4. In the interface dialog, select AS511 as the active protocol.
  5. Set the COM port to match the physical connection (COM1, COM2, or mapped virtual port).
  6. Click Test. The status line should report Connection OK within 2 s.

5.2 CPU Type Selection

STEP 5 must match the CPU model of the target PLC to allocate address space and block memory correctly. Confirm the CPU type in PLC → Set CPU Type:

PLC CPU identifier RAM max Block types
S5-90U CPU 102 4 KB OB, PB, SB
S5-95U CPU 100/102 16 KB OB, PB, SB, FB, DB
S5-100U CPU 100/102/103 20 KB OB, PB, SB, FB, DB
S5-115U CPU 941–944 96 KB OB, PB, SB, FB, FX, DB, DX
S5-135U CPU 928/928B/948 256 KB Full set incl. FB/DB up to 255
S5-155U CPU 946/947 1.4 MB Full set, multi-CPU

6. Download Procedure (PC → PLC)

6.1 Sequence

  1. Place the PLC in STOP mode via the mode selector on the CPU front panel. The red STOP LED must be lit.
  2. In STEP 5, open the source project that contains the program image.
  3. Confirm CPU type matches (see 5.2).
  4. Choose PLC → Download (or press the toolbar download icon).
  5. The dialog Download Blocks lists every block present in the project. Use Select All for a complete transfer, or check only the changed blocks for an incremental update.
  6. Click Start. STEP 5 will perform an erase → write → verify cycle for each block.
  7. Monitor the status line for transfer progress. A 4 KB block typically completes in 6 s at 9 600 baud.
  8. When the dialog reports Download finished, no errors, the transfer is complete.

6.2 What Happens Inside the PLC

During download the PLC:

  1. Erases the existing block from battery-backed RAM or EPROM submodule.
  2. Receives the new block in 32-byte segments.
  3. Performs a 16-bit checksum (BCC) comparison on every segment.
  4. On success, sets the block valid bit and updates the block address list (BAL).

If the PLC has an EPROM submodule (e.g., 6ES5 375-1LA15) for permanent storage, blocks must be written to EPROM and then copied into RAM at restart. STEP 5 will detect the EPROM memory type and prompt for the appropriate procedure.

Caution: A download to an EPROM-protected PLC erases the EPROM. If the EPROM has been programmed with a UV-erasable window, the only way to re-burn it is to physically expose the chip to UV light for 20–30 minutes. Plan backup and re-program time accordingly.

7. Upload Procedure (PLC → PC)

7.1 Sequence

  1. Open a new, empty STEP 5 project (or the target project).
  2. Verify CPU type is set correctly to match the connected PLC.
  3. Choose PLC → Upload.
  4. STEP 5 reads the block address list (BAL) from the PLC and enumerates every valid block.
  5. Confirm the block selection and press Start.
  6. The status line will show each block name, type, and transfer progress.
  7. On completion, STEP 5 writes the blocks to the local project directory as *.S5D archives.

7.2 Block-by-Block Upload (Selective)

For diagnostic or comparison purposes, individual blocks may be uploaded by:

  1. PLC → Online → Block List
  2. Highlight the desired block
  3. Right-click → Read Block to PG

This is the safest method when only a specific FB or DB has been modified in the field and a comparison is needed against the master archive.

8. Program File Management

8.1 STEP 5 File Types

Extension Description Use
*.S5D Sequential project archive Single-file project; preferred for transfer and backup
*.PRJ STEP 5 project container Multi-block workspace
*.STL Statement list source Source code text export
*.SEQ Sequential function chart Step/transition program
*.INI STEP 5 configuration Interface and project settings

8.2 Backing Up Before Download

Always upload the existing program before any planned download. Save the upload as a timestamped S5D file:

D:\S5_Archive\PressLine_115U_CPU944_20240617_1432.S5D

Keep at least three historical revisions per PLC in a controlled directory with read-only attributes.

9. Communication Diagnostics

9.1 Status Indicators on the CPU

LED State Meaning
RUN Green, steady CPU executing program
RUN Green, flashing CPU in start-up / restart
STOP Red, steady CPU in stop; download permitted
STOP Red, flashing CPU stop with error; check ISTACK
BASP Red, steady Outputs disabled (mode selector in RUN but BASP active)
PEU Yellow I/O peripheral error (relevant after restart)

9.2 STEP 5 Connection Test

The Test Connection dialog returns one of the following status codes:

Code Meaning Action
0x00 Connection established, PLC in STOP/RUN as expected Proceed
0x10 Timeout, no response Check cable, COM port, PLC power
0x20 Checksum error Replace cable; check for EMI
0x30 PLC in RUN, write request rejected Switch PLC to STOP
0x40 Password active Enter password or clear via CPU
0x50 Block not present Verify CPU type and block address
0xFF Hardware fault on PG interface Reboot PG, reseat cable

9.3 ISTACK and BSTACK Inspection

For deeper diagnostics after a failed download, read the Interrupt Stack (ISTACK) and Block Stack (BSTACK) from the PLC:

  1. Online → CPU Functions → Read ISTACK
  2. Online → CPU Functions → Read BSTACK

The ISTACK indicates the instruction pointer at the time of the last fault, the cause code, and the accumulator contents. Common fault codes encountered after a botched download are QVZ (timeout, OB 26) and ADF (address error, OB 22).

10. Troubleshooting Matrix

Symptom Likely Cause Remediation
Connection test fails, no LED activity on PLC Cable not seated, wrong port Reseat 15-pin connector; verify PLC AS511 port enabled
Connection test fails, PG reports timeout COM port mismatch or wrong baud Confirm 9 600 8E1; verify virtual COM port number
Download starts then halts at first block CPU type mismatch in STEP 5 Set correct CPU type and retry
Download reports checksum error mid-transfer FIFO enabled on COM port or EMI Disable FIFO; route cable away from VFD cables
Upload missing blocks Blocks in EPROM, not RAM Switch to upload from EPROM if supported, or copy blocks to RAM first
PLC reports "Block not allowed" Block number collision with system FB Use block number ≥ 200 for user code
After download, PLC stays in STOP with BASP CPU restart sequence incomplete Perform overall reset (MRES) and restart (RUN)
STEP 5 hangs on "Initialize interface" PG has another serial resource open Close any terminal emulator; release the COM port
Password prompt appears unexpectedly Block protection was set previously Enter password or perform CPU overall reset

11. Verification After Transfer

After every download or upload, perform the following verification cycle:

  1. Block list comparison: Choose PLC → Online → Block List and compare the runtime BAL with the project BAL. Block counts and types must match exactly.
  2. Checksum verification: Use PLC → Online → Verify Block for each block. STEP 5 reads the block back and computes a checksum. Any mismatch is flagged.
  3. Status query: Use PLC → Online → Status to read CPU status, operating mode, and error word (USTACK / Fehlerwort). Address any error code before continuing.
  4. Restart sequence: With the PLC still in STOP, perform a manual restart by switching the mode selector: STOP → RUN. Monitor the front LEDs for clean restart (no flashing red).
  5. Functional test: Run the program in single-scan or restricted mode where supported. Verify process I/O behaves as expected before returning the PLC to automatic (RUN) mode.

12. Legacy Considerations and Modern Alternatives

12.1 When to Keep STEP 5

STEP 5 V7.23 remains the only environment that natively programs S5 CPUs. Where the S5 PLC drives a long-life production asset and the controller is functioning reliably, the AS511 workflow is the most direct and lowest-risk maintenance path.

12.2 Migration Options

Where migration is desired, the following options exist, listed from least to most invasive:

  • Co-existence gateway: Use a PROFIBUS DP-to-ET 200 converter or an S5-to-PROFINET gateway (e.g., Helmholz DP/PN Coupler) to expose S5 I/O to a STEP 7 PLC. The S5 remains in service; the STEP 7 controller handles new logic.
  • Code conversion: Tools such as S5 to S7 Converter translate STEP 5 sources to STEP 7 STL/FBD. Manual review is mandatory; standard FB conversions rarely work one-to-one.
  • Full migration: Replace S5 with S7-300/400 or S7-1500 plus a S5 migration rack. This is the most expensive but the most future-proof option.

12.3 Driver Availability

STEP 5 V7.23 will not install on a 64-bit Windows version. Recommended platforms for field engineering:

  • Windows XP SP3 32-bit (native, fully supported)
  • Windows 7 32-bit (compatibility mode, signed driver required)
  • Windows 7/10 64-bit with virtualized Windows XP (VirtualBox or VMWare Workstation, USB passthrough for the AS511 cable)
Recommendation: Maintain a dedicated engineering laptop with Windows XP and a native RS-232 port. USB-to-RS232 adapters and virtual machines both introduce intermittent faults during long block transfers. The dedicated XP machine remains the field-proven combination.

13. Field Commissioning Checklist

Use the following checklist for every S5 service visit that involves program transfer:

  1. Confirm PLC type, CPU type, and firmware version (read from front plate).
  2. Upload current program; save to dated S5D archive.
  3. Verify the upload checksum against any local master (if present).
  4. Place PLC in STOP, download revised project, verify each block.
  5. Perform step-by-step restart with output inhibit engaged.
  6. Run a controlled test sequence with operator supervision.
  7. Return PLC to automatic (RUN) and hand over to operations.
  8. Sign off on the engineering log with archive filenames and timestamps.

This procedure is deterministic, repeatable, and aligned with the documented STEP 5 AS511 link. The same workflow applies to S5-95U through S5-155U with the appropriate CPU type selection in STEP 5.

FAQ

What cable is required to connect a PC to a Siemens S5 PLC for STEP 5 program transfer?

The standard cable is 6ES5 734-1BD20 (with integrated TTY 20 mA to RS-232 converter) or 6ES5 734-1CD10 for USB-equipped PCs. Maximum length is 16 m, baud rate is 9 600 with 8E1 framing.

Can STEP 5 V7.20 or V7.23 run on Windows 10 64-bit?

No native installation. Use a Windows XP SP3 or Windows 7 32-bit host, or run STEP 5 inside a Windows XP virtual machine with USB passthrough for the AS511 cable.

Why does the connection test report a timeout even with the correct cable?

Verify three things: the COM port number matches STEP 5, the FIFO buffer on the COM port is disabled, and the PLC is in STOP (some firmwares reject the test command in RUN). A timeout code of 0x10 with the AS511 protocol points to one of these three conditions in over 90 percent of field cases.

How do I transfer a program from a PG to the PLC and from the PLC to a PC using STEP 5?

Use PLC → Download for PC-to-PLC (PLC must be in STOP) and PLC → Upload for PLC-to-PC. The same AS511 interface is used for both directions, and the same block list dialog controls the operation.

What is the difference between uploading from RAM and from EPROM on an S5-115U?

Uploading from RAM returns the live running program (any temporary edits, current DB values cleared). Uploading from EPROM returns the burned-in master image. Use the RAM upload for change capture and the EPROM upload for archive verification after a cold start.

Back to blog