System Overview
This reference describes a point-to-multipoint RS422/485 network built from one CJ1M-CPU13 acting as a Host Link master and two CPM1A-40IDR (40I family) CPUs acting as Host Link slaves. Each slave is fitted with a CPM1-CIF11 RS422/485 adapter on its peripheral port; the master is fitted with a CJ1W-CIF11 RS422/485 option board on its option board slot. The physical layer is 4-wire differential (RS422 full duplex) and the application layer is the Omron Host Link (SYSWAY) command set using the TXD(236), RXD(235), and FCS(180) instructions on the master. The application goal is to read three words from each CPM1A and write three words back to each CPM1A, with the CJ1M orchestrating all transactions.
The architecture deliberately uses Host Link (not PC Link, not NT Link, not 1:1 PLC Link) because the CJ1M must control the data flow, the CPM1A CPUs do not support PC Link between more than two units, and the CJ1M does not have a CP1L-style serial port 2 that can be reconfigured as a PC Link master for the CPM1A family. Host Link over RS422 is the supported multi-vendor multi-drop configuration documented in the Omron CS/CJ Serial Communications Manual (Cat. No. W345).
Prerequisites and Hardware Inventory
| Item | Catalog Number | Role | Required Setting |
|---|---|---|---|
| Master CPU | CJ1M-CPU13 | Host Link master, poller | Port: RS-422A, Host Link, Unit #0 |
| Serial option board | CJ1W-CIF11 | RS422 driver for CJ1M | Terminating resistor ON (last node) |
| Slave CPU #0 | CPM1A-40IDR (or 40I variant) | Host Link slave | Peripheral port: Host Link, Unit #1, 9600/7-E-2 |
| Slave CPU #1 | CPM1A-40IDR (or 40I variant) | Host Link slave | Peripheral port: Host Link, Unit #2, 9600/7-E-2 |
| Slave peripheral adapter | CPM1-CIF11 | RS422 driver for CPM1A | Terminating resistor ON at end nodes only |
| Programming software | CX-Programmer (version supporting CJ1M) | Ladder, ST, and FB development | PLC model set to CJ1M-CPU13 |
| Cable | Shielded twisted pair, 4-wire + shield | Bus interconnect | Total bus length < 500 m at 9600 baud (per W345) |
All PLCs must use the same serial parameters. The de-facto Host Link defaults are 9600 bps, 7 data bits, even parity, 2 stop bits (commonly written 9600,7,E,2). Do not change these from the factory defaults unless all three PLCs are reconfigured in the same way. The manual protocol-mode description "RS232C" in the CJ1M I/O table dialog simply means "the port is in serial-protocol mode driven by TXD/RXD"; the physical driver on the option board is RS422 or RS485. See the CS/CJ Serial Communications Manual (W345) section 2 for the relationship between the port-mode setting and the physical layer.
Physical Layer: RS422 Wiring and Pinout
RS422 is a 4-wire differential, full-duplex bus. Each node has a dedicated transmit pair (SDA/SDB) and a dedicated receive pair (RDA/RDB). Because every node is listening on its own receive pair simultaneously, a true multi-drop Host Link bus daisy-chains the transmit pair of the master into the receive pair of every slave in parallel and the transmit pair of every slave into the receive pair of the master in parallel. Termination is required at the two physical ends of the bus only.
| Signal | CJ1W-CIF11 terminal (master) | CPM1-CIF11 terminal (slave) | Direction |
|---|---|---|---|
| SDA (TX-) | SDA | RDA | Master → Slaves |
| SDB (TX+) | SDB | RDB | Master → Slaves |
| RDA (RX-) | RDA | SDA | Slaves → Master |
| RDB (RX+) | RDB | SDB | Slaves → Master |
| FG / Shield | FG | FG | Chassis ground, single point |
ON/OFF near the terminal block; on the CPM1-CIF11, termination is selected by a switch labeled TERM-ON / TERM-OFF on the adapter PCB. See the CJ1W-CIF11 datasheet in the CJ-series catalog for the exact location.Keep the shield continuous from end to end and ground it at one point only (typically the master cabinet ground). The Omron IA Global site hosts the SYSMAC CJ1 Series Catalog (Cat. No. P052) which documents cable construction and maximum bus length versus baud rate.
Protocol Selection: Host Link vs PC Link vs 1:1 PLC Link
Three Omron serial protocols could theoretically move data between these CPUs. Each has restrictions that disqualify it for this topology, with one exception.
| Protocol | CPM1A Support | CJ1M Support | Multi-drop | Verdict for this application |
|---|---|---|---|---|
| Host Link (SYSWAY) | Yes, via peripheral port + CIF11 | Yes, via option board + TXD/RXD | Up to 32 nodes on RS422/485 | Use this |
| 1:1 PLC Link | Yes | Yes | Exactly 2 nodes | Cannot reach 2 CPM1A from one CJ1M without relay |
| NT Link (1:N) | Yes (1:1 only on CPM1A peripheral port) | Yes | Up to 8 PTs, not PLCs | For PT/operator interface, not PLC-to-PLC |
| PC Link (CJ1M port 2 only) | No | Yes, but only on the CJ1M's built-in port 2 in PC Link mode | Up to 9 CJ-series nodes | Not supported on CPM1A peripheral port |
Host Link is the only Omron serial protocol that all three of these CPUs can speak on the same physical bus. The CJ1M becomes the master, polls each slave in turn, and the slaves only respond when addressed. There is no peer-to-peer traffic between the two CPM1A PLCs; if data must be exchanged between them, the CJ1M reads from one and writes to the other.
Configuring the CJ1M-CPU13 Serial Port
The CJ1W-CIF11 option board occupies slot 1 of the CJ1M CPU's option board bay. The port is logically Serial Port 1 on the option board. The following PLC Setup words must be programmed either through CX-Programmer's PLC Settings dialog or by writing the values from ladder at first scan. The values shown are the W345 defaults for Host Link on a 4-wire RS422/485 option board.
| PLC Setup Word | Bit(s) | Setting | Meaning |
|---|---|---|---|
| 160 (Port 1 baud) | — | 0064 hex (9600) | 9600 bps |
| 161 (Port 1 format) | — | 0003 hex (start bits 1, data 7, parity even, stop 2) | 7-E-2 |
| 163 (Port 1 mode) | — | 0004 hex (Host Link, RS422/485) | Host Link master |
| 164 (Port 1 unit number) | — | 0000 hex (master = 00) | Master unit number |
| 165 (Port 1 end code) | — | 000D hex (CR only) | Frames terminate with 0x0D |
| 166 (Port 1 max receive) | — | 0064 hex (100 bytes) | RXD buffer size |
| 168 (Port 1 send delay) | — | 0000 hex (no delay) | Inter-character delay 0 |
Configuring the CPM1A-40I Slave Ports
On the CPM1A, the peripheral port (the round mini-DIN on the CPU) is repurposed as an RS422/485 port by the CPM1-CIF11 adapter. The peripheral port protocol, unit number, and serial format are configured in DM 6650–DM 6653. The factory defaults are normally already correct for Host Link slave operation, but they must be verified.
| DM Word | Bit(s) | Value (Slave #0) | Value (Slave #1) | Meaning |
|---|---|---|---|---|
| DM 6650 | Bits 12–15 | 1 | 2 | Peripheral port unit number (1, 2) |
| DM 6650 | Bits 0–11 | 000 hex | 000 hex | Peripheral port: Host Link slave |
| DM 6651 | — | 000 hex | 000 hex | Default frame: 7-E-2, 9600 bps |
| DM 6652 | — | 0000 hex | 0000 hex | No CTS control, no transmission delay |
| DM 6653 | — | 0 | 0 | No end code addition |
DM 6650 = (unit_number << 12) | 0x000.Pin 5 of the CPM1A's built-in RS232C port (not the peripheral port) has historically caused an EX header to be appended to responses on older CQM1 CPUs. This is a CQM1-specific issue and does not affect the CPM1A's peripheral port when the CIF11 is fitted, but flag the pin for any technician migrating the design to a CQM1 platform.
Host Link Frame Structure and FCS Calculation
Every Host Link command has the same envelope. The 8-bit Frame Check Sum (FCS) is the two's complement of the XOR of every byte between @ and the last byte of the data field. Many programmers implement the OMRON FCS calculation as: start with 0x00, XOR each ASCII byte, take the one's complement, then take the two's complement (or equivalently XOR with 0xFF). The result is two ASCII-hex characters that are appended before the terminator.
@ [unit#] [header] [text] [FCS hi] [FCS lo] [terminator]
2 chars 2 chars n chars 2 chars 1 char (0x0D)
Example command to read 3 words starting at DM 0000 in slave unit #1:
ASCII : @ 0 1 R R 0 0 0 0 0 0 0 3 F C S CR
HEX : 40 30 31 52 52 30 30 30 30 30 30 30 33 -- -- -- 0D
The RR header is the read-DM-area command. The first four digits after the header are the starting word address in BCD. The next four digits are the number of words in BCD. The two FCS bytes are computed across bytes 1 through 12 (the characters from 0 to 3). A worked example using 8-bit XOR then one's complement:
0x30 ^ 0x31 ^ 0x52 ^ 0x52 ^ 0x30 ^ 0x30 ^ 0x30 ^ 0x30 ^ 0x30 ^ 0x30 ^ 0x30 ^ 0x33 = 0x7E
One's complement of 0x7E = 0x81
Two's complement of 0x81 = 0x7F
ASCII FCS characters = '7' and 'F' (0x37 0x46)
The Omron FCS(180) instruction does exactly this calculation in ladder. Place the source string starting at the @ character with control words C+1, C+2 specifying the start offset and length to be included in the checksum. The instruction writes the two ASCII FCS bytes to C+3 and C+4.
Master Ladder Logic: TXD/RXD/FCS Polling Sequence
The CJ1M runs a single state machine that walks through six states for each poll cycle: build a write command for slave #1, calculate FCS, transmit, wait for response or timeout, build a read command, repeat for slave #2. Two 200-step ladder rungs fit comfortably. The sequence below is the canonical implementation referenced throughout the W345 manual's example programs.
State 0 — Build write command for slave #1
Pre-load the following ASCII characters into the string buffer starting at D01000:
D01000 : '@' (0x40) -- Start of frame marker
D01001 : '0' (0x30) -- Unit #1, tens
D01002 : '1' (0x31) -- Unit #1, ones
D01003 : 'W' (0x57) -- Write DM command
D01004 : 'R' (0x52) -- DM area specifier
D01005 : '0' (0x30) -- Start address, thousands
D01006 : '0' (0x30) -- Start address, hundreds
D01007 : '0' (0x30) -- Start address, tens
D01008 : '0' (0x30) -- Start address, ones
D01009 : '0' (0x30) -- Word count, thousands
D01010 : '0' (0x30) -- Word count, hundreds
D01011 : '0' (0x30) -- Word count, tens
D01012 : '3' (0x33) -- Word count, ones (3 words)
D01013..D01024 : 3 words × 4 ASCII hex chars = 12 bytes of data
D01025 : placeholder for FCS high
D01026 : placeholder for FCS low
D01027 : CR (0x0D)
Copy the three data words from D00050–D00052 (the CJ1M's source registers) and convert each to four ASCII-hex characters using HEX(–) or a custom BCD-to-hex routine before storing in D01013–D01024.
State 1 — Calculate FCS
FCS(180)
S : D01000 ; pointer to first byte of string
C : D01028 ; control block:
; C+1 = D01029 = 0 (start offset, 0 = '@')
; C+2 = D01030 = 24 (length: bytes 0 through 23)
; C+3 = D01031 (FCS high returned here)
; C+4 = D01032 (FCS low returned here)
Move the two computed FCS bytes from D01031/D01032 into D01025/D01026 (the placeholders built in State 0).
State 2 — Transmit
TXD(236)
S : D01000 ; source string
C : D01033 ; control block:
; C = 0000 (port 1, no protocol macro, binary mode)
; C+1 = 28 (number of bytes to send: 25 ASCII + 2 FCS + 1 CR)
; C+2 = 0 (no offset)
State 3 — Wait for response with timeout
Use the Port 1 Port Re-Execute bit A526.13 to monitor transmission complete. Arm a 1-second TIM instruction in parallel. If the response is not received before the timer expires, the CJ1M increments an error counter and aborts the current slave's transaction.
State 4 — Receive response with RXD
RXD(235)
D : D02000 ; destination buffer
C : D02050 ; control block:
; C = 0000 (port 1, store raw bytes)
; C+1 = 30 (max bytes to receive)
; C+2 = 0 (no offset)
The expected response is @01WR…FCS CR for a successful write or @01ERFCS CR for an error. The error code 0x0F inside the ER response means the slave did not recognize the command; 0x10 means the command was rejected; 0x11 means the starting address is out of range. See W345 section 5-2 for the full error-code table.
State 5 — Build read command for slave #1, then repeat for slave #2
Build the read command (RR header) the same way. After both slaves have been polled, return to State 0 and begin the next cycle. A typical poll period of 100–500 ms is sufficient for a 3-word read/write on a 9600 baud bus.
State machine summary
| State | Action | Trigger to next state | Typical duration |
|---|---|---|---|
| 0 | Build write frame for slave n | Frame complete flag | < 5 ms |
| 1 | FCS(180) calculate | Done bit | < 1 ms |
| 2 | TXD(236) transmit | A526.13 (TX done) = 1 | ~30 ms at 9600 baud for 25-byte frame |
| 3 | Wait + timeout | RXD ready OR 1-s TIM | 20–200 ms |
| 4 | RXD(235) + parse | Done bit | < 1 ms |
| 5 | Increment slave index, return to 0 | End of cycle | 0 ms |
Function Block Alternative: _CPU015_TXD and _CPU015_RXD
_CPU015_TXD and _CPU015_RXD are an Omron-published workaround intended for CJ1M-CPU11 and CJ1M-CPU21 CPUs (the low-end 10/20 I/O point variants that have limited built-in protocol handling). The CJ1M-CPU13 and CJ1M-CPU23 already support the standard TXD(236) and RXD(235) instructions directly and do not need these function blocks. Reference the CJ1M CPU Unit Operation Manual (W353) Appendix A for the function-block library applicability table.If a programmer is migrating the design to a CPU11/21, the two FBs encapsulate the TXD and RXD sequences above and reduce the state machine to a single call per transaction. The function block bodies expect a control block of the form:
Control word for _CPU015_TXD:
W0 = port number (1 = option board)
W1 = source DM address of string
W2 = byte count to send
W3 = completion flag (set by FB)
W4 = error code (set by FB)
The same gotcha with the starting DM being 0 applies: the string's first byte (the @ marker) must be at a non-zero DM offset or the CJ1M will not transmit anything. The reference test string is 0x40 0x30 0x30 0x52 0x52 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x31 0x31 0x2A 0x0D, with the two FCS placeholders in 0x12 and 0x13.
Port Error Recovery Procedure
On the CJ1M, the serial port error flags live in the auxiliary area:
| Auxiliary bit / word | Name | Description |
|---|---|---|
| A526.13 | Port 1 Restart Bit | Turn ON to restart the port after a transmission error |
| A526.00–A526.12 | Port 1 Error Flags | Parity error, framing error, overrun, FCS error, timeout |
| A528 | Port 1 Error Clear | Write 0x0001 to clear error flags and reset the port state machine |
When Host Link polling stalls and the port is stuck, the field-proven recovery is:
- Force the restart bit
A526.13 = 1for one scan. - Move the constant
#0001intoA528to clear all port-1 error flags. - Disable polling for 100 ms to allow the port to reinitialize.
- Resume the state machine from State 0.
This four-step sequence restores the port without requiring a power cycle and is documented in the troubleshooting section of the CS/CJ Serial Communications Manual (W345). The same procedure applies to CS1 series CPUs on their serial port 1 or 2.
Multi-Drop Addressing and Polling Discipline
RS422 supports up to 32 drivers on the bus, but Host Link is a strict master/slave protocol: only one node transmits at a time, and slaves only respond when addressed. The CJ1M must therefore interleave transactions with a guard time equal to the maximum slave response time, typically 100 ms at 9600 baud. If the CJ1M is also using the same option-board port to talk to an HMI, that HMI must be off the bus or on a separate port — Host Link does not allow the HMI to interleave reads on the same bus while the CJ1M is polling the CPM1A PLCs.
Verification and Commissioning Checklist
- Confirm DM 6650 on each CPM1A is unique and matches the addresses hard-coded in the CJ1M's TXD frames.
- Confirm CJ1M PLC Setup words 160–168 are written to the values shown in the table above and that the PLC Setup area is protected from inadvertent writes.
- Open CX-Programmer's PLC Transfer window and watch the Port 1 error flags in A526 during a single poll cycle. All bits should remain 0.
- Insert a temporary breakpoint in the CJ1M's RXD handler and inspect D02000–D02030. Verify the response begins with
0x40 0x30 0x31(or 0x32 for slave #2) and ends with0x0D. - Force a known value into D00050 of the CJ1M, run one full poll cycle, and read back DM 0–2 of the matching CPM1A from CX-Programmer. Verify they match.
- Disconnect slave #1's RS422 cable. Confirm the timeout path increments the error counter and that slave #2 continues to be polled successfully.
- Reconnect slave #1, run the A528 recovery routine from ladder, and confirm the bus self-heals within one second.
Troubleshooting Matrix
| Symptom | Likely cause | Diagnostic | Remedy |
|---|---|---|---|
| No response on any poll | Wiring swap between RDA/RDA and SDA/SDA, or termination missing | Measure differential voltage on bus with oscilloscope; should toggle between +1.5 V and -1.5 V | Re-wire per pinout table; enable termination at both ends |
| Intermittent FCS errors | Two slaves at same unit number, or shield grounded at both ends | Read DM 6650 on both slaves; check for ground loop with multimeter on shield-to-ground at each end | Re-address slaves; re-ground shield at one point only |
| Slaves respond once then bus locks up | Port stuck in error state, A526 flags set | Watch A526 in CX-Programmer online monitor | Run the A528 recovery sequence |
| First poll succeeds, second poll FCS error | Receiver buffer not flushed between transactions | Inspect D02000 in subsequent scans; residual bytes present? | Clear D02000 to zeros before each TXD, or set the RXD buffer offset |
| CJ1M transmits but no LED activity on CIF11 | Option board not seated, or PLC Setup not written | Check I/O table in CX-Programmer; confirm option board recognized | Reseat option board; write PLC Setup and cycle power |
| Reads return zeros but writes succeed | Read command header is WR instead of RR | Inspect ASCII characters at D01000 after state 0 | Correct header bytes; reload project |
| Slave responds with EX header | CQM1 legacy CPU with pin 5 of RS232C port ON; not applicable to CPM1A peripheral port | Check CPU model and port | On CQM1, set pin 5 OFF; on CPM1A, this is not a concern |
| Port will not reinitialize after PLC power cycle | PLC Setup words 160–168 are not retained in flash | Verify PLC Setup transfer to flash via CX-Programmer | Transfer PLC Setup to CPU flash memory |
Field-Proven Pitfalls
- String at DM 0: Always place the Host Link frame buffer at a non-zero DM offset. The TXD(236) and RXD(235) instructions interpret a zero in the first word as a null pointer and abort silently.
- Parity mismatch: The CJ1M's default Host Link format is 7-E-2. The CPM1A's peripheral port default is also 7-E-2. If either side is changed to 8-N-1 (a common mistake when programmers think "modern serial"), every FCS calculation will fail because the byte count and the parity bit interpretation no longer match.
- HMI on the same bus: Many HMIs default to the Host Link protocol on the same RS422 bus. An HMI scanning the bus at 50 ms poll rate will collide with the CJ1M's poll of the CPM1A PLCs. The fix is to put the HMI on the CJ1M's built-in RS232C port and reserve the CJ1W-CIF11 option board exclusively for the CPM1A bus.
- Terminator configuration: The CJ1M's end-code setting in PLC Setup word 165 must be 0x0D (CR) to match the CPM1A's response terminator. If the CJ1M is set to 0x0D 0x0A (CRLF), the first byte of the next response will appear in the FCS field of the previous frame and the port will report a constant FCS error.
FAQ
What serial parameters do all three PLCs need to share for Host Link over RS422?
All three PLCs must use 9600 bps, 7 data bits, even parity, and 2 stop bits (9600, 7-E-2). These are the Host Link defaults shipped in every CJ1M and CPM1A; do not change them on any node without re-applying the same value to the other two. See CS/CJ Serial Communications Manual W345 section 2-2.
Can the two CPM1A PLCs talk to each other directly without the CJ1M in the middle?
No. CPM1A 1:1 PLC Link only works between exactly two PLCs, and PC Link is not supported on the CPM1A peripheral port. If slave #0 must send data to slave #1, the CJ1M reads the value from slave #0 with a Host Link RR command, stores it in D-memory, and writes it to slave #1 with a Host Link WR command in the next poll cycle. Expect a 100–300 ms latency per hop.
Why does the port lock up after a single failed poll, and how do I recover?
The CJ1M sets the port-1 error flags in A526 when a transmission or reception fails (FCS mismatch, timeout, overrun). Once set, the port refuses to start a new transaction. The recovery is to write 0x0001 to A528 to clear the error flags, pulse the restart bit A526.13 for one scan, and resume the state machine. This is documented in W345 section 6-3 and is field-proven across CS1, CJ1, and CJ2 platforms.
Can I put an HMI on the same RS422 bus as the CJ1M and the two CPM1A PLCs?
No. Host Link is a single-master protocol; only the master (CJ1M) may initiate transactions, and slaves only respond when polled. An HMI on the same bus will collide with the CJ1M's poll. Use the CJ1M's built-in RS232C port for the HMI and reserve the CJ1W-CIF11 option board for the CPM1A bus exclusively.
Do I need different unit numbers on the two CPM1A slaves?
Yes. Each slave must have a unique Host Link unit number between 01 and 31. The unit number is written to the upper four bits of DM 6650 on the CPM1A. Two slaves at the same unit number will both respond to the same poll and their frames will collide on the master's receive pair, producing constant A526 FCS errors. The CJ1M master's unit number is 00 (set in PLC Setup word 164) and must be different from any slave.