IMDHMIControls LibraryShop main store

How-to

What a CP1H to CLICK PLC Modbus RTU link needs

Industrial networks Published 9 min read By IMDHMI controls team

Short answer

Make the CP1H's CP1W-CIF01 RS-232C port the Modbus RTU master and the CLICK PLC's RS-232 port the Modbus RTU slave. Both ends must run RTU with identical baud, parity and stop-bit settings; the CLICK's RS-232 port carries RTU only. Wire transmit and receive crossed with signal ground, then prove the link with one read of a known holding register before building any exchange logic.

On this page
  1. Decide which PLC polls and which one answers
  2. Wire the RS-232C crossover before configuring anything
  3. Set both ends to RTU with identical serial settings
  4. Reading 10 holding registers from CLICK slave address 2
  5. Map and send the first read
  6. Trace a failed link hop by hop
  7. Prove the exchange and set the poll cycle
  8. The decisions for this link
  9. Questions asked

Connect the CP1H to the CLICK PLC as one Modbus RTU master talking to one Modbus RTU slave over a point-to-point RS-232C cable, and nothing crosses that link until both ends agree on framing and serial settings. The CLICK's RS-232 port carries Modbus RTU only, so RTU is not a preference here — the port forces it. Set the CP1W-CIF01 option board on the CP1H as the RTU master, set the CLICK's RS-232 port as the RTU slave at its own address, give both ends the same baud, parity and stop bits, and prove the path with a single read of a known register. Once that one read works, writes and handshaking are program work on a proven link; until it does, every fault lives in one specific hop, and this article walks each one.

Decide which PLC polls and which one answers #

A Modbus serial link has exactly one initiator. The master issues every request, and the slave listens for requests that carry its address and answers them; it never transmits on its own. Two masters on one RS-232C point-to-point link transmit over each other with no arbitration, so neither receives a reply and both report timeouts.

Commit to the roles before wiring anything: the CP1H polls, running its CP1W-CIF01 port as the Modbus RTU master, and the CLICK answers, running its RS-232 port as a Modbus RTU slave. If your application needs the CLICK to own the polling cycle instead, swap the roles — but only one end initiates, whichever you choose. No cable, baud rate or register map repairs a link with two masters on it, or with none.

Wire the RS-232C crossover before configuring anything #

RS-232C is point-to-point, not a bus: one transmitter and one receiver at each end, no termination resistors, no addressing on the wire. Connect the CP1H's transmit output to the CLICK's receive input, the CLICK's transmit back to the CP1H's receive, and signal ground to signal ground. Which pin does what comes from each manual: the same connector shell is no guarantee of the same pin assignment, and whether the cable is straight-through or crossed follows from the two devices, not from the connector.

Fit the CP1W-CIF01 with the CP1H powered down; seat the snap-on option board with the unit off.

Keep the run short — about 15 m is the RS-232C standard's own ceiling at full rate — and power both PLCs from the same panel, so the signal ground lead stays a voltage reference rather than a bridge between two different ground potentials.

Set both ends to RTU with identical serial settings #

RTU and ASCII are two different wire formats, not two flavors of one. The Modbus over Serial Line specification bounds an RTU frame with silence — at least 3.5 character times of quiet between frames, no more than 1.5 inside one — and protects it with a 16-bit CRC appended low byte first. An ASCII frame instead opens with a colon character, carries every byte as two hex characters, closes with carriage return and line feed, and protects itself with an 8-bit LRC. A port listening in one mode cannot decode a frame sent in the other.

For this link the framing is already settled. The CLICK's serial documentation puts Modbus RTU only on its RS-232 port, the same port it documents for programming, so the link runs RTU and the CP1H's option-board port is set to RTU master to match.

Set one identical serial set on both ends: a baud rate both manuals document, 8 data bits, even parity — the serial specification's default — and 1 stop bit, with no handshaking on either end. Handshaking that one port asserts while the cable does not carry it stalls the link silently and looks exactly like a dead slave. Each of these settings changes how the same bits decode on the far end; the article on what parity and stop bits change in a Modbus read shows the effect on the received value.

Reading 10 holding registers from CLICK slave address 2 #

For the first proof, send one read and nothing else. The example's inputs:

  • Slave address 2 — the address this walk-through assigns to the CLICK in its slave setup; any fixed address works as long as both ends carry it.
  • Function code 03, read holding registers — the Modbus application protocol's read for holding-register areas.
  • Start address 0 — the first holding register in the protocol's zero-based numbering, the location a document usually displays one-based as 40001.
  • Quantity 10 registers — sent as 0x000A in the frame.
  • Serial framing 9600 baud, 8 data bits, even parity, 1 stop bit — the identical set from the previous section.

The rule: an RTU read request is six data bytes plus a check — one slave-address byte, the function byte, two start-address bytes, two quantity bytes, then the 16-bit CRC appended low byte first. The ASCII twin wraps the same six bytes as hex characters between a colon and a carriage return–line feed pair, with an 8-bit LRC where the CRC sits.

The arithmetic: CRC-16 over 02 03 00 00 00 0A comes out as B509, appended low byte first, so the RTU frame on the wire is 02 03 00 00 00 0A 09 B5 — eight bytes. At this framing each serial character is 11 bits (start, eight data, parity, stop), so the frame costs 8 × 11 = 88 bits, and 88 ÷ 9600 baud = 9.2 ms of line time; the RTU silence around it adds 3.5 × 1.15 ms, about 4 ms, before the next frame may begin. The ASCII twin sums the same six bytes and appends the two's complement: 02 + 03 + 00 + 00 + 00 + 0A = 0F, then 0x100 − 0x0F = F1, giving :02030000000AF1 plus CR and LF — 17 characters — and at 10 bits per ASCII character that is 17 × 10 = 170 bits, and 170 ÷ 9600 baud = 17.7 ms.

The result and the decision: one read of ten registers costs about 9.2 ms on the wire in RTU against 17.7 ms in ASCII, before any response travels — but the speed gap is not why the modes must not be mixed. The CLICK's RS-232 port decodes RTU only, so the decision is RTU at both ends; a master left in ASCII sends frames the CLICK never answers, every poll times out, and no change of address, register or timeout repairs it.

Map and send the first read #

  1. In the CLICK's port configuration, enable the Modbus RTU slave service on the RS-232 port and set its slave address to the master's target — 2 in this example. Map the CLICK data you want to exchange into the holding-register range its manual documents.
  2. Check which area the CLICK exposes before choosing the function: whether a location sits in holding registers or input registers decides the function code, and the holding register versus input register comparison sets that choice out.
  3. On the CP1H, set the CP1W-CIF01 port to Modbus RTU master with the identical serial set from the previous section and no handshaking.
  4. Build one read in the CP1H's master function: slave address 2, function 03, start address 0, quantity 10, destination a block of ten words in CP1H memory. Mind the numbering conventions — the request carries a zero-based address while software often displays the same location one-based as 40001, so entering the displayed number directly reads the neighboring register.
  5. Power both PLCs and trigger a single poll. Check the master's transaction status first: a completed read with the words received proves cable, framing, addressing and mapping in one shot.
  6. Change the value in the CLICK at the mapped location, poll once more, and confirm exactly that block changed — one good transaction updates only the intended words and nothing else.

A timeout is the master's report that no acceptable response arrived; it does not name the hop that failed. Walk the path in order — electrical reception, framing, application, mapping — change one variable at a time, and record each result. Do not raise the master's timeout to hide a poll that was never answered; a longer timeout turns a fast failure into a slow one.

What you observe The hop that failed What to check next
The CLICK shows no receive activity Electrical TX/RX crossing, pin assignment in both manuals, signal ground, port set to Modbus RTU
Bytes reach the CLICK but the master times out Framing RTU selected at both ends, then baud, data bits, parity, stop bits, slave address, handshaking
An exception response returns Application A live Modbus device received the request and refused it: wrong function for the area, an unmapped reference, or a quantity crossing a gap in the map
A response arrives but the value is wrong Mapping Address offset from display conventions, data type, word order
The CP1H reports an option-board serial error before polling CP1H port layer Reseat the board and cable, then work the port-layer check

Three of those rows read deeper. An exception response is progress, not noise: the article on a Modbus exception 02 when a read crosses a register map gap shows the most common refusal, a quantity spanning implemented and unmapped addresses. A wrong value over a clean link is a mapping fault, and the article on why a BRX PLC needs an even first word to read a Modbus Float32 shows how a two-word value lands in the wrong word pair. A slave that answers only under one parity setting is the slave-side twin of a framing mismatch, documented for a DL05 Modbus RTU slave that answers only with ODD parity.

Where the CP1H itself will not start the transaction, the fault sits below Modbus. There is a documented port-layer error path for this option board — error 0x02F0 on CJ2M CPUs — and the guide to resolving CP1W-CIF01 RS-232C error 0x02F0 on CJ2M CPUs walks that check step by step.

Prove the exchange and set the poll cycle #

With the read proven, add the write test: send one write from the CP1H into the same mapped CLICK area and confirm in the CLICK's software that only the mapped word changed. Handshaking between the two PLCs — a data-valid bit, a toggle word, a sequence counter — is now program work on a link whose every hop has been demonstrated.

Size the poll cycle from the wire rather than from hope. The example read costs 88 bits outbound; the response is 25 bytes — slave address, function, a byte count of 0x14, the twenty data bytes, and the CRC — so 25 × 11 = 275 bits inbound, and one full cycle is 88 + 275 = 363 bits, which is 363 ÷ 9600 baud = 37.8 ms of line time before the RTU gaps and the CLICK's scan time add their share. The article on why Modbus RTU polling on one serial port is slow works the same arithmetic for a port carrying many slaves, and the same math bounds how fast this two-PLC link can cycle.

  • One master: the CP1H, with its CP1W-CIF01 RS-232C port set to Modbus RTU master; the CLICK never initiates.
  • One framing: RTU, because the CLICK's RS-232 port decodes RTU only; ASCII is not a setting on this link.
  • One serial set: the same baud, data bits, parity and stop bits on both ends, with no handshaking.
  • One proof before program work: a single read that updates only the mapped words, then a single write the same way.
  • One variable at a time when it fails: find the first hop with no confirmed transfer, repair it, and re-run the single read before touching anything later in the chain.

Questions asked

Can the CLICK's RS-232 port run programming software and the Modbus slave at the same time?

No. That port runs one protocol at a time, and Modbus RTU is the only Modbus mode it carries. While it runs as a Modbus RTU slave, the programming software cannot use the same port, so finish downloads and monitoring before the test.

What happens if the CP1H port is left in ASCII mode?

Every poll times out while the CLICK stays silent. In RTU framing the ASCII frame's colon start character decodes as slave address 58, so a CLICK addressed as 2 ignores the entire frame. The fix is the master port's protocol setting, not a cable, register or timeout change.

What if one end of the link has no parity?

The Modbus serial specification pairs no parity with two stop bits, so a no-parity end never matches an even-parity end even at the same baud rate. Set parity and stop bits identically on both ends, and check the slave side first, because a slave that answers only under one parity setting looks exactly like a dead port.

How many registers fit in one Modbus read?

The Modbus application protocol caps one read-holding-registers request at 125 registers and one write at 123, but the working limit is the range the slave's map implements on the addressed block. Start small — the 10-register read here — and grow the quantity only as far as the CLICK's documented map reaches.

Can the CP1H write to the CLICK over the same link?

Yes, once the read is proven. The same master function sends function 06 to write one register or function 16 to write a block, aimed at holding registers the CLICK documents as writable. Prove it the same way: send one value, then confirm that only the mapped CLICK word changed.

Keep reading

  • Troubleshooting

    Why a CP1L Modbus RTU master sees a MicroLogix 1500 node but no data

    Node recognition and Modbus error code 88 do not prove a valid exchange between a CP1L master and a MicroLogix 1500 slave. Verify the CP1W-CIF01 socket DIP switch (4 OFF for socket 1, 5 OFF for socket 2), the RS-232 conductors, and identical baud, parity and stop bits on both ends. Then capture the CP1L's request with a PC terminal and compare it with the working PC-master request before touching function codes.

    Industrial networks

  • How-to

    How a PLC runs two Modbus networks at the same time

    Yes. Each serial port is its own independent link: the HMI polls the PLC on one port while the PLC acts as master, or slave, on a separate RS-485 Modbus RTU network. The two links share no settings — only their endpoints must match — and PLC copy logic moves any data between them.

    Industrial networks

  • How-to

    How to connect a Modicon PLC to an RTU Modbus RTU network

    Yes — a Modicon PLC can join an RTU network that runs Modbus RTU over fiber. One serial segment carries one client, so the PLC either polls the RTUs as client or answers an existing master as server; the fiber converters must pass frames and gaps untouched, and the timeout is set from measured response time.

    Industrial networks

Why calling CP341 FB7 and FB8 twice causes Modbus errors