
What is master–slave communication?
Master–slave describes the roles that devices take in a communication relationship. In a traditional request/response arrangement, the master initiates a transaction and the addressed slave processes it and returns the appropriate response. The words do not identify a cable, a particular PLC or a complete protocol. Before using them to specify a system, name the protocol and the interface as well. Modbus Organization now describes the general Modbus relationship as client/server. [1]
The most useful commissioning question is not “Which box is the master?” but “Who initiates this exchange, and what is the other endpoint expected to do?” A device can have a different role on another connection. Equally, a network role says nothing by itself about where a machine's control algorithm runs. These distinctions matter when integrating a panel, a PLC, a drive and a supervisory system.
Jump to: Mapping the roles · Loss of communication · Interactive example · A worked RTU transaction · Polling-time calculation.
Map the relationship, not just the hardware
Consider a hypothetical integration: an HMI requests process values from a PLC, while that PLC reads a drive through a separate interface. The panel initiates the first relationship; the PLC initiates the second. The PLC therefore serves data in one relationship and requests data in another. The CPU, interfaces and software must support the required combination. This is an architecture example, not a claim that every PLC model offers both roles on every port. The Modbus TCP implementation guide describes client and server components in this connection-oriented context. [4]
The same reasoning separates communication from control. A control loop may run in the PLC or locally in a field device; identify that location in the design rather than inferring it from the word slave. Being a responding endpoint does not mean a device has no processor, diagnostics or local PID control. Loss of supervisory traffic and loss of the control algorithm are therefore different failure scenarios.
Port, interface and role are separate properties. A basic USB-to-RS-485 converter exposes a serial connection; the application using it creates the protocol requests. A more capable gateway may run a protocol stack itself. Selecting a PLC communication cable does not select that software behaviour. The communication-port guide explains the distinction between a physical connector, an operating-system device name and a network endpoint; the RS-232/RS-422/RS-485 comparison deals with electrical interfaces. [4][5]
The same vocabulary does not imply the same network behaviour
Serial Modbus RTU is the straightforward polling example. Its standard serial architecture permits one active master and one transaction at a time. The master sends a request, then receives a response or reaches its timeout before progressing. Connecting a second application that independently polls the same live serial bus is not a supported multi-master design. The Modbus RTU guide develops the serial framing side of this arrangement. [2]
EtherCAT is not a sequence of separate Modbus-style conversations. Its telegram travels through the nodes; a device processes its addressed data and inserts input data while the telegram is passing. The EtherCAT Technology Group uses MainDevice/SubDevice terminology in its technology overview. Read how EtherCAT master and slave devices communicate for the protocol-specific relationship, rather than transplanting a polling diagram into every EtherCAT system. [6]
CANopen separates management from process-data transmission. A PDO may be triggered by an event or timer, or by SYNC. Network state matters too: PDO communication is associated with the Operational state. Thus “the subordinate can never transmit until individually asked for a value” is not a general rule for CANopen. [7][11]
PROFIBUS DP can coordinate multiple masters. Access is passed between active masters using a token. Class 1 and class 2 master functions distinguish cyclic process-data exchange from engineering/parameter access. That defined coordination is why PROFIBUS multi-master operation should not be confused with adding two independent pollers to a single-master serial Modbus line. [8]
Modbus TCP has its own resource limits. A server may handle several clients and outstanding transactions, but the actual limits belong to the device and implementation. A TCP-to-RTU gateway can accept network-side requests while still having to serialize work on its downstream bus. More Ethernet connections do not automatically provide more serial throughput. Consult the relevant Modbus transport guide and the gateway's queue and connection specifications. [4]
A silent master does not tell you what the outputs are doing
No new polls is a communication observation, not a verified safe state. A local control task might still be executing; an output might be held, changed to a configured fallback or stopped by a device-specific response. Conversely, one unresponsive endpoint need not stop every other transaction. The outcome depends both on the master's error policy and on whether the fault has also damaged the shared physical link.
A useful documented example is in the Altivar 61 manual archive. The manufacturer-authored programming manual 1760649, edition 02/2013, lists the integrated Modbus timeout ttO on printed page 217 and the fault-response setting SLL on page 204. It gives a 0.1–30 s range and a 10 s factory setting for ttO. Separate SLL options include freewheel stopping, ramp stopping and conditional speed-maintenance behaviour. The timeout and the response to its expiry are separate decisions. Match this edition to the actual drive and firmware before using the parameters. Also check watchdog-activation conditions and the selected command channel; successful read-only polling does not establish the loss-of-control response. [10]
Do not treat that factory timeout as a suitable value for an arbitrary machine. Nor does suppressing a communication fault repair the connection. The master's response timeout, a drive's communication watchdog and a machine's safety function serve different purposes. Define the required output state, alarm and recovery sequence alongside the machinery-safety requirements; an ordinary bus watchdog should not be substituted for Safe Torque Off or another required safety function.
Recovery deserves its own test. What happens to a command that was present before the connection disappeared? Can restored traffic cause an unexpected restart? For a redundant controller design, who owns the right to write, how is state transferred, and how is simultaneous ownership prevented? Simply installing a second PLC answers none of those questions. Plan loss-and-recovery tests under authorised, safe commissioning conditions instead of experimenting by unplugging a running machine.
Try the polling sequence, then break it
This educational single-master model alternates requests and responses. Compare losing the master with losing just one response source. Playback is deliberately slow: it does not emulate actual Modbus timers, EtherCAT traffic, physical outputs or safety functions. No commands are sent to hardware.
Ready. Use Step to send the first request.
Requests / valid replies / timeouts: 0 / 0 / 0
The example deliberately advances to the next device after a timeout. An actual implementation may retry, halt the scan or apply another policy. A retained response is historical data, not proof that another measurement has arrived.
Keep the device address separate from the register address
On serial Modbus, individual device addresses occupy 1–247. Address 0 is broadcast, not the master's station address. Broadcast is used for supported write operations and does not produce slave replies; it is not a way to read every device at once. Address-space size is also not the electrical device capacity of the converter and cable. Receiver loading and network construction still have to be checked for a Modbus-over-RS-485 installation. [2][5]
For example, COM7 may name a serial device on a computer, 7 may identify the remote Modbus station, and 0 may be the starting register offset inside that station. These are three different selections. A manual's displayed register number may not use the same base as the software field that accepts the request offset. Confirm the mapping rather than copying a number merely because it looks familiar. [3]
Read a complete transaction, not just a changing number
This read-only teaching example uses a fictional register map. Assume offset 0 contains a 16-bit temperature value with a scale of 0.1 °C, and offset 1 contains a status word. These definitions are illustrative, not an address list for a commercial product. The bytes below are a syntactically formed RTU request and response; they are not a trace captured from working hardware.
Request to device 7 07 03 00 00 00 02 C4 6D Response from device 7 07 03 04 00 FA 00 01 7D C2
The request selects station 07, function 03 and starting offset 00 00, then asks for 00 02 holding registers. In the response, 04 is the data-byte count. The two register values are 00 FA and 00 01: decimal 250 and 1. Under this example's scaling, 250 × 0.1 = 25.0 °C. The value 1 has no universal meaning as a status word; its bits or enumeration require a device-specific definition. Function 03 and the request/response field structure are defined by the application protocol. [3]
The CRC bytes have been calculated for these exact byte sequences: C4 6D for the request and 7D C2 for the response. RTU transmits the low-order CRC byte first. A valid CRC is not a calibration certificate, a freshness guarantee or proof of sender identity. It checks the received telegram; it does not validate everything that the number might represent. [2]
This is why commissioning should also verify the engineering units, valid range and update indication. In a write-enabled system, an accepted request is not evidence that a mechanism reached its target. The application needs the appropriate state, fault and physical feedback to distinguish command acceptance from completion. No start, reset or motion command is included in this example.
Budget the whole polling cycle
“19.2 kbit/s” is a link rate, not the rate at which the operator sees every value refreshed. A poll consumes request transmission, response transmission, required idle intervals and implementation delays. A controller's program scan, a communication scan and a SCADA display refresh are not interchangeable measurements. Track the time relevant to the actual consumer of the data.
For an illustrative calculation, take ten healthy devices, each returning the two-register response above. Use 19,200 bit/s and 8E1, giving 11 bits per character. In a repeating polling sequence, allow two minimum 3.5-character inter-frame intervals per completed request/response pair. Assume another 5 ms per transaction for device/software delay in addition to those minimum gaps. RTU character framing and silent intervals come from the serial implementation guide; the device count and extra delay are assumptions. [2]
Character time: 11 / 19,200 s ≈ 0.573 ms 8-byte request + 9-byte reply: ≈ 9.740 ms Two minimum 3.5-character gaps: ≈ 4.010 ms Additional assumed delay: 5 ms per transaction One transaction: ≈ 18.75 ms Ten-device cycle: ≈ 187.5 ms
The result is arithmetic for that model, not a measured or guaranteed scan time. Do not add an idle period twice when an actual turnaround measurement already includes it. Real scheduling, USB buffering and device response time may increase the cycle. A 250 ms response timeout followed by one retry consumes 500 ms in waiting alone, before counting the requests and other delays. One unresponsive endpoint can therefore dominate a scan that looked fast when all devices were healthy.
In the application, specify how long a value remains acceptable without a new valid response. Keep the last successful update time and communication status with the value. This is especially important when a data logger continues recording: repeated records of the same cached value must not be mistaken for repeated successful measurements.
An axis master is not necessarily a network master
Motion documentation uses similar words for a different relationship: one axis supplies the reference followed by another. CODESYS MC_GearIn, for instance, couples a slave axis to a master axis using a gearing ratio. That is an axis-coupling operation, not a statement that the reference axis owns the communication bus. [9]
For a hypothetical ideal geared relationship after engagement, v_follower = 2 × v_reference describes the selected velocity ratio. It does not settle torque capability, acceleration limits or mechanical suitability. Both drives could still be subordinate devices on a network managed by a controller. A servo application must separately define the real or virtual reference, feedback path and compatible encoder output signals. Communication topology and motion coupling should be documented separately.
Use the failure pattern to narrow the investigation
Nothing responds. Verify that the polling task is enabled and using the intended port, driver, protocol and serial format. Then check power, wiring, reference connections and termination against the equipment documentation. A/B labels are not a substitute for checking the manufacturer's signal convention. A safely isolated one-device test can help distinguish configuration problems from the effects of a larger bus. Physical-interface design is separate from the request/response logic. [5]
Only one device disappears. Investigate its address, possible duplicate addresses, local power and serial settings before lengthening every timeout. A genuinely slow response and a disconnected endpoint are different causes. Blanket timeout increases can conceal the fault while reducing update performance for the healthy devices.
A valid exception arrives. That is not the same as silence. An exception containing 83 02 in response to function 03 reports Illegal Data Address; the requested location or range may be invalid for the device. Verify the station address and CRC as well, then inspect the requested data map rather than immediately blaming the cable. [3]
The values look wrong—or suspiciously unchanged. Check offset conventions, signedness, scale, data type and word order for multi-register values. Then check whether new responses are actually arriving. A plausible displayed number may be retained from a previous transaction or served from a gateway cache. A response counter or update timestamp can be more revealing than the number alone.
The fault appears when another application connects. On a serial bus, look for a second independent poller. On TCP, consider connection capacity and gateway queuing. In either case, establish whether two clients are writing the same parameter. Protocol roles are not