Test a Modbus RTU driver link to a Click PLC

9 min read · Published November 14, 2026

A Modbus RTU serial driver in your master gives a possible path to a Click PLC. Prove the link on the wire: copy the PLC's configured port settings into the master, poll one documented holding register, check ten polls in a row against the PLC's own data view, and only then load the full tag list. One register takes about 6 ms of bus time per poll at 38400 baud, so timeouts during the test point at wiring, not load.

A master with a Modbus RTU serial driver can talk to a CLICK PLC over its serial port, and the C0-01DR-D, the micro model with 8 DC inputs and 6 relay outputs, is one of the usual targets for that link. The driver's presence in the list is a possible path, not a finished link; by itself it says the software can speak the protocol and says nothing about the cable, the port settings or the registers. This article walks the commissioning test that settles those one at a time: check the PLC side, copy the port settings into the master, prove the link with one documented holding register, and only then load the full tag list. The same sequence works for any CLICK model and any master that carries a Modbus RTU serial driver, an OPC server such as Kepware included.

What the Modbus RTU standard asks both ends to match

Modbus RTU is two documents working together. The application protocol defines the data areas and the request format; the serial-line specification defines how a frame travels the wire. Read together, they fix the short list both ends have to agree on.

One master owns the bus. Slaves sit at station addresses 1 through 247 and answer only the master that calls their address. Data lives in four areas: coils, discrete inputs, input registers and holding registers. A read of holding registers is function 03, and one reply can carry up to 125 registers.

On the wire, a frame is the station address, the function code, the data and a 16-bit CRC. Characters carry 8 data bits, and the default framing is even parity with 1 stop bit, 11 bits per character; with parity switched off, the specification asks for 2 stop bits so the character stays 11 bits long. Every frame is followed by a silent gap of at least 3.5 character times, and the bytes inside one frame have to arrive within 1.5 character times of each other.

That paragraph is the whole checklist: baud rate, parity, stop bits, station address. When the link misbehaves, one of those four is the first suspect.

Check the PLC port and the master driver first

On the CLICK side, Port 2 is the RS-485 port that runs Modbus RTU. Its settings live in the PLC project: the Baud Rate field for Port 2 carries the speed, and the same settings screen carries the station address. Port 1 runs at 38400 baud for programming and panel connections, so the Modbus RTU master belongs on Port 2, with its baud copied from the project rather than from an example found online. The manufacturer's CLICK serial setup documentation puts the rule in one line: set the master to whatever Port 2 is set to.

On the master side, open the driver list and look for a Modbus RTU serial driver. The version number matters less than it seems, because the wire format has been stable for decades: a 2013-era build with the driver installed, 4.300.449.0 in the version this article uses as its example, speaks the same frames as a current one. What matters is that the installed build has the serial driver and that the PC has a free serial port or a USB-to-RS-485 adapter for it.

What you need

  • The master software on a PC, with its Modbus RTU serial driver installed.
  • A USB-to-RS-485 adapter and a twisted pair for the A and B terminals of Port 2.
  • The CLICK programming software, open on the project, so Port 2's settings can be read instead of guessed.
  • The register documentation, or the mapping table, for the block each register sits in.
  • One register the program actually changes: a DS register with a rung that adds 1 every scan works well.
  • The PLC's own data view open on screen, as the reference the master has to agree with.

Set the master, enter one register, poll

  1. Read Port 2's settings out of the CLICK project: baud rate, parity, stop bits and station address. Write them down; the master copies them, not the other way round.
  2. Create a serial channel in the master on the COM port the adapter took, and enter the project's baud rate, parity and stop bits. Characters stay at 8 data bits; if the project has parity switched off, set 2 stop bits, as the specification requires.
  3. Set the station address on the master's device to the project's value, 1 in most projects.
  4. Create one item: a holding-register read, function 03, entered as 40001 in a 984-style address field or as 0 in a raw-offset field. On a CLICK the DS data registers sit in the holding-register block with DS1 at 40001; the full table is in the CLICK PLC to Modbus address mapping article.
  5. Set that item's poll rate to 5 polls a second.
  6. Make DS1 move: add a rung to the CLICK program that adds 1 to DS1 every scan, or point the item at a register the program already writes.
  7. Open the CLICK's data view next to the master's item and watch ten polls in a row.

Ten polls that track the CLICK's value prove the transport and the mapping together. A reply proves the transport; it does not prove the item maps to the value you meant, and a moving value closes that gap.

Example: one DS register polled from a C0-01DR-D at 38400 baud

Inputs, each with its source:

  • Station address 1, even parity, 1 stop bit: the example project's Port 2 settings.
  • 38400 baud: the speed this example project sets on Port 2, matching the serial rate the CLICK documentation prints for its ports.
  • 11 bits per character: the serial-line specification's default framing.
  • 8 bytes out, 7 bytes back for one register: the frame layout in the application protocol.
  • 3.5 character times of silence before and after each frame.
  • 5 polls a second: the rate set in step 5.

The rule in words: a transaction's bus time is the bits in both frames divided by the baud rate, plus the two silent gaps. Bus load is transaction time multiplied by polls per second.

The arithmetic:

  • Frames: 8 + 7 = 15 bytes, sent as 15 characters. 15 × 11 = 165 bits, and 165 ÷ 38400 = 4.30 ms.
  • Silent gaps: 3.5 × 11 = 38.5 bits each, 77 bits for the two, and 77 ÷ 38400 = 2.01 ms.
  • Transaction: 4.30 + 2.01 = 6.31 ms per poll.
  • Load: 6.31 ms × 5 polls a second = 31.6 ms of bus time each second, 3.2 percent of the link.

Result: one tested register uses 6.3 ms of bus time per poll and about 3 percent of the bus at the commissioning rate.

Decision: at 5 polls a second this bus is idle 97 percent of the time, so a timeout during the single-register test is a wiring or settings fault, with congestion ruled out by arithmetic. Keep the commissioning rate at 5 polls per second and recompute the load with the block math below once the tag list grows.

One more number from the same rule: the 1.5-character limit between bytes works out to 1.5 × 11 = 16.5 bits, and 16.5 ÷ 38400 = 0.43 ms. A USB adapter that buffers and delays the stream can break that limit inside a frame, and the CRC rejects the damaged frame. If CRC errors appear while the settings match, the adapter is the next suspect.

What each result tells you

What you see What it points to First move
No reply at all Baud, parity, stop bits or station mismatch; A and B swapped; port not enabled Re-read Port 2's settings from the project and match them one field at a time
Exception code 02, illegal data address The register number is outside this CLICK's map, or the access type is wrong Check the 40001-versus-0 entry and the register block in the mapping table
Exception 01 or 03, illegal function or data value The slave rejects the function or the quantity, for example a read asking for more than 125 registers Split the read or change the function
CRC errors, garbage characters Framing mismatch, or gaps longer than 0.43 ms between bytes Match parity and stop bits, then try a shorter cable or another adapter
A value that never moves A register the program never writes, or an offset one place off Make the program change the value and watch both views together

Work top to bottom: the transport rows come before the value rows, because an unanswered master hides a mapping fault behind its timeout. The first row keeps engineers busy longest; the Modbus RTU master no-reply and address errors fix article walks the timeout and exception pair in more depth. When the CRC row will not clear, check parity first; the HMI serial errors from a PLC parity mismatch fix article shows the symptom pattern.

Add the rest of the tags in blocks

Give every new register class the same single-item treatment before it joins the production list: a coil with function 01, a discrete input with 02, an input register with 04. A class that passes once passes everywhere on the link; a class that answers with an exception has a block or an access type to re-check in the mapping table.

Then group the holding-register reads. The application protocol allows up to 125 registers in one function 03 reply, and grouping pays immediately. Twelve registers as one request: 8 bytes out, 5 + 24 = 29 bytes back, so 37 × 11 = 407 bits, 407 ÷ 38400 = 10.6 ms, plus 2.01 ms of gaps, 12.6 ms per poll. The same twelve values as twelve separate single polls: 12 × 6.3 = about 76 ms. One grouped read a second uses about a sixth of that bus time, and ten grouped reads a second, 120 values a second, take about 13 percent of the bus.

When the tag list spans several slaves on one RS-485 run, each slave adds its own transaction time to the same budget; the arithmetic in the article on polling 12 temperature controllers from one HMI works the same way.

Check it holds, then hand it over

Call the link done when three things have happened:

  • Ten consecutive polls track the PLC's data view through a value change on every register class the application will use.
  • The master restarts and resumes polling with no settings change.
  • A planned power-down and restart of the PLC brings the link back on its own.

Record baud rate, parity, stop bits, station address, reference convention and poll rate on the handover sheet, so the next shift can tell a communications failure from a bad item definition at a glance. Every number on that sheet was measured against the PLC, not assumed.

If this link exists to feed a shop-floor notice board instead of an HMI, the screen is a separate and simpler job: we build shop-floor signage displays that play shows built offline or take content from your own Android app, and the Modbus master stays on the PC or PLC end either way.

Recommendation: Commission every CLICK serial link the same way. Take Port 2's baud rate, parity, stop bits and station address from the PLC project, poll one documented DS register at 5 polls a second until ten consecutive reads track the PLC's own view, and only then add tags, in grouped reads of up to 125 registers. If a timeout shows up at that rate, fix the wire and the four settings first and leave the tag list alone, because a bus that is 97 percent idle has no congestion to hide.

Questions

Does a CLICK PLC need a Click-specific driver in the master?

No. Modbus RTU is a published standard and the CLICK implements the slave side of it on its serial port, so a generic Modbus RTU serial master reads and writes the same registers a vendor-specific driver would. What you take on yourself is the setup: station address, register references and the mapping from CLICK data registers such as DS to holding-register numbers, which the site's mapping article lists in full.

Can two masters poll one CLICK serial port at the same time?

No. The serial-line specification puts one master on a bus; every transaction starts with a master request, and two masters transmitting over each other produce timeouts and CRC errors that look exactly like a wiring fault. If two systems need the same data, give each its own port, or let one master poll the CLICK and pass the values to the second system over Ethernet.

How many registers fit in one Modbus RTU message?

A function 03 read returns up to 125 holding registers, and a function 16 write carries up to 120. For any value wider than 16 bits, set the data type and word order in the master as well, because a 32-bit value stored in swapped word order comes back plausible and wrong.

The register exists, so why does the reply say illegal data address?

Exception 02 judges the number and the access type together. A CLICK DS register lives in the holding-register block, so a function 03 read finds it, but the same number asked as an input register with function 04 returns exception 02 even though the value exists. Check the function code before you start doubting the register number.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote