Resolving Omron PID(190) P_ER Error on CS1G CX-Simulator
1. Problem Summary
Engineers porting the Omron PID(190) expansion instruction from a C200HE reference program to a CS1G-CPU45 frequently observe the P_ER auxiliary flag (SR area CF003) latching ON while P_CY (CF004) remains OFF. The instruction halts without producing a manipulated variable (MV), and the process variable (PV) feedback loop is left open. The typical failed rung and operand contents observed in CX-Programmer are:
| Rung Element | Value | Notes |
|---|---|---|
| Execution input | 0.00 |
Always-ON contact, standard test rung |
| Instruction | PID(190) |
CS/CJ-series PID expansion |
| Control block start (C) | D200 |
17-word control area |
| Word count operand | 20 |
Allocates D200–D219 |
| Terminator | END(001) |
Standard program terminator |
Observed memory image:
| Word | Hex | Decimal | Role |
|---|---|---|---|
| D200 | 012C | 300 | Setpoint (SP) |
| D201 | 0100 | 256 | Proportional band (P) |
| D202 | 1200 | 4608 | Integral time (Ti) |
| D203 | 0400 | 1024 | Derivative time (Td) |
| D204 | 0005 | 5 | Sampling period units |
| D205 | 0000 | 0 | MV lower limit |
| D206 | 0888 | 2184 | C+6 control word — root-cause word |
| D207–D219 | — | — | Status / PV history / reserved |
The combination of P_ER = ON, P_CY = OFF, and the unmodified parameter block copied from a C200HE manual points to two stacked fault conditions: an operand-mismatch error introduced by the C200HE → CS1G layout migration, and an inherent CX-Simulator execution gap.
2. Root Cause Analysis
2.1 Operand Layout Divergence Between C200HE and CS1G
Omron's PID instruction was carried forward from the C-series into CS/CJ/CP-series hardware, but the 17-word control block was extended and re-organized. The two platform generations disagree in three positions:
| Offset | C200HE | CS1G / CJ1 / CP1 | Failure Mode on Migration |
|---|---|---|---|
| C+6 (D206) | Time-unit digit optional, often `8` | Time-unit digit must be `1` (100 ms) or `9` (1 s) | P_ER ON at first execution |
| C (D200) bit 15 | BIN/BCD selector implicit | Explicit BIN/BCD selector + action-direction bit | Wrong sign on MV if not re-entered |
| C+5 / C+6 lower bits | 0–1000 decimal MV limit convention | 0–0FFF hex (12-bit) MV limit | MV saturates at unexpected value |
The most decisive word in the failed case is D206 (C+6). Decoded digit-by-digit:
- Most-significant nibble
0: PID not yet enabled via bit 15; standard control. - Second nibble
8: invalid time-unit selector. CS1G only accepts1(100 ms) and9(1 s). The value8is reserved and triggers P_ER on the first PID scan. - Trailing nibble
8: lower-order control bits (direction, MV range, derivative mode). Acceptable values.
Correcting only the second nibble from 8 to 1 yields 0818 (100 ms time base). Substituting 9 yields 0898 (1 s time base). Either value clears the parameter-validation fault on a physical CS1G-CPU45.
2.2 CX-Simulator Execution Gap
CX-Simulator (SYSMAC CX-Simulator version 1.9 / 1.91) emulates the CS1G, CJ1G, CP1H, and CP1L instruction sets, but it does not execute the PID(190) algorithm at runtime. The binary opcode is accepted, the operands are read, the parameter block is parsed — but the proportional, integral, and derivative steps are skipped. As a result:
-
P_ERstatus in the simulator does not reliably mirror real CPU behavior. - MV in
C+13stays at zero regardless of tuning parameters. - Auto-tune (AT) cannot be evaluated.
- Tuning responses, overshoot, and rise time cannot be observed in simulation.
The CX-Simulator Operation Manual (W444), section 1-7 ("Comparison between CS/CJ/CP CPU and CX-Simulator"), explicitly lists unsupported instructions. PID(190) is among them. The manual states that PID validation requires physical CS1G, CJ1G, CP1H, or CP1L hardware, or a Sysmac Studio virtual CP2E controller for CP-series projects only.
2.3 P_ER Latch Semantics
Once P_ER is set by PID(190), it remains latched until the next execution of the instruction with valid operands, or until the PLC is reset. Reading CF003 alone is therefore insufficient — the engineer must verify that the execution input 0.00 remains ON, that the scan is reaching the PID rung, and that D206 was modified before the next scan.
3. Affected Hardware and Firmware
| Platform | CPU Models | PID(190) Execution | Minimum Firmware |
|---|---|---|---|
| CS-series | CS1G-CPU42, CS1G-CPU43, CS1G-CPU44, CS1G-CPU45 | Full | Unit version 2.0 or later |
| CS-series | CS1H-CPU63, CS1H-CPU65, CS1H-CPU67 | Full | Unit version 3.0 or later |
| CJ-series | CJ1G-CPU42, CJ1G-CPU43, CJ1G-CPU44, CJ1G-CPU45 | Full | Unit version 3.0 or later |
| CJ-series | CJ1M-CPU11/12/13, CJ1M-CPU21/22/23 | Full | Unit version 3.0 or later |
| CJ2-series | CJ2M-CPU31/32/33/34/35 | Full | Unit version 1.0 or later |
| CP-series | CP1H-XA/X/Y, CP1L-L/M | Full | Unit version 1.0 or later |
| C200HE | C200HE-CPU32, C200HE-CPU42 | Full | All firmware versions |
| CX-Simulator | Versions 1.9 / 1.91 | Skipped (not executed) | N/A |
Confirm firmware on physical PLC via CX-Programmer: Online → PLC Information → Unit Version. The operand layout in this article applies to CS1G-CPU45 with unit version 2.0 or later. Earlier unit versions use a 16-word control block; the C+6 time-unit selector exists but accepts a narrower set of values.
4. PID(190) Instruction Format
The CS1G/CJ1/CP1 PID instruction has the form:
LD 0.00 ; execution input (Always-ON)
PID(190) 10 ; not used in CS1G (operand 1 reserved)
D200 ; C — first word of 17-word control block
20 ; word-count of control area (17 minimum)
END(001)
Operand requirements:
- C (D200): first word of the 17-word control block. Must be a valid DM or CIO area word.
- Word count: minimum 17, maximum 30 on CS1G. Values below 17 trigger P_ER.
- Execution input: must transition OFF → ON at least once to start PID; the instruction then executes every scan while the input is ON.
CX-Programmer's PID Setup dialog (Settings → PID(190) Setup) auto-fills D200–D216 with CS1G defaults. When porting from C200HE, the dialog must be re-entered manually because the auto-populated values include CS1G-specific defaults (for example, default C+6 = 0000, which disables PID via bit 15).
5. Parameter Layout Reference (CS1G / CJ1 / CP1)
| Offset | Word | Hex Default | Meaning |
|---|---|---|---|
| C | D200 | 0100 | Setpoint (SP) — BCD or BIN per bit 15 of C |
| C+1 | D201 | 0100 | Proportional band (P) |
| C+2 | D202 | 1200 | Integral time (Ti) |
| C+3 | D203 | 0400 | Derivative time (Td) |
| C+4 | D204 | 0005 | Sampling period (units per C+6 time-unit digit) |
| C+5 | D205 | 0000 | Lower MV limit (0000–0FFF hex) |
| C+6 | D206 | 0000 | Control word: time unit, action, reverse, range |
| C+7 | D207 | — | Upper MV limit (0000–0FFF hex) |
| C+8 | D208 | — | Manual MV value (when in manual mode) |
| C+9 | D209 | — | PV scaling factor |
| C+10 | D210 | — | PV lower range |
| C+11 | D211 | — | PV upper range |
| C+12 | D212 | — | Deadband / hysteresis |
| C+13 | D213 | — | MV output (read-only, 0–0FFF hex) |
| C+14 | D214 | — | PV scaled value (read-only) |
| C+15 | D215 | — | Error / deviation (SP − PV) |
| C+16 | D216 | — | Status flags (AT complete, alarm, etc.) |
6. C+6 Bit Map Deep Dive
The second word of the control block, C+6 at D206, is the most error-prone word in CS1G PID migrations. Engineers must decode it as a 16-bit binary pattern, not a hex string. The complete CS1G layout per W339:
| Bit | Symbol | Function | Accepted Values |
|---|---|---|---|
| 15 | PID_EN | PID enable | 0 = disabled, 1 = enabled |
| 14 | AT_EXE | Auto-tune start | 0 = off, 1 = run AT cycle |
| 13 | BUMPLESS | Bumpless transfer on mode change | 0 = off, 1 = on |
| 12 | RSV | Reserved (must be 0) | 0 |
| 11–8 | T_UNIT | Time-unit selector | 1 = 100 ms, 9 = 1 s, 0 = per bit 7 |
| 7 | T_MULT | Time-unit multiplier | 0 = ×1, 1 = ×10 of selected unit |
| 6 | DIR | Action direction | 0 = reverse (heating), 1 = direct (cooling) |
| 5 | MV_RNG | MV range | 0 = 0–100%, 1 = ±100% |
| 4 | PV_RNG | PV range scaling enable | 0 = disabled, 1 = enabled |
| 3 | ALM_EN | PV alarm enable | 0 = off, 1 = on |
| 2 | DER_MODE | Derivative on PV vs on error | 0 = on PV, 1 = on error |
| 1–0 | OUT_SCL | MV output scaling | 00 = 12-bit, 01 = 8-bit, 10 = 4-bit, 11 = reserved |
For the failed case D206 = 0888:
Hex: 0 8 8 8
Binary: 0000 1000 1000 1000
Bit 15: 0 (PID disabled at scan start)
Bit 14: 0 (no AT)
Bit 13: 0 (no bumpless)
Bits 11-8: 1000 = 8 (INVALID time-unit selector)
Bit 7: 1 (multiplier ×10)
Bit 6: 0 (reverse action)
Bit 5: 0 (0–100% MV range)
Bits 4-0: 01000 (PV range scaling disabled)
The combination of bit 11-8 = 1000 is not in the accepted list and triggers P_ER. Valid replacements:
0818: 0000 1000 0001 1000 → time unit = 100 ms, multiplier ×1, reverse, 0–100% MV
0898: 0000 1000 1001 1000 → time unit = 1 s, multiplier ×1, reverse, 0–100% MV
For 1 s sampling with ×10 multiplier: 08D8 (time-unit D = 1 s with multiplier). For 100 ms sampling with ×10 multiplier: 0818 still works because T_UNIT = 1 and bit 7 = 1 multiply to a 1 s effective sample (for tuning code that does not rescale). Always verify with the W339 control-word truth table when deviating from defaults.
7. Step-by-Step Correction Procedure
-
Confirm PID instruction form. In CX-Programmer, double-click the PID(190) rung. Verify operand 1 =
D200, operand 2 =D200, operand 3 = `20` (length). -
Recompute the control block from CS1G defaults. Open Settings → PID(190) Setup. Use the following values for the original 300-unit SP test:
-
C(D200) = `300` decimal — setpoint. -
C+1(D201) = `0100` hex — P band (256 decimal, 25.6% of span). -
C+2(D202) = `1200` hex — Ti (4608 decimal; interpret per time-unit). -
C+3(D203) = `0400` hex — Td (1024 decimal; interpret per time-unit). -
C+4(D204) = `0005` hex — sampling period. -
C+5(D205) = `0000` hex — MV lower limit. -
C+6(D206) =0818for 100 ms sampling or0898for 1 s sampling. -
C+7(D207) =0FFFhex — MV upper limit (100%).
-
-
Enable PID. Set bit 15 of
C+6to 1. With the corrected values, the control word becomes8818or8898. -
Validate P_ER reset. Transfer the program to a physical CS1G-CPU45 (not CX-Simulator). Toggle execution input
0.00ON. Monitor SR areaCF003. It must remain OFF. -
Capture MV and PV trend. Watch
C+13(MV output, 0–0FFF hex) andC+14(PV scaled). Confirm the output moves in response to PV deviation. - Record the committed .cxp project. File → Save Project As. Name and version the file. Attach it to the maintenance record for traceability.
8. CX-Simulator Limitations and Workarounds
CX-Simulator does not execute PID(190), so P_ER behavior in the simulator does not reflect real CPU behavior. Field-proven workarounds:
- Validate on hardware. Connect CX-Programmer to a physical CS1G-CPU45 or CJ2M-CPU31 via Ethernet (port 9600) or serial (port 9600, even parity). Download the program and monitor the loop in real time.
- Use Sysmac Studio virtual controller. For CP1H projects, Sysmac Studio supports a virtual CP2E controller that executes a CP1L-compatible instruction set, including PID(190). This is the closest equivalent to a CS1G PID simulation.
- Use external simulator. Third-party OPC servers (KEPServerEX, Matrikon OPC) provide a simulated loop for tuning verification before PLC deployment.
-
Disable PID before simulation. If the rung must run in CX-Simulator for code review, place a Normally Closed contact in series with the PID execution input, controlled by a simulator-only marker (e.g.,
W0.00set true in the simulator project only).
9. Verification Checklist
| Check | Method | Expected Result |
|---|---|---|
CF003 (P_ER) |
Monitor SR area | OFF after first PID execution |
CF004 (P_CY) |
Monitor SR area | OFF (unrelated to PID) |
D200 (SP) |
Data trace | Reads 300 decimal |
D206 (C+6) |
Data trace | Reads 0818 or 0898 (or with bit 15 set: 8818 / 8898) |
D213 (MV) |
Data trace | Tracks between 0000 and 0FFF
|
D214 (PV) |
Data trace | Within configured PV range |
| Loop response | Step SP change | Stable, no continuous oscillation |
| Overshoot | Step SP change | < 10% of span after tuning |
| Steady-state error | Long-duration observation | < 1% of span with integral action enabled |
| Derivative kick | Step SP change | Absent if DER_MODE (bit 2 of C+6) = 0 (derivative on PV) |
10. Common Fault Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
| P_ER = ON, C+6 second digit = 8 | Invalid time-unit nibble | Replace with 1 or 9 |
| P_ER = ON, C+5 = 0FFF, C+7 = 0000 | MV upper and lower limits inverted | Swap upper and lower limits |
| P_ER = ON, C+4 = 0000 | Sampling period zero | Set C+4 to ≥ 1 |
| MV stuck at 0, P_ER OFF | PID not enabled (bit 15 of C+6 = 0) | Set bit 15 to 1 |
| MV oscillates continuously | Proportional band too tight or derivative too high | Increase C+1, reduce C+3 |
| Slow response, large steady-state error | Integral time too low (over-damped) or P too low (under-damped) | Increase C+2, increase C+1 |
| MV saturates at upper limit | MV upper limit (C+7) too low or action direction wrong | Set C+7 = 0FFF, verify bit 6 of C+6 |
| CX-Simulator shows P_ER after correction | Simulator limitation (PID not executed) | Validate on real PLC |
| P_CY = ON | Carry/borrow in BCD conversion | Switch C bit 15 to BIN mode |
| Auto-tune never completes | AT bit cleared before cycle end | Hold C+6 bit 14 = 1 until C+16 bit 0 sets |
| MV steps during SP change | Derivative-on-error mode with large SP step | Set DER_MODE (bit 2 of C+6) = 0 |
11. Tuning Procedures
11.1 Ziegler-Nichols Open-Loop Method
- Disable PID by clearing bit 15 of C+6.
- Apply a manual step (e.g., 10% MV) via C+8 (manual MV word).
- Record the PV response curve. Measure the process gain K, dead time L, and time constant T.
- Compute initial parameters: P = 1.2·T/L, Ti = 2·L, Td = 0.5·L.
- Enter computed values into D201, D202, D203 in the units selected by D206.
- Set bit 15 of D206 to enable PID. Step the SP and observe response.
- Fine-tune by reducing P (increase C+1) until oscillation damps within 2 cycles.
11.2 Auto-Tune (AT) Procedure
- Ensure PV is stable and within 10% of SP.
- Set C+6 bit 14 = 1 to start AT.
- Monitor C+16 bit 0 — sets when AT completes.
- Clear bit 14 to accept the new P, Ti, Td values written to C+1, C+2, C+3.
- Verify the loop tracks the new SP without sustained oscillation.
11.3 Lambda Tuning for Slow Processes
For processes with large dead time (furnaces, heat exchangers), use the lambda tuning method:
- P = T / (K · (L + λ))
- Ti = T
- Td = 0
Where λ is the desired closed-loop time constant (typically 2·L to 3·L).
12. Safety and Commissioning Notes
- Start with P-only control (set Ti = 0 and Td = 0 in D202 and D203) before adding integral and derivative action.
- Use AT (auto-tune) by setting C+6 bit 14 = 1 with a stable SP and a representative disturbance.
- Verify derivative-on-PV vs derivative-on-error in C+6 bit 2 to match the process dynamics.
- Document the final P, Ti, Td values in the maintenance log alongside the SP and PV ranges.
- Save the project as a versioned .cxp file before any field modification.
13. PID Theory Reference
For background on the underlying control algorithm, including the proportional, integral, and derivative terms and their interaction, see the PID Controller & Theory Explained — National Instruments reference and the PID controller — Wikipedia article. The Omron PID(190) implementation follows the standard parallel-form equation:
MV(t) = Kp · e(t) + Ki · ∫e(t)dt + Kd · de(t)/dt
Where the band P, time Ti, and time Td relate to the standard gains as:
- Kp = 1 / P (proportional gain inverse to band)
- Ki = Kp / Ti (integral gain)
- Kd = Kp · Td (derivative gain)
Omron's band-style parameterization is convenient for tuning because increasing P softens the response without changing units, but the engineer must convert to Kp/Ki/Kd when comparing to a continuous-time model or to controller gain limits documented elsewhere in the process plant.
14. Related Omron Documentation
- CS1G/H CPU Unit Operation Manual (W339) — CS-series instruction reference, PID(190) section.
- CJ1G/H CPU Unit Operation Manual (W393) — CJ-series instruction reference.
- CP1H CPU Unit Operation Manual (W462) — CP-series instruction reference.
- CX-Simulator Operation Manual (W444) — Section 1-7 unsupported-instruction list.
- CX-Programmer Operation Manual (W463) — PID dialog reference, section 4-12.
FAQ
Why does P_ER latch ON with PID(190) on CX-Simulator?
P_ER reflects the CS1G parameter-validation routine, which CX-Simulator does not execute identically. In CX-Simulator version 1.9 the PID algorithm is skipped entirely, so any P_ER/OFF state must be re-validated on a physical CS1G-CPU45 or CJ2 CPU.
What is the valid second digit of D206 (C+6) for PID(190) on CS1G?
The second hexadecimal digit of C+6 selects the time unit. Valid selections on CS1G-CPU45 are 1 (100 ms) and 9 (1 s). Using 8 (as in the C200HE layout) trips P_ER. Replace 0888 with 0818 or 0898.
Can I tune PID(190) without a physical PLC?
No. CX-Simulator does not execute PID(190). Use a physical CS1G, CJ1G, CJ2M, CP1H, or CP1L CPU for tuning. Sysmac Studio's virtual CP2E controller can be used for CP1H-like projects but does not replace field tuning on the deployed hardware.
How do I port C200HE PID parameters to CS1G?
Re-enter the parameters through the CX-Programmer PID dialog rather than copying the data table. CS1G adds bits in C+6 (action, reverse, MV range, time-unit) that C200HE did not implement. Validate SP, P, Ti, Td, sampling period, and MV limits in the new dialog before downloading.
What is the difference between P_ER (CF003) and P_CY (CF004)?
P_ER indicates a parameter, operand, or BCD-range error during instruction execution. P_CY indicates a carry or borrow flag from arithmetic operations; it is unrelated to PID validity. A PID P_ER never causes P_CY to set.
How long does the P_ER flag stay latched after a bad parameter?
P_ER remains latched until the next successful PID execution with valid operands, or until the PLC is reset. Reading CF003 once is insufficient — the engineer must confirm that D206 was modified before the next scan and that PID(190) actually executed.