Troubleshooting
Reading Modbus RTU writes into a CJ1W-SCU31-V1 slave area
Short answer
The CJ1W-SCU31-V1, configured as a Modbus RTU slave, stores each master write in its allocated slave data area by itself, so there is no ladder receive instruction to add. If the area starts at D0, holding register 40001 maps to D0 and 40010 to D9, and the CJ2M ladder reads those D words directly. Fix the Micro850 MSG_MODBUS errorID 21 local channel configuration error before testing any data.
On this page
- The slave side stores writes without a receive rung
- Worked example: mapping holding registers 40001 to 40010 into D0 to D9
- Clearing errorID 21 on the Micro850 before any data test
- Proving the write path with a test value
- Using the mapped D words in the CJ2M ladder
- When a successful write lands outside D0
- Questions asked
A Modbus RTU slave never fetches data, so there is nothing to program on the Omron side to receive a write. With the CJ1W-SCU31-V1 on your CJ2M rack configured as a Modbus RTU slave, the serial unit itself stores every master write into the PLC memory area you allocated as its Modbus slave area. If that area starts at D0, holding register 40001 is your first word, and the CJ2M ladder simply uses those D words; no send or receive instruction exists for this job. What the Omron side owes the project is a confirmed allocation and a proven test write. Before any of that, clear the errorID 21 your Micro850 MSG_MODBUS instruction reports: a local channel configuration parameter error stops the request inside the master, and no change on the Omron side can fix it.
The slave side stores writes without a receive rung #
Modbus RTU is a strict master-slave protocol: the slave answers requests and never initiates one. A CJ-series serial communications unit running as a Modbus RTU slave therefore does the receiving itself, outside your ladder. You allocate a Modbus slave data area in PLC memory — the DM area in your setup, a block of D words, configured in the unit's Modbus slave settings as documented in Omron's CJ-series Serial Communications Units operation manual — and the unit places each master write into that range on its own. Your program reads the mapped words like any other PLC data.
That is why the answer to "what do I run on the Omron side to read the Micro850's writes?" is: nothing. There is no receive rung to add, and adding one would not move the data. The real work is elsewhere: serial settings that match on both ends — baud rate, parity, stop bits, and the slave node address, which you already configured on the CJ1W-SCU31-V1 — and then the address mapping proved with a real write below.
Remember the direction of the link as you size the exchange: the master owns the wire and polls each slave in turn, and one serial port moves only so many register words per second. The round-trip arithmetic in why Modbus RTU drive polling on one serial port is slow sets how fast this data can refresh as you add registers.
Worked example: mapping holding registers 40001 to 40010 into D0 to D9 #
Inputs. The slave area starts at D0, the allocation this project uses, set in the serial unit's Modbus slave configuration. The Micro850 writes holding registers whose first register is protocol address 0, which one-based Modbus notation shows as 40001. The example takes ten registers — that count is this example's input; enter whatever length your data block needs in the MSG_MODBUS instruction. Holding registers live in the 4xxxxx block, where 40001 corresponds to protocol address 0, and the units throughout are one register per D word.
Rule in words. Subtract the one-based base, 40001, from the displayed register number to get the zero-based offset, then add that offset to the allocated start word.
Arithmetic.
- First register: 40001 - 40001 = 0, and D0 plus 0 words = D0.
- Last register: 40010 - 40001 = 9, and D0 plus 9 words = D9.
- Span check: ten registers occupy protocol addresses 0 through 9, exactly D0 through D9, ten consecutive D words.
Result. The Micro850's ten-register write lands in D0 through D9: first value in D0, tenth in D9.
Decision. Watch D0 through D9 in the programming software's online monitor and have the master write a recognizable constant into the first register. If the constant appears in D0, the mapping is proven and the ladder may use the range. If the request completes without error but D0 keeps its old value, the master is writing a different range or the slave area does not actually start at D0; do not let the ladder use any of the data until that is resolved. A tool that displays the address as 0 and a tool that displays 40001 point at the same register, so map by the offset and never by the label alone.
Clearing errorID 21 on the Micro850 before any data test #
When the MSG_MODBUS instruction reports errorID 21, the fault is local. Rockwell's documented Micro800 list of MSG_MODBUS and MSG_MODBUS2 error codes gives 21 as "A local channel configuration parameter error exists." That points at the Micro850's channel setup or instruction parameters — not the cable, not the CJ1W-SCU31-V1 — and it stops the message before any exchange starts, so leave the Omron ladder alone until it clears.
The code names no specific bad parameter, so inspect the channel settings and the instruction parameters together:
- The channel selected in the MSG_MODBUS instruction is the Micro850's serial channel wired to the CJ1W-SCU31-V1, not an unused or Ethernet channel.
- That channel is configured for Modbus RTU master operation, not another protocol or a passive mode.
- The channel's baud rate, parity, and stop bits match the slave settings you already entered on the Omron unit.
- The instruction's node address, function code, starting address, and register count are re-entered against the Micro850 documentation for your software version, because 21 reports a parameter problem on this local side.
When 21 clears but every request still fails, the local parameters are valid and the remaining suspects are wiring, the slave node address, or a serial-parameter mismatch. Do not treat a configured serial port as proof the instruction's local parameters are valid; the error surfaces only when the message executes. The same read-the-errorID-first method drives the 2080-MOT-HSC ErrorID 13 fix for the Micro850 high-speed counter, another case where the instruction's own code points at its parameters before the wiring is touched.
Proving the write path with a test value #
Work the layers in order; each step isolates a different fault:
- Clear errorID 21 as above, so the message actually executes and finishes with no error code.
- In the CJ programming software, open the online monitor on the mapped words, D0 through D9 for the example mapping.
- From the Micro850, write a recognizable constant into one noncritical register in the range, such as the first register, 40001, which maps to D0.
- Confirm the request completes without an error code and that D0 now holds the constant you sent.
- Repeat at the far end, the tenth register 40010, which maps to D9, to prove the count as well as the start.
- Only after both ends match, point the ladder at the range.
A timeout at this stage points at wiring, the node address, or serial settings, because errorID 21 is already gone. A request that succeeds while the words stay put is not a communications fault at all; it is mapping, and the next section handles it.
Using the mapped D words in the CJ2M ladder #
With the mapping proven, the ladder treats the mapped range as ordinary data: move the words into work registers, compare them, use them as setpoints. No receive rung adds anything; the serial unit already updated them.
Gate application use on communication status, because a value in the slave area is only as fresh as the master's last poll. Hold your own comms-alive condition — a heartbeat register the master writes on a fixed cycle is the usual tool — and pass commands or setpoints to the machine only while it is alive, with the same range and plausibility checks you would give any remote setpoint. Until the comms-alive condition and the range checks both pass, hold the affected outputs in their safe state rather than trusting a stale or missing Modbus value.
Keep the master's register layout and the Omron word assignment documented together, in one table kept with the programs. An edit on either side that is not reflected on the other silently redirects data into words your ladder is not watching.
When a successful write lands outside D0 #
The request completes with no error and D0 does not change. Work these in order:
- Verify the allocation itself: the slave-area start is a configuration choice on the CJ1W-SCU31-V1's Modbus slave setup, and D0 is a choice, not a default you can assume. Open the unit's configuration and read the actual start word.
- Re-apply the offset rule with that start: displayed register number minus 40001, plus the allocated start word, gives the Omron word that should change.
- Check the register count in the write against the range you are watching; watching the start word alone proves nothing about the words after it.
- Mind the notation: one-based and zero-based displays name the same register, so a tool's display style alone never identifies the Omron word.
A completed write with unchanged words is almost always addressing or allocation, not wiring, because a wiring or node-address fault shows up as a timeout or error at the master instead. Fix the layers in the order they fail: channel setup first, the serial exchange second, the mapping third, and the ladder's use of the words last.
Questions asked
How many holding registers can one Modbus RTU write carry?
The serial protocol caps a request payload at 253 bytes, which leaves room for 123 registers in one function 16 write of multiple registers; function 06 writes a single register. An exchange that needs more than 123 words must be split into several requests, and the master's polling cycle then sets how quickly the mapped D words refresh.
Is errorID 21 on the Micro850 MSG_MODBUS a wiring fault?
No. Rockwell's MSG_MODBUS and MSG_MODBUS2 code list documents 21 as a local channel configuration parameter error, which points at the Micro850's channel setup and instruction parameters rather than the cable or the CJ1W-SCU31-V1. Documented codes just above it, such as 22 for an address above the maximum node address, describe different checks. Wiring becomes a suspect only after errorID 21 clears and requests still fail.
Can the CJ1W-SCU31-V1 slave area start somewhere other than D0?
Yes. The start of the Modbus slave data area is a configuration setting on the serial unit, and master registers land relative to whatever start you allocated. The offset rule does not change: subtract 40001 from the displayed register number and add the result to the allocated start word. Prove the real allocation with a known test write before the ladder trusts any value from the range.
Does the slave area also serve reads from the Micro850 master?
Yes. The same allocated area answers reads, so the exchange runs both ways with no extra ladder: the CJ2M CPU writes a value into a mapped D word and the master's next read of the matching holding register returns it. Master writes land in those same words, so split the range and keep a master-written setpoint in registers the CJ2M program does not overwrite.