RS-485: how to check a bus step by step
234 Views •Modbus RTU timeout: 6 checks before blaming the wiring
142 Views •4G PLC not connecting: 6 checks before blaming the code
105 Views •LoRa works on the desk, fails in the field: 6 checks before you install
94 Views •LoRaWAN node won't join: 6 checks, in order
30 Views •Choosing a PLC 2: which communications do you really need
31 Views •Digital input not reading: NPN or PNP, step by step
248 Views •4-20 mA input reading wrong: check it step by step
238 Views •RS-485: how to check a bus step by step
234 Views •Scaling a 4-20 mA signal in the PLC: formula, constants and code
229 Views •Relay or transistor output: which one and how to check it
189 Views •Modbus RTU timeout: 6 checks before blaming the wiring
142 Views •Upload fails: 6 checks before blaming the code
138 Views •4G PLC not connecting: 6 checks before blaming the code
105 Views •LoRa works on the desk, fails in the field: 6 checks before you install
94 Views •Choosing a PLC 2: which communications do you really need
31 Views •Choosing a PLC 1: count the I/O and leave spare
32 Views •LoRaWAN node won't join: 6 checks, in order
30 Views •Touch panel: screen turned, touch didn't. 6 checks
30 Views •SD card corrupted? 6 habits for Linux in the field
30 Views •Arduino IDE compile error: 6 checks before the code
29 Views •Choosing a PLC 2: which communications do you really need
Short answer: before you compare PLC datasheets, write down what the PLC must talk to, who asks on each line, how far each link goes, how many ports work at the same time, how much data moves and how it is protected. Then pick the PLC that covers that list.
Download the checklist (PDF, 2 pages)
Descarga la lista de comprobación (PDF, 2 páginas)
A long protocol list tells you what a PLC supports, not what your installation needs. These six questions apply to any PLC brand and family. Answer them for every link of the installation, in the field, in the plant and to remote sites. Part 1 of this series covers the I/O count; here we only look at communications.
Six questions, before you choose
| Question | What to define | Good answer |
|---|---|---|
| 1. Talk to what? | List every device by layer. Field: meters, drives, sensors, often on Modbus RTU over RS-485. Plant: SCADA, HMI and other PLCs, usually on Modbus TCP or OPC UA. Remote: cloud, a central broker or maintenance access, often with MQTT. Take the protocol of each device from its manual, not from habit. | A list of devices with the protocol of each one. |
| 2. Who asks? | On a Modbus RTU line only one master asks at a time; slaves answer and have a unique address from 1 to 247. The master can be the PLC, polling the devices, or a SCADA, polling the PLC. Decide it for each line before you count ports. | One master per line and unique slave addresses. |
| 3. Distance and environment | Measure the cable runs. Copper twisted pair Ethernet is limited to 100 m per segment. RS-485 can reach up to 1000 m at 9600 baud with AWG26 or wider cable. Where there is no cable, test the radio on site: walls, metal and antenna position change the range. | Every link within its limit, or a radio test done on site. |
| 4. Ports at once | Count the links that work at the same time. If the PLC is master of one RS-485 line and slave of a SCADA on another, those are two serial ports, or one port plus a protocol gateway. Add Ethernet, Wi-Fi or a modem if they run in parallel. | Ports counted for simultaneous use, not as a list of options. |
| 5. Data and frequency | How many values, how often and how fast an answer must arrive. A few values from time to time can fit LoRaWAN or NB-IoT, designed for low bandwidth and infrequent messages. Fast or heavy data usually goes over Ethernet. | Volume, period and response time written for each link. |
| 6. Security and remote access | Plain Modbus has no built-in security: keep it inside a segmented plant network. For remote access use a VPN, the security of OPC UA (authentication, signing and encryption) or MQTT over TLS. | Nothing unprotected reachable from outside the plant. |
Common mistakes when choosing communications
- Choosing by the length of the protocol list: the PLC supports protocols the plant does not use and lacks a port it needs.
- Two masters on one Modbus RTU line: collisions and timeouts that look like wiring faults.
- Master and slave on one serial port: one line cannot take both roles; plan a second port or a gateway.
- Copper Ethernet runs longer than 100 m: errors or no link; add a switch or use fibre.
- Radio chosen from the datasheet range: the range on site can be much lower than the figure on paper.
- LoRaWAN or NB-IoT for fast or heavy data: messages delayed or limited by airtime and duty cycle.
- Modbus TCP reachable from the internet: whoever reaches the port can read and write registers.
Reference figures, with their source
Twisted pair Ethernet: 100 m per segment (IEEE 802.3). Modbus over a serial line: one master at a time, slave addresses 1 to 247, up to 32 devices without a repeater, and up to 1000 m at 9600 baud with AWG26 or wider cable (Modbus over Serial Line V1.02). Ports: Modbus TCP 502, Modbus/TCP Security 802, MQTT 1883 without TLS and 8883 with TLS. Radio range has no general figure: it depends on the site, so test it there.
Next steps
- Choosing a PLC, part 1: count the I/O and leave spare
- Free course: First steps with Modbus
- Free course: First steps with MQTT
- RS-485: how to check a bus, step by step
- Modbus RTU timeout: 6 checks before blaming the wiring
- 4G PLC not connecting: 6 checks before blaming the code
- LoRa works on the desk, fails in the field: 6 checks before you install
- LoRaWAN node won't join: 6 checks, in order
- Modbus RTU vs Modbus TCP vs OPC UA: which to use
- M-Duino (Arduino based PLCs): communications
- ESP32 PLC: communications
- GateBerry (Raspberry Pi based gateway): communications
- User guides of each PLC family
Sources
Modbus Organization: Modbus over Serial Line Specification and Implementation Guide V1.02 (sections 2.1 and 3.4) and Modbus/TCP Security Protocol Specification. IEEE 802.3, twisted pair segment length. OASIS MQTT Version 5.0. OPC Foundation, OPC 10000-1 OPC UA Overview and Concepts. LoRa Alliance, About LoRaWAN. 3GPP, The Cellular Internet of Things. Industrial Shields blog: Modbus RTU vs Modbus TCP vs OPC UA.
Commenting is not enabled on this course.