Configuring Omron CS1G-CPU42 DeviceNet, Serial, and PID Loops

James Nishida15 min read
HMI ProgrammingOmronTechnical Reference
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

1. System Overview and Component Identification

The reference platform described here is a legacy Omron CS1 series installation centered on a CS1G-CPU42 processor. The architecture combines a DeviceNet fieldbus segment with a serial-communication board, and is representative of many field deployments that were originally commissioned a decade or more ago and are now being expanded.

Table 1.1 - CS1G-CPU42 system components
Slot / Role Catalog Number Function
CPU CS1G-CPU42 SYSMAC CS1G processor, pre-V3 (no symbol/variable storage, no function-block library support beyond ladder+ST)
CPU peripheral port Built-in RS-232C, used for CX-Programmer online connection via peripheral cable CS1W-CN114
CPU RS-232C port Built-in Host link / NT link / serial gateway
Communication board CS1W-SCB41-V1 Two serial ports: Port 1 RS-232C, Port 2 RS-422/485 selectable
DeviceNet master DRM21-V1 Master/scanner card, mounted in the CPU rack
DeviceNet slaves (existing) DRT1-COM Multi-point I/O terminal on the existing remote rack
DeviceNet slaves (new) DRT1-COM x2 Two new remote I/O racks to be added to the same segment
HMI NT631C NS/NT series terminal, planned for the SCB41 Port 2 (RS-422) via NTLink 1:N
CPU revision check: A bare CS1G-CPU42 (no -V1 or -H suffix) is a pre-V3 unit. V3 added the Symbol data type and the Function Block area, neither of which are present on a stock CS1G-CPU42. Variable / tag-based online editing is therefore not available; all work must be performed in the classic I/O memory view (IR, SR, AR, HR, LR, DM, EM, TIM, CNT).

2. Required Software Stack - CX-One vs. Individual Tools

Omron sells the full engineering environment as a single DVD/USB bundle called CX-One. For this project, CX-One is the correct choice over stand-alone CX-Programmer, because the DeviceNet Configurator, CX-Protocol (for SCB41 macro protocol work), and CX-Simulator all share the same installer, the same PLC registry, and the same component-version handshake. If you install CX-Programmer and the Configurator from different media, you will frequently see Specified unit can not be accessed errors when going online with the DRM21.

Table 2.1 - CX-One components used in this project
Component Use Minimum Version (CS1G-CPU42)
CX-Programmer Ladder + ST editing, online monitoring, program upload/download 9.6 or later (CX-One 4.x or 5.x)
CX-Integrator Network configuration overview (not strictly required for DeviceNet, but helpful) 2.x
DeviceNet Configurator DRM21 scan list, slave parameter editing, network diagnostics 3.x (matches CX-One)
CX-Protocol SCB41 protocol macro creation (only if a custom HMI or third-party device is added) 1.x
CX-Simulator Offline test of the CS1 logic - useful when no spare PLC is on the bench 1.x

Omron's Digital Technical Library DVD contains every CS1, CJ1, and CS1W instruction-reference manual in PDF. Ask the local Omron rep for a copy; it is the single most valuable reference for any integrator working on a CS1G project.

3. Memory Area Management - Upload, Save, Download

Unlike Allen-Bradley Logix Designer, CX-Programmer does not store tag values inside the program file. The program file (.cxp / .cxt) contains the logic and the symbol/comment data, while the memory data is held in a separate file with the extension .mem or, more commonly, the PLC Memory view inside the project tree.

3.1 Uploading the current memory contents

  1. Connect to the CS1G-CPU42 with the project offline (or online without transferring).
  2. From the project tree, right-click Memory and choose Memory View.
  3. Use Edit > Select All, then PLC > Upload from PLC (hot-key: F12 in some versions, or right-click > Upload). This populates the editor with the live IR, SR, AR, HR, LR, DM, EM, TIM, and CNT values.
  4. Choose File > Save As and pick Memory Data as the type. The data is written into the project workspace next to the .cxp file.

3.2 Downloading the new program without losing retained values

  1. Verify the saved .mem file matches the online PLC exactly by selecting PLC > Compare with PLC.
  2. Go online. The Operating Mode should be set to Program before any download; on a running process, schedule a maintenance window.
  3. Choose PLC > Transfer > To PLC and select Program + Memory Data (not just Program). This bundles the DM/HR/EM initial values plus the new ladder.
  4. Re-enter Monitor or Run mode and verify key retentsive words (HR, DM area D0..D32767, EM banks E0_0..E0_32767 if present) with the upload comparison from step 1.
Retain flag: The PLC Setup word contains the Retain bits for HR (A500.15), DM (A500.14), and EM (A500.12). If the customer's existing program is operating with DM/HR retention disabled, a download that overwrites the memory file will wipe process setpoints. Confirm with the customer whether DM words are intentionally non-retained, then act accordingly.

4. CS1W-SCB41-V1 Serial Communication Board

The CS1W-SCB41-V1 installs on the CPU's option-board slot and exposes two serial ports. The mapping is fixed by hardware; you cannot change which port is RS-232 and which is RS-422/485.

Table 4.1 - SCB41-V1 port definitions
Port Electrical Standard Use Case in This Project Recommended Protocol
Port 1 (upper) RS-232C, D-sub 9-pin male Spare / point-to-point HMIs or modems Host Link (SYSWAY) or NT Link 1:1
Port 2 (lower) RS-422/485, terminal block, switchable NT631C HMI on multi-drop network NT Link 1:N (recommended up to 8 PTs)

4.1 DIP switch settings on the SCB41-V1

Table 4.2 - SCB41-V1 DIP switch (SW1)
Switch OFF (default) ON
1 Port 1 RS-232C standard Port 1 RS-232C with RS/CS control loopback disabled
2 Port 2 RS-422 (4-wire) Port 2 RS-485 (2-wire) - signal lines shared
3 Port 2 terminating resistor OFF Enable 220 ohm termination on Port 2
4 Port 1 terminating resistor OFF Enable 220 ohm termination on Port 1

For the NT631C link on Port 2, set SW2 = OFF (RS-422 4-wire) and SW3 = ON only at the two physical ends of the multi-drop chain; never enable termination on the intermediate nodes or reflections will corrupt the 187.5 kbps signal.

4.2 PLC Setup words used by the SCB41

SCB41 port parameters live in the PLC Setup tree (CIO 162 / CIO 164 area), but the cleaner interface is the Serial Communication Unit / Board Setup dialog in CX-Programmer, which writes the correct combination of bits and baud-rate nibbles for you. Always validate with the SCB41 manual W336.

5. Programming the CPU - Peripheral Port vs. SCB41

The customer's SCB41-V1 is currently busy with the existing HMI. It is almost never a good idea to multiplex a programming session onto the same port that carries production traffic. The CS1G-CPU42 has a dedicated peripheral port on the front of the CPU, designed for the programming console and CX-Programmer. Use the Omron cable CS1W-CN114 (USB-to-peripheral) or the legacy CQM1-CIF02 (RS-232-to-peripheral).

  1. In CX-Programmer choose PLC > Change PLC and set Network Type = Peripheral Bus.
  2. Set the driver to SYSMAC CS/CJ Series Peripheral Port (USB) or Toolbus Auto-Detect at 115,200 bps.
  3. Click Work Online. The CS1G will respond with its node address (default 00) and firmware version (e.g. CS1G-CPU42 V2.00).
  4. If the CPU is in Run mode, CX-Programmer will request a privilege change; either accept the read-only monitor session or schedule a stop window.

Auto-detect removes the headache of guessing baud rate. Stick to Peripheral Bus rather than Toolbus on SCB41 Port 1; the latter forces the customer's HMI off the bus for the duration of the engineering session.

6. DeviceNet Network and DRM21-V1 Configuration

6.1 Master module and scan-list concept

The DRM21-V1 is a Master (Scanner) card. It holds a scan list - the polling table that maps each slave's input/output assembly to fixed CIO words on the CS1. With three DRT1-COM slaves total (one existing + two new), the scan list will contain three entries, each typically 4 words input + 4 words output for the standard Discrete I/O connection (COS disabled, polled, message group 2 only).

6.2 Two network-configuration modes

Table 6.2 - DRM21 scan-list generation
Mode When to Use Pros Cons
Fixed Configuration All slaves are Omron DRT1-COM (or DRT2-**) No PC tool required; the master auto-discovers at power-up; nearly foolproof No per-slave parameter editing; no allocation of EDS attributes
Configurator-Defined Mixed vendor slaves, custom assemblies, message connections Full scan-list control, per-slave I/O assembly size, EDS parameter download Requires the DeviceNet Configurator and the matching project file

For a homogeneous DRT1-COM system, Fixed Configuration is the most reliable first step. Set the rotary switches on the DRM21 to Node 0, Baud = 500 kbps (the CS1G system default), and Mode = Fixed. On power-up, the master will discover any DRT1 slaves on the trunk and allocate them in order.

6.3 Uploading the existing DeviceNet project

  1. Connect the PC to the CPU peripheral port (or to the SCB41 Port 1) with the Configurator's Online mode set to Network = DeviceNet > Serial Routing.
  2. Right-click the DRM21 in the Configurator tree and select Upload from DeviceNet Master.
  3. The Configurator will request the scan list and EDS parameter set; the upload typically takes 3-10 seconds per slave.
  4. Save the project as CustomerPlant.cdm immediately. This file replaces the missing configuration the customer lost.

7. Troubleshooting DeviceNet Upload Errors

On the integrator's first attempt, two distinct errors were reported depending on the driver used.

Table 7.1 - DeviceNet Configurator error mapping
Driver Selected Error Message Root Cause Resolution
SYSMAC WAY (SYSWAY / Host Link) Specified unit can not be accessed Host Link cannot route down from the CPU into a backplane card. SYSWAY is a CPU-port protocol, not a backplane-bridge protocol. Switch the Configurator's Network Type to DeviceNet via Peripheral Port (Toolbus), not SYSWAY. Toolbus carries the CMND/CVR routing bytes needed to reach the DRM21.
Toolbus / FINS Interface can not be opened The PC serial port is held by another process, the USB-serial driver is incorrect, the COM port number in Windows does not match the Configurator, or another CX-One tool is locking the same port. Close all other CX-One tools (CX-Programmer, CX-Integrator, CX-Simulator). Verify Device Manager > Ports shows the cable on the expected COM#. Match the COM number in Configurator > Network > Driver. Cycle the cable.

7.1 Verification sequence after fixing the routing

  1. Within the Configurator, go Online > Status > Master and confirm the DRM21 reports Online, Scan Mode = Run.
  2. Expand the scan-list nodes. Each DRT1-COM should show Status = Online, Connection = Established.
  3. From Edit > I/O Allocation Table, copy the CIO addresses into the CX-Programmer Symbol table (e.g. WordIn0 -> CIO 3300, WordOut0 -> CIO 3200). Save the symbol table as DevicenetMap.sym.
Common commissioning mistake: Downloading a new scan list to the DRM21 forces all slaves offline for one power cycle. If the system is in production, capture a status snapshot in the Configurator (File > Save Diagnostic Report) before pushing the new project.

8. PID Loop Implementation in CX-Programmer

The CS1G-CPU42 supports the classic (194) PID instruction. The 194 instruction writes its working registers to a contiguous 33-word block beginning at the user-supplied base word. The structure is documented in detail in the CS/CJ Series Instructions Reference Manual (W340 / W474) which is part of the Digital Technical Library.

Table 8.1 - PID(194) data block layout (base word = B)
Offset Word Function Typical Source
+0 B Set Point (SP) DM1000 - written from HMI or recipe
+1 B+1 Process Variable (PV) Analog input word (CIO 2001)
+2 B+2 Proportional Band (range 0.1-999.9 %) DM1010 (e.g. 50.0)
+3 B+3 Integral Time (0-9999 s, 0 = disabled) DM1011 (e.g. 120)
+4 B+4 Derivative Time (0-9999 s, 0 = disabled) DM1012 (e.g. 0)
+5 B+5 Control Period (0.1-999.9 s) DM1013 (e.g. 10.0)
+6..+8 B+6 to B+8 Range parameters / output bias 0, 100, 0
+9..+15 B+9 to B+15 Operating area, alarm, status Auto-handled
+16 B+16 MV (manipulated variable output, 0-4000 hex) Read to analog output
+17..+32 B+17 to B+32 Internal working area Do not write

8.1 Ladder example - two PID loops

 |                                                |
 |   W0.00  (RunLoop1)                             |
 |------- | | ----------------------------( PID(194) D1000 )---
 |                                                |
 |   W0.01  (RunLoop2)                             |
 |------- | | ----------------------------( PID(194) D1100 )---

For loop 1, base = D1000; SP comes from D1000, PV from D1001, output is read at D1016 and routed to analog output. For loop 2, base = D1100. Always set Control Period in B+5 to be at least 3-5x the PV filter time and at least 1 s longer than the longest I/O scan.

8.2 Auto-tuning caveat

The CS1G-CPU42 implements the original 'limit-cycle' AT (auto-tuning) in the PID instruction. AT needs a stable process and will briefly bump the MV by 20-30 %. Confirm with the customer that the controlled actuator is rated for that transient before triggering AT in production.

9. NT631C HMI - NTLink 1:N Connection

The customer's NT631C supports NT Link 1:N. This allows up to 8 NS/NT series terminals to share a single RS-422 port on the SCB41.

  1. On the SCB41 Port 2, set the protocol to NT Link 1:N with Highest Unit Number = 7.
  2. On the NT631C, set the DIP switches for the desired PT number (1-7) and baud to 187.5 kbps (NT Link 1:N default).
  3. Wire the RS-422 lines SDA / SDB / RDA / RDB with terminating resistors only at the two physical ends of the bus.
  4. Allocate the area used by the HMI in CX-Programmer (e.g. PT1 = CIO 1500..CIO 1524, PT2 = CIO 1525..CIO 1549) and configure the same ranges in the NT631C project.
PT number conflict: If two PTs share the same unit number, both will go offline every 3-5 s as the SCB41 tries to poll. The DIP switch and the CX-Programmer Number of PTs in NT Link must agree.

10. Optional Expansion - Adding CS1W-SCU21 or CS1W-SCU41

If the SCB41's two ports become saturated (one is now tied to NTLink, the spare is reserved for the integrators), a CS1W serial communication unit (not a board) can be added in a free CPU-rack slot. Both modules occupy one slot, take 20 CIO words for Software Switches / Status, and 100 DM words for setup.

Table 10.1 - SCU21 vs. SCU41 differences
Model Port 1 Port 2 Use Case
CS1W-SCU21 RS-232C RS-232C Modem, two HMI links, or gateway + printer
CS1W-SCU41 RS-422/485 RS-232C RS-422/485 multi-drop + RS-232 modem

For this project, an SCU21 would be the lowest-cost addition if the integrator wants a permanent engineering port (Toolbus on Port 1) independent of the SCB41.

11. Commissioning Checklist

  1. Verify CS1G-CPU42 firmware version. CPU Menu > CPU Information shows CS1G-CPU42 Vx.xx. Printscreen to a PDF.
  2. Upload the existing program, memory data, and DeviceNet configuration into a backup folder named YYYY-MM-DD_Backup.
  3. Capture a Configurator diagnostic report (File > Save Diagnostic Report).
  4. Open the new DeviceNet project, add the two new DRT1-COM nodes, and download the new scan list to the DRM21.
  5. Power-cycle the DeviceNet trunk and confirm all three DRT1-COM slaves come online with green MS/NS LEDs.
  6. From CX-Programmer, monitor the assigned CIO words and verify inputs toggle with sensor action.
  7. Force a sample output word from CX-Programmer (right-click > Set > On) and confirm the field device responds.
  8. Add the two PID blocks per Section 8, run an open-loop test, then enable AT only with the customer present.
  9. Schedule the production cutover. Switch to Program mode, download, and observe for 15 minutes before releasing the line.

12. Field-Validated Caveats

  • CS1G-CPU42 has no symbol memory. Any upload returns ladder + comments but no tag names. Recreate the symbol table from the customer's P&ID and wire it to the live I/O addresses.
  • Battery maintenance. The CS1G uses a CJ1W-BAT01 lithium battery. The customer is running 24/7, so the battery has probably been replaced. The PLC Setup bit Battery Low is A402.04; alarm on this in the HMI.
  • Fixed Configuration vs. Configurator. Switching the DRM21 between modes erases the scan list. Pick one mode and stay there.
  • SCB41-V1 port numbering. Port 1 in the CX-Programmer dialog is the upper D-sub, Port 2 is the lower terminal block. Get this right the first time or you will spend a day chasing the wrong connector.
  • Toolbus auto-detect. Use it. It is a 1-2 s connection at 115,200 bps, the fastest available on the CS1G peripheral port.

13. Related Manual and Resource Pointers

Can I program the CS1G-CPU42 over the SCB41-V1 serial board while the HMI is online?

No. The SCB41 has only one host per port; you must use the CPU's peripheral port (CS1W-CN114 cable) for engineering. Use the SCB41 only for permanent HMI, NT-Link, or modbus traffic.

The DeviceNet Configurator returns "Specified unit can not be accessed" - what does it mean?

You are using the SYSMAC WAY (SYSWAY) driver, which is a CPU-level protocol and cannot route to backplane cards. Switch the Configurator's Network Type to Toolbus via the peripheral port - Toolbus carries the FINS routing bytes needed to reach the DRM21-V1 master.

How do I retain DM and HR values when downloading a new program?

In CX-Programmer choose PLC > Transfer > To PLC and select Program + Memory Data, not Program only. Confirm the PLC Setup retain bits A500.15 (HR) and A500.14 (DM) are set. Then upload from PLC to verify the retained values match the previous snapshot.

Why does the CS1G-CPU42 reject the symbol/variable area I uploaded from another CS1?

Because the CS1G-CPU42 is pre-V3. Symbol and Function Block support was added in V3 firmware and is not present on a stock CS1G-CPU42. Use the legacy I/O memory view (IR, SR, AR, HR, LR, DM, EM) instead of the Symbol Editor.

Can I add a third DRT1-COM node without re-engineering the scan list?

Yes, if the DRM21 is in Fixed Configuration mode. The master will auto-discover the new slave at power-up and assign it the next free I/O slot. If the master is in Configurator-Defined mode, you must add the new slave in the DeviceNet Configurator and download the updated scan list to the DRM21.

What is the maximum number of NT series PTs I can connect to SCB41 Port 2?

Eight. Set the SCB41 protocol to NT Link 1:N with Highest Unit Number = 7, assign each PT a unique number 1-7 via DIP switch, and enable 220-ohm termination only at the two physical ends of the RS-422 chain.

Back to blog