Problem Overview
The Omron CPM2A series micro-PLC, programmed with CX-Programmer (versions through 5.0 and later), occasionally rejects expansion instructions during a PC-to-PLC transfer. The symptom is consistent: the project compiles without errors, the standard program transfers successfully, but the expansion function block (commonly ZCP, SCL, SCAL, AVG, PID, or any user-mapped extension) is silently dropped or rejected with a transfer-failed message. The PLC continues to run the base instruction set but never executes the expansion logic, which produces unexpected field behavior even though no syntax error was reported.
This article documents the root causes and the proven field procedure that resolves the condition without firmware replacement. It is based on the official CPM2A Operation Manual (W352-E1-07) and cross-references the CPM2A to CP1E Replacement Guide (P084) for migration context when a CPM2A is at end of life.
CPM2A Hardware Architecture
The CPM2A is a compact brick-style CPU that integrates power supply, CPU, and I/O in a single housing. The relevant subsystems for expansion instructions are:
- CPU Unit: Contains a lithium battery-backed RAM and a flash-backed program area. The user program is held in the user program area; the expansion instruction slot table is held in the PLC Setup (settings) area.
- DIP switch (SW1): A 4-position DIP switch on the front face. Per the operation manual, this switch selects Host Link communication parameters when set to OFF (default) and allows peripheral bus or tool bus modes in other positions. It is not used to enable or disable expansion instructions.
- Peripheral port / RS-232C port: Either port can be used to communicate with CX-Programmer. Default Host Link settings with the DIP switch in default position are 9600 bps, 7 data bits, even parity, 2 stop bits (9600, 7, E, 2).
- Expansion instruction table: A separate non-volatile table (latched by the CPU battery) that maps instruction numbers 0 through the maximum to specific function codes. The maximum number of expansion instructions depends on the CPM2A CPU type (typically 12 to 18 expansion instructions).
How Expansion Instructions Are Stored
The CPM2A instruction set is split into two logical groups:
- Base instructions — the standard ladder and bit-manipulation set that is always available. These are embedded in firmware and do not require any user configuration.
-
Expansion instructions — specialized functions such as
ZCP(zone compare),SCL(scaled conversion),SCAL,AVG,PID,RXD/TXD, etc. Each expansion instruction must be allocated a function number (0–18 typically) and downloaded to the PLC Setup.
The mapping is performed in CX-Programmer under PLC → Expansion Instructions (or the equivalent dialog depending on CX-Programmer version). When you assign an instruction to a slot, CX-Programmer writes a function code into the CPU's instruction table. If the table is incomplete (empty slots), the PLC will reject a transfer that references any expansion instruction number.
Root Cause Analysis
Field reports on the CPM2A transfer failure converge on four independent root causes. Any one of them can produce the symptom; combinations are common.
Root Cause 1: Empty Expansion Instruction Slots
Every expansion instruction slot allocated by CX-Programmer must contain a valid function. If any slot is left blank (default), the PLC Setup is considered incomplete. When a transfer is attempted, the firmware checks each slot sequentially. The first empty slot triggers the transfer error.
Standard practice: fill all slots with a usable expansion instruction. If the application does not need a slot, map a benign instruction such as NOP or a duplicated low-cost function rather than leaving the slot empty.
Root Cause 2: Settings Not Downloaded Before Program
CX-Programmer separates the transfer into two independent operations:
- Transfer Settings to PLC (PLC Setup, expansion instruction table, I/O table, comms parameters)
- Transfer Program to PLC (ladder, function blocks, variable tables)
If only the program is transferred, the expansion instruction table remains in its previous state. If the previous state contained no expansion instructions, or if the table is now mismatched with the new program, the expansion calls resolve to NOP or fault. The PLC does not automatically re-write the expansion table when a new program arrives.
Root Cause 3: PLC Operating Mode at Transfer
The CPM2A requires the CPU to be in Program Mode (not Monitor, not Run) when the PLC Setup or expansion table is written. Attempting to overwrite the expansion table in Monitor mode is permitted for some commands but is rejected for expansion instructions because it changes the executable instruction set. Confirm mode via the ladder window status bar before each transfer.
Root Cause 4: Stale Battery-Backed Memory
The expansion instruction table is latched by the CPU battery. If the battery has degraded, the table may contain corrupt or zeroed values that no longer match the CX-Programmer project. A full discharge of the CPU (battery removed overnight, or CPU powered off long enough for the internal supercap to drain) forces the expansion table back to defaults. After that, the settings transfer will succeed because the destination is empty and consistent.
Prerequisites
Before applying the resolution procedure, confirm the following:
- CX-Programmer version is 5.0 or later (the dialog structure changed across versions but the transfer mechanism is the same).
- Communications cable is the correct type: CQM1-CIF01 or CQM1-CIF02 for the peripheral port, XW2Z-200S or XW2Z-500S for the RS-232C port. Verify Host Link mode is active on the PLC (DIP switch OFF).
- PC serial port (or USB-serial converter) is configured for 9600, 7, E, 2 when using Host Link default, or matches the active PLC setup.
- The project has been saved and compiles cleanly (F7 in CX-Programmer).
- PLC is online and you can read the current mode. If you cannot go online, replace the cable or check the COM port assignment under PLC → Change COM Port.
Step-by-Step Resolution Procedure
This is the field-proven sequence that resolves the transfer rejection. Follow the order exactly; the sequence is important because each step prepares the destination memory for the next.
Step 1 — Map All Expansion Instruction Slots
- In CX-Programmer, open the project.
- Select PLC → Expansion Instructions (or Edit → Expansion Instructions in CX-Programmer 9.x).
- For each slot, choose a function. Recommended default assignments when no specific function is needed:
- Slots 0–2: arithmetic helpers (
+BCD,-BCD,*BCD equivalents) - Slots 3–6:
SCL,SCAL,AVG - Slot assigned to
ZCP(the failing instruction) - Remaining slots:
NOPor duplicated low-cost functions
- Slots 0–2: arithmetic helpers (
- Click OK. The dialog now writes a non-empty function to every slot.
Step 2 — Clear the PLC User Program Memory
- Go online: PLC → Work Online.
- Set the PLC to Program Mode using the mode selector on the PLC toolbar (or via the dropdown next to the online indicator).
- Choose PLC → Clear All Programs. Confirm the prompt. This clears the user program and the PLC Setup.
Step 3 — Download PLC Settings (Including Expansion Table)
- With the PLC still in Program Mode and online, choose PLC → Transfer → To PLC.
- In the transfer dialog, enable the Settings checkbox. This sends the expansion instruction table, the comms settings, and the PLC Setup as a single transfer.
- Click OK. The PLC acknowledges with a brief flash of the COMM LED and the dialog closes.
Step 4 — Cycle Power on the PLC
- Turn OFF the supply power to the PLC.
- Wait at least 5 seconds for the internal capacitors to discharge.
- Turn ON the supply power. The PLC performs its initial diagnostic routine and validates the expansion table.
Step 5 — Download the User Program
- Go online again.
- Ensure Program Mode.
- Choose PLC → Transfer → To PLC.
- In the dialog, enable the Program checkbox only (settings are already loaded). Click OK.
Step 6 — Verify Expansion Instructions Are Recognized
- Switch to Monitor Mode or Run Mode.
- Open PLC → Expansion Instructions and re-read the table. Every slot should now display the function you assigned.
- Force the input conditions of a rung that uses the expansion instruction and observe the output behavior.
Step 7 — Battery Reset Alternative
If the procedure above still fails, perform a battery drain to force the expansion table back to factory defaults:
- Power OFF the PLC.
- Remove the CPU battery (typically a CR2032 or equivalent, accessible from the bottom or side cover).
- Leave the battery out for a minimum of 8 hours, or apply an external discharge resistor across the battery holder pads for at least 30 minutes.
- Reinstall the battery.
- Power ON and re-execute Steps 2 through 6.
DIP Switch Function Reference
The 4-position DIP switch on the CPM2A is frequently misidentified as a transfer-control switch. Its actual roles are:
| Switch Position | Function |
|---|---|
| All OFF (default) | Host Link mode on RS-232C: 9600, 7, E, 2 |
| Pin 1 ON | Peripheral bus mode on peripheral port |
| Pin 2 ON | Tool bus mode on peripheral port |
| Pin 3 ON | Host Link mode on peripheral port (custom baud) |
| Pin 4 ON | Reserved / Host Link response delay enable |
No combination of DIP switch settings enables or disables expansion instructions. The "Check DIP Switch" prompt that some users see during transfer is a communications-mode confirmation only.
Settings Dialog Configuration
The Settings dialog in CX-Programmer is reached through PLC → Settings. It contains the following sections relevant to expansion instructions:
| Tab | Contents | Effect on Expansion |
|---|---|---|
| Startup | Hold bits, IOM Hold, Forced Status Hold | No effect |
| Communications | Host Link baud, data bits, parity, stop bits | Indirect — must match PLC for transfer to complete |
| Expansion Instructions | The slot → function mapping | Direct — must be downloaded as part of Settings |
| Error Log | Non-fatal error log configuration | No effect |
Verification Procedure
After completing the resolution, run the following verification sequence to confirm the fix is permanent:
- Read back the expansion instruction table: PLC → Expansion Instructions. Each slot must show the function you assigned.
- Force the input conditions that exercise the expansion instruction. For ZCP, drive the input word through the compare range and verify the output word transitions match the ZCP truth table.
- Cycle power on the PLC. Re-read the expansion table. The values must persist after power removal.
- Save the project to disk and back up the PLC's settings using PLC → Transfer → From PLC.
Troubleshooting Matrix
| Symptom | Likely Cause | Remediation |
|---|---|---|
| Transfer error on any expansion instruction | Empty slot in expansion table | Fill all slots; re-transfer Settings before Program |
| Expansion instruction executes as NOP | Settings not transferred | Enable Settings checkbox in transfer dialog |
| Transfer aborts with "Check DIP Switch" | Host Link comms mismatch | Verify DIP switch in OFF position; set PC port to 9600, 7, E, 2 |
| Error persists after Settings transfer | Stale battery-backed table | Battery reset procedure (Step 7) |
| Error only after firmware replacement | Old expansion table incompatible | Clear All Programs, then transfer Settings and Program in order |
| Online edit succeeds, offline edit fails | Expansion table not synchronized | Read PLC Settings to project, then re-transfer both Settings and Program |
Migration to CP1E
Where the CPM2A is at end of life or the expansion table cannot be reliably repaired, the recommended migration target is the CP1E series. According to the CPM2A to CP1E Replacement Guide (P084):
- CP1E supports all CPM2A expansion instructions natively, including
ZCP, without the slot-mapping requirement. - CX-Programmer automatically converts the CPM2A expansion table to the equivalent CP1E function block when the project is opened in CP1E mode.
- The wiring footprint is similar but the CP1E has different terminal assignments; refer to the replacement guide for terminal-by-terminal pin mapping.
- The CP1E uses CX-Programmer 9.x or Sysmac Studio, not the legacy CX-Programmer 5.0 dialog.
Migration is recommended when the CPU battery is no longer available, when the ladder uses more expansion instructions than the CPM2A can map, or when the application requires expansion features beyond the CPM2A instruction set.
Preventive Measures
To avoid this condition recurring on a working CPM2A:
- Always transfer Settings immediately after Clear All Programs, before transferring the program.
- Never leave an expansion slot empty in the project — fill with a benign instruction.
- Replace the CPU battery on a fixed schedule (typically every 5 years, or per site maintenance policy). A weakening battery can corrupt the expansion table without warning.
- Maintain a project archive that includes the .cxp (CX-Programmer project) file plus an exported .txt or .csv of the PLC Setup. This allows rapid restoration if a CPU must be replaced.
Reference Documentation
Primary documents for this procedure:
- CPM2A Operation Manual (W352-E1-07) — Section 4 covers the PLC Setup, Section 6 covers the expansion instruction table, Section 8 covers the transfer procedure.
- CPM2A to CP1E Replacement Guide (P084) — Migration path for legacy systems.
FAQ
Why does my CPM2A reject expansion instructions during transfer but accept the base ladder?
The expansion instruction table is stored in the PLC Setup, separate from the user program. If the destination table is empty, incomplete, or corrupted, the firmware rejects any expansion instruction reference. Fill every expansion slot, then transfer Settings before transferring the Program.
How many expansion instructions can a CPM2A hold?
Depending on CPU type (CPM2A-20, 30, 40, or 60), the maximum is 12 to 18 expansion instructions. Check the specific CPU's operation manual in the W352 series for the exact limit.
Does the CPM2A DIP switch control expansion instructions?
No. The DIP switch only selects the communication mode and parameters on the peripheral and RS-232C ports. Expansion instructions are controlled entirely through CX-Programmer's Settings dialog.
Can I fix a corrupted expansion table without replacing the battery?
Yes. Perform Clear All Programs, then transfer the Settings, cycle power, then transfer the Program. If that fails, remove the battery for 8 hours to force a full memory reset, then repeat the transfer sequence.
Will my CPM2A program run on a CP1E without rewrites?
Yes, with CX-Programmer 9.x or Sysmac Studio opening the original .cxp file, the migration tool converts the CPM2A expansion table automatically. Verify the I/O wiring against the replacement guide before commissioning.