1. Overview
The SIMATIC S7-200 CPU 226 with order number 6ES7216-2AD23-0XB0 is a compact PLC from the legacy S7-200 family, featuring two RS-485 communication ports (Port 0 and Port 1), 24 digital inputs, 16 digital outputs, and a removable EEPROM cartridge under a hinged access cover. This reference documents the field procedure used when a non-PLC engineer (a software consultant with no prior SIMATIC experience) must connect to a CPU 226 in a production environment, upload the user program, modify two constant values that were left incorrect by the original integrator, and download the corrected program back to the PLC. The two reported defects are:
- Defect 1: A speed-related limit is loaded as 50 instead of 500. The user is asked to set a speed in mm/s; the normal operating speed is 150–200 mm/s, but the PLC clamps the output to 50 mm/s. A single zero is missing in the high limit constant.
- Defect 2: The encoder input register holds raw pulse counts but is being displayed and used as millimetres. The integrator forgot to insert the divide-by-pulses_per_mm scaling instruction.
Both issues are pure constant or scaling defects, not logic defects, so the program can be corrected by an engineer who has never written ladder logic before, provided the upload/download workflow is followed exactly. The S7-200 is officially retired by Siemens and replaced by the S7-1200, but several hundred thousand units are still in service worldwide. The S7-200 System Manual, the CPU 226 data sheet, and STEP 7-Micro/WIN V4.0 SP9 remain the canonical references and are still available on the Siemens support portal.
2. Hardware Identification: CPU 226 6ES7216-2AD23-0XB0
Before any cable is connected, confirm the exact module variant. The S7-200 family has many CPU revisions and the cable, firmware, and software version constraints differ between them.
| Parameter | Value |
|---|---|
| Order Number (MLFB) | 6ES7216-2AD23-0XB0 |
| Family | SIMATIC S7-200 |
| CPU Type | CPU 226 (AC/DC/RLY variant) |
| Power Supply | 85–264 V AC, 47–63 Hz |
| Digital Inputs | 24 (24 V DC, sink/source selectable in groups of 8/8/8) |
| Digital Outputs | 16 relay outputs, 2 A per point |
| Analog I/O | None (digital-only CPU) |
| Program Memory | 16 Kbytes (8 K instructions typical) |
| Data Memory | 10 Kbytes |
| Retentive Area | Configured via Micro/WIN system block |
| High-Speed Counters | 6, max 30 kHz each (HSC0–HSC5) |
| Pulse Outputs | 2 (PTO/PWM, max 20 kHz) |
| Communication Ports | 2 × RS-485 (Port 0, Port 1), both electrically isolated, DB9 male |
| Expansion Port | 10-pin IDC under hinged cover on the right side (NOT a programming port) |
| EEPROM Cartridge | Removable, 6ES7291-8GE20-0XA0 (or compatible) |
| Programming Software | STEP 7-Micro/WIN V4.0 SP9 (last release for S7-200) |
| Default Port Address | Port 0 = 2, Port 1 = 1 (PPI default) |
| Transmission Rate | 9.6 kbaud, 19.2 kbaud, 187.5 kbaud (default PPI) |
3. Prerequisites
- A PC running Windows XP SP3, Windows 7 (32-bit), Windows 10 (32-bit) or a 32-bit Windows virtual machine. STEP 7-Micro/WIN V4.0 is a 16-bit application and does not run natively on 64-bit Windows without compatibility settings; a VM is the cleanest path on modern hardware.
- STEP 7-Micro/WIN V4.0 SP9 installed. Siemens distributed the final V4.0 SP9 build (released 2015, build 4.0.9.25) as a free update to existing license holders.
- A valid PPI protocol license. Micro/WIN ships with a 14-day demo license. For permanent use, a license key transferred from the licence stick to the PC is required. Without a key, the project can be uploaded, viewed, and re-downloaded, but it cannot be compiled and downloaded as a new project.
- A PC/PPI cable. Two official options exist:
- USB version: 6ES7901-3DB30-0XA0 (USB-to-RS485, isolated, powered from the PLC). This is the strongly recommended cable for any engineer without an RS-232 port on the PC.
- RS-232 version: 6ES7901-3CB30-0XA0 (DB9 RS-232 to RS-485, with a DIP switch bank for baud rate and PPI/freeport mode). Requires a real RS-232 port or a USB-to-RS-232 adapter.
- An identical, empty CPU 226 module to use as a test bed. This is non-negotiable. A "clean" module lets you practice the upload/download cycle and validates the cable and software installation before you ever touch the production PLC.
- A project folder on the laptop with date-stamped subfolders (e.g.
2024-11-22_line1_upload_originaland2024-11-22_line1_upload_after_fix) for binary backups.
4. Communication Port Identification
The CPU 226 has three physical connectors on its lower face. Knowing which is which is the single most common source of confusion for first-time users.
The two DB9 connectors on the left side of the module are functionally identical RS-485 ports. Either can be used for programming. The third connector, hidden under the small plastic cover on the right side, is the expansion port. It carries the backplane signals (5 V, GND, ribbon data) used by the EM (digital/analog expansion) modules and CP (communication processor) modules, but it is not a programming interface. Connecting a PC/PPI cable to the expansion port will not establish communication and in some cases may short the 5 V rail. This is the most common field error on first contact with the S7-200.
5. RS-485 Port Pinout (DB9 Male on the CPU)
The CPU 226 uses a male DB9 with the Siemens PPI pinout. The PC/PPI cable is keyed to fit only one way; if you are building a non-Siemens cable, follow this table exactly.
| Pin | Signal | Direction | Notes |
|---|---|---|---|
| 1 | Shield | — | Chassis ground; tie to PE on one end only |
| 2 | 24 V return (M) | Bidirectional | Used for cable-powered designs; not needed for PC/PPI |
| 3 | RS-485 B (D+) | Bidirectional | Non-inverting differential line |
| 4 | RTS (TTL) | From PLC to cable | 5 V TTL level used by PC/PPI cable to switch direction |
| 5 | 5 V common (GND) | — | Reference ground for the PC/PPI cable |
| 6 | +5 V (isolated) | From PLC to cable | Powers the PC/PPI cable electronics; do not load > 100 mA |
| 7 | +24 V | From PLC to cable | Optional 24 V rail for older PPI cables |
| 8 | RS-485 A (D−) | Bidirectional | Inverting differential line |
| 9 | NC | — | Reserved, do not connect |
The bus must be terminated at the two end nodes only with 120 Ω between pins 3 and 8. The CPU 226 has no built-in termination; the PC/PPI cable provides termination internally. If a multi-drop PPI network is in place, the chain ends are terminated and the PC/PPI cable must be removed or its termination disabled (DIP switch on the RS-232 version).
6. Cable Selection and Wiring
6.1 PC/PPI USB Cable (6ES7901-3DB30-0XA0) — recommended
The USB version is the easiest to obtain and the most reliable. It draws its 5 V from pin 6 of the PLC port, contains an isolated DC/DC converter, and presents itself to the PC as a virtual COM port. Driver: Siemens PC/PPI USB driver (S7USBXP.INF and friends), supplied on the CD that ships with the cable. Windows 10 and Windows 11 will accept the driver once the INF is pointed to manually through Device Manager. The cable enumerates as USB Serial Port (COMx) in Device Manager.
6.2 PC/PPI RS-232 Cable (6ES7901-3CB30-0XA0)
The RS-232 version is set with five DIP switches on the housing. The factory default (all OFF) is PPI master, 9.6 kbaud, address 0, local echo off. For a one-to-one connection to a CPU 226 set the DIPs as follows:
| DIP | Function | Setting | Notes |
|---|---|---|---|
| 1 | PPI/Freeport | OFF | OFF selects PPI |
| 2 | Local echo | OFF | OFF disables echo |
| 3 | Baud bit 1 | OFF | OFF/OFF = 9.6 kbaud (safest) |
| 4 | Baud bit 2 | OFF | |
| 5 | Terminator | ON | ON enables internal 120 Ω termination (only at end of bus) |
6.3 Third-party USB-to-RS485 adapters
Generic USB-to-RS485 adapters (FTDI FT232 + MAX485, CH340 + MAX485) can be made to work, but two caveats apply:
- Most adapters tie A and B across a 120 Ω resistor and have no isolated 5 V. They are not hot-pluggable and can latch the PLC bus if the ground potential differs. Power down the PLC before inserting or removing the adapter.
- The adapter must be set to half-duplex, auto-direction mode. The S7-200 does not toggle RTS; the cable has to switch on the differential edge. If the adapter has an RTS pin, tie it high to enable TX.
For a one-off production rescue, buy the Siemens USB cable. The price difference is small compared with the cost of a corrupted upload.
7. STEP 7-Micro/WIN Installation and PG/PC Interface Setup
- Install Micro/WIN V4.0 SP9. Accept the default installation path. Restart when prompted.
- Launch Micro/WIN. The first-run wizard asks for the language, the CPU family (S7-200), and the communication interface. Select PC/PPI cable (PPI).
- Open the Set PG/PC Interface dialog (left navigation pane, "Communications" or via Tools > Options > Set PG/PC Interface). For the USB cable, select
PC/PPI cable (PPI) > USBand the COM port assigned by the driver. - Click Properties > PPI tab. Set:
- Transmission rate: 9.6 kbaud (default, robust on a noisy factory floor). If communication fails, drop to this even if the project normally runs at 19.2 kbaud.
- Highest station address: 31 (default PPI range).
- Multiple master network: OFF for a one-to-one link.
- Click OK twice. The interface is now bound to the project.
8. Establishing Communication with the CPU
- Power the CPU 226. Mode switch should be in STOP for the first upload. The SF/DIAG LED may be red; this is normal until the program is verified.
- Plug the PC/PPI cable into Port 0 (the lower DB9) of the CPU. The PC/PPI cable LED should illuminate.
- In Micro/WIN, click the Communications icon (the top icon in the navigation bar, two PCs with a waveform).
- Double-click the Double-click to refresh field on the right. Micro/WIN broadcasts a PPI search frame and lists all CPUs it finds. The CPU 226 should appear as
192.168.0.1… no, sorry, S7-200 uses PPI addresses, not IP. It will appear asPPI address 2(Port 0 default) orPPI address 1(Port 1 default). - Select the address and click OK. The status bar should show Connected.
9. Program Upload — the Safe, Read-Only Operation
In Siemens Micro/WIN terminology:
| Action | Micro/WIN button | Direction | Effect on the PLC |
|---|---|---|---|
| Read the program from the PLC into the project | Upload | PLC → PC | None. The PLC program is unchanged. |
| Write the project program to the PLC | Download | PC → PLC | Replaces the PLC program. Irreversible without a backup. |
The terms are easy to confuse. Always treat Upload as the safe, non-destructive operation, and Download as the destructive operation that overwrites the live PLC.
- With the CPU connected and in STOP, click File > Upload from PLC (or the up-arrow icon in the toolbar). Micro/WIN shows a progress bar.
- When the upload completes, the project tree populates with the program blocks: Main (OB1), SBR_0..n (subroutines), INT_0..n (interrupts), and the Data Block.
-
Immediately choose File > Save As, change the project name to
line1_original_2024-11-22.mwp, and store it in the date-stamped backup folder. Also export the project to a read-only archive copy. - Use File > Export to write a portable copy (ASCII or
.awlSTL export) for offline review on a machine that does not have Micro/WIN installed.
Repeat steps 1–4 for the second CPU 226. Store each program in a separate, clearly labelled subfolder.
10. Inspecting the Uploaded Program — Locating the Two Bugs
Open Main (OB1). The CPU 226 default view is ladder logic (LAD), which is the most readable view for a software engineer. The two defects manifest as follows:
10.1 Speed limit constant (50 instead of 500)
Scan the network that loads the speed setpoint into a comparison. A typical Siemens pattern is:
Network 4 — Clamp speed to high limit
LD SM0.0
MOVW VW200, VW300 // copy setpoint to work register
<I VW300, +50 // compare to high limit (BUG: should be 500)
MOVW +50, VW300 // replace with limit (BUG: should be 500)
<I +150, VW300 // compare to low limit
NOT
…
The integer literal +50 appears in at least two instructions in this network. Change both occurrences to +500. Do not change the low-limit comparison; that is a different constant.
10.2 Encoder scaling
Find the network that handles the HSC (high-speed counter) value. A common buggy pattern is:
Network 7 — Display position in mm
LD SM0.0
MOVW HC0, VW400 // copy HSC0 raw count to position register
… // (BUG: missing division by pulses_per_mm)
The fix is to insert a divide block. For a 1000-pulse-per-revolution encoder driving a 10 mm/rev leadscrew, pulses_per_mm = 100. The correct pattern is:
Network 7 — Display position in mm
LD SM0.0
MOVW HC0, VW400 // copy HSC0 raw count
DIV +100, VW400 // scale to mm (NEW LINE)
Drag a Divide instruction from the Math Functions toolbox into the network. Type the literal in the IN2 box. Confirm that the destination is the same word used downstream (here VW400).
HC0…HC5. These are 32-bit double-word registers. MOVW (move word) will copy only the low 16 bits, which truncates the value above 32 767 pulses. Use MOVD (move double-word) if the count can exceed 16 bits. The 6ES7216-2AD23-0XB0 HSC max rate is 30 kHz, so 32 767 pulses pass in just over 1 second at full speed.11. Compile and Download the Corrected Program
- Click PLC > Compile (or Ctrl+F9). Micro/WIN performs a syntax check. The status bar must show Compile successful (0 errors, 0 warnings). If a warning appears about an unused network, leave it — the original integrator may have left it intentionally.
- Save the corrected project as
line1_fixed_2024-11-22.mwp. Keep the original file untouched in the backup folder. - Verify the CPU is in STOP mode. Confirm by looking at the mode switch LED: green RUN = RUN, yellow = STOP, red SF/DIAG = fault.
- Click File > Download to PLC. Micro/WIN prompts whether to overwrite the existing program — click Yes only if the upload backup is confirmed on disk.
- The download progress bar should complete without error. Micro/WIN will then prompt whether to place the CPU in RUN. Click No — put the machine in RUN from the HMI or via the mode switch after the operator has acknowledged.
- Power-cycle the CPU to clear the SF/DIAG LED and confirm the new constants take effect.
12. Verification
After the download, perform these verification steps before handing the line back to production:
- Program identity check: From Micro/WIN, click PLC > Compare. The on-line project must match the offline project. Any difference must be reconciled.
- Force check: Open Debug > Program Status. Toggle the setpoint register to 300 mm/s; the clamped work register should equal 300 (within the new 500 limit), not 50.
-
Encoder scaling check: Move the axis by exactly 100 mm. Read
VW400in the status chart. It should equal 100. If it equals 10 000, the divider is missing or wrong; if it equals 1, the divisor is too large. - Retentive range: Open System Block > Retentive Ranges and confirm that the integrator's retentive data area has not been altered. The 6ES7216-2AD23-0XB0 has 10 Kbytes of data memory; V memory retentive range is configured here.
- Operator HMI check: Run the line for one full production cycle. Monitor the HMI for the previously-misreported values.
13. Common Errors and Troubleshooting Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
| Micro/WIN shows no CPU on the PPI search | Cable in expansion port, not Port 0/1 | Move the cable to a DB9 port |
| CPU found, but connection times out | Baud rate mismatch | Drop to 9.6 kbaud in PG/PC interface |
| Connection time-out, USB cable | COM port not bound to PC/PPI driver | Reassign COM in Windows Device Manager |
| Upload bar freezes at 1% | CPU in RUN, heavy scan load | Switch to STOP; retry |
| SF/DIAG red after download | Compile error in modified network | Re-upload to inspect, fix syntax |
| Constants change but behaviour unchanged | EEPROM cartridge mounted, holding old program | Power down, remove EEPROM, retry |
| Download succeeds, then PLC self-resets | EEPROM incompatible with this CPU revision | Verify EEPROM part number; see SiePortal EEPROM compatibility |
| Encoder value always zero | HSC mode not configured in System Block | Open System Block > HSC; select mode and input pin |
| Encoder value wraps at 32767 | Using MOVW on 32-bit HC register | Change to MOVD (move double-word) |
| Setpoint clamps to wrong value after fix | Two literals to change; only one edited | Search the program for the integer; replace all occurrences |
14. Commissioning Notes and Field-Proven Caveats
- The S7-200 was officially withdrawn from new sales in 2017. Siemens support is still active for spare parts and the existing installed base, and downloads of STEP 7-Micro/WIN V4.0 SP9 are still served from the support portal for licence-holders. Refer to the original S7-200 System Manual at Siemens S7-200 System Manual entry for the complete instruction set and wiring diagrams.
- The CPU 226 is a 24 V sink/source input device. Inputs are grouped in three banks of eight; each bank can be wired as PNP (sourcing) or NPN (sinking) by tying the M or 1M terminal to 24 V or 0 V respectively. Mixing the wiring per bank is allowed; mixing within a bank is not.
- Two HSCs can be assigned to the same physical input pair, but only one can be active. The CPU 226 does not support user-defined interrupts on every transition of every input — the interrupt logic is bound to the HSC and pulse-train system.
- STEP 7-Micro/WIN projects are not forward-compatible with TIA Portal. TIA Portal does not import
.mwpfiles. If the line is ever upgraded to an S7-1200, the project must be rewritten from scratch or hand-translated. - On a Windows 10 or 11 64-bit host, run Micro/WIN inside a Windows 7 32-bit VM. Micro/WIN 4.0 SP9 will install but will not start reliably on 64-bit Windows even with compatibility flags.
- The PC/PPI USB cable enumerates as a virtual COM port. If a previous run of Micro/WIN was crashed, the COM port can stay locked. Open Device Manager, disable and re-enable the USB Serial Port, then restart Micro/WIN.
- Always confirm password protection before assuming a free upload. Micro/WIN will prompt for the four-level password ladder. If the original integrator left a level-4 password, the upload will succeed but the source view will be empty; only the binary project block is restored. In that case the only fix is to obtain a backup from the EEPROM cartridge or to rebuild the logic from the I/O list.
- For the specific case of pulling a program from a CPU 226 (6ES7216-2AD23-0XB0) to a laptop, the community-recommended procedure is documented in the Siemens support thread "I want to know how to connect S7-226 PLC with my laptop" at SiePortal CPU 226 laptop connection thread. The same thread also confirms that the official PC/PPI USB cable (6ES7901-3DB30-0XA0) is the simplest path when no RS-232 port is available.
15. Safety and Documentation
Before downloading to a live production PLC, confirm with the responsible electrical engineer and the line operator that:
- The machine is in a safe state to enter STOP (e.g. no workpieces in motion, no hazardous energy).
- A risk assessment has been performed for the temporary loss of the program during the upload/download cycle.
- The upload backup is stored on at least two independent media (laptop + USB stick or network share).
- The corrected project is documented in a change log: what was changed, why, by whom, and the project hash.
Which cable do I need to connect a CPU 226 (6ES7216-2AD23-0XB0) to a laptop?
The recommended cable is the Siemens PC/PPI USB cable, order number 6ES7901-3DB30-0XA0. It is an isolated USB-to-RS-485 adapter that draws power from the PLC's port pin 6. If you only have a legacy RS-232 port, use the older 6ES7901-3CB30-0XA0 (RS-232 version) with DIP switches set to PPI, 9.6 kbaud, terminator ON. The third connector under the plastic cover on the right side of the CPU is the expansion port, not a programming port — do not connect a programming cable there.
What is the difference between Upload and Download in STEP 7-Micro/WIN?
Upload reads the program from the PLC into the project on the PC and is non-destructive — the PLC is unchanged. Download writes the project from the PC to the PLC and replaces the program. Always upload first, save the original to a dated backup folder, edit a copy, and only then download. Siemens' use of "upload" and "download" is the inverse of how many IT engineers instinctively read the words, so double-check the button before clicking.
What baud rate should I use for the PC/PPI connection?
9.6 kbaud is the safest default and is what the CPU 226 uses out of the box on Port 0. If the project was configured for 19.2 kbaud or 187.5 kbaud by the integrator, Micro/WIN will not connect until you match the rate in Set PG/PC Interface > Properties > PPI. For a first-time connection on a factory floor with VFD noise, always start at 9.6 kbaud and step up after the link is stable.
Can I run STEP 7-Micro/WIN on Windows 10 or Windows 11?
Micro/WIN V4.0 SP9 is a 16-bit application. It runs reliably on 32-bit Windows XP, Vista, 7, and inside a 32-bit Windows 7 virtual machine on Windows 10/11 64-bit hosts. Native installation on 64-bit Windows may install but will not start. A 32-bit Windows VM with the USB cable passed through is the recommended path on modern hardware.
How do I fix a constant that is wrong (e.g. 50 instead of 500) in an uploaded S7-200 program?
Open the uploaded project in Micro/WIN, switch to LAD (ladder diagram) view, and scan the network that loads the setpoint. Edit the integer literal in place — double-click the value, type the new number, press Enter. Compile with Ctrl+F9, save the project under a new name (keep the original untouched), and download to the PLC while it is in STOP mode. Verify with a status chart that the corrected constant is active, and confirm there are no other occurrences of the same literal elsewhere in the program that should not be changed.
What should I do if the upload is password-protected?
Micro/WIN will still upload the binary project, but the source view (LAD/FBD/STL) will be empty. The PLC's password ladder has four levels; level 4 (highest) blocks the read access to the source. In that case, try the EEPROM cartridge as a fallback — if the integrator left the EEPROM in place, removing it and mounting it on an identical test CPU will read the program without the password. Otherwise, the only recovery is a manual rebuild from the I/O list and a careful reverse-engineering of the I/O behaviour.