RS485 wiring for the LoggerV
Scope
RS485 is a serial communication standard (TIA-485-A) that sends data as a voltage difference between two wires. The LoggerV uses RS485 to read and control inverters, meters, battery systems and other devices with the Modbus RTU protocol.
This article is for installers. It gives the RS485 wiring rules and the LoggerV behaviour on an RS485 port. For the port names, the RJ45 pins and the port settings, see LoggerV serial and CAN ports. To add a device, see How to add a device in myPower24.
RS485 Standard
- Signal: differential, on two wires, A (-) and B (+).
- Mode: half duplex. One device transmits at a time.
- Devices on one bus: 32 unit loads. Many devices use less than one unit load. Refer to the device manual.
- Cable length: 1200 m at 100 kbit/s or less. Shorter at a higher baud rate.
- Cable: one twisted pair for A and B, 120 Ω impedance.
- Termination: one 120 Ω resistor at each end of the bus.
Bus Layout
Connect the devices in a line (a daisy chain). The cable goes from the LoggerV to device 1, from device 1 to device 2, and on to the last device.
- Daisy chain: correct.
- Star (cables from one point to each device): not correct. Signal reflections cause errors.
- Stub (a branch from the bus to one device): keep it as short as possible.
The two RJ45 sockets of one LoggerV RS485 port connect to the same bus. Use the second socket to continue the bus, or for the termination plug.
Do not connect a star layout. A star layout works on the bench, but it causes errors on a long or fast bus.
Cable
- Cable type: CAT5e or CAT6 network cable, shielded (STP) on a site with electrical noise.
- Pair for A and B: RJ45 pins 4 and 5. These pins are one twisted pair in a standard CAT cable.
- Ground: RJ45 pin 1 on the LoggerV. Optional.
- Shield: connect to ground at one end only.
- Cable route: away from AC power cables and DC string cables. Cross power cables at 90°.
Polarity
The LoggerV RJ45 socket uses pin 4 for B (+) and pin 5 for A (-).
Manufacturers do not use the same names for the two wires. Some devices use A for the positive wire, and other devices use D+ and D-, or 485+ and 485-. Connect positive to positive and negative to negative. If a device does not answer, interchange the two wires at that device.
Termination
Install a 120 Ω termination at the two ends of the bus, and at no other point. The LoggerV has no internal termination resistor. For the termination rules, the termination plugs and the termination check, see LoggerV serial and CAN ports.
On RS485, a short bus at a low baud rate does not always need termination. Termination does not cause a problem on such a bus.
Modbus RTU on the LoggerV
The LoggerV is the Modbus master on each RS485 port. The devices are the Modbus slaves. For how Modbus operates and what the Modbus errors mean, see Modbus RTU and TCP.
- Requests: the LoggerV sends one request at a time on a port. Only the device with that Modbus address answers.
- Default port settings: 9600 baud, 8 data bits, no parity, 1 stop bit.
- Response timeout: 1500 ms.
- Gap between requests: 50 ms minimum.
- Modbus address: 1 to 247, different for each device on one port.
- Scan range in the Add Device wizard: 1-10 by default, for example
1-10or1, 5, 6.
All devices on one port must use the same baud rate, data bits, parity and stop bits. Set the device first, then set the LoggerV port to the same values.
A device that does not answer holds the port until the response timeout ends. The other devices on the same port then update more slowly. Remove a device from the LoggerV configuration when you remove it from the bus.
The LoggerV has two RS485 ports. Each port is a separate bus. Put devices with different serial settings on different ports. Put a device that needs fast updates, for example a meter for export control, on its own port.
Installation Procedure
- Read the device manual for the RS485 terminals, the Modbus address and the serial settings.
- Set a different Modbus address on each device.
- Set the same serial settings on each device on the bus.
- Connect the cable as a daisy chain from the LoggerV to the last device.
- Connect B (+) to B (+) and A (-) to A (-) at each device.
- Put the termination plug in the free socket of the LoggerV port.
- Set the termination on the last device.
- In the Add Device wizard, set the port settings and scan for the devices.
Troubleshooting
- No device answers: examine the polarity. Interchange A and B at the device. Make sure that the port settings agree with the device.
- Search for device Fail!: the scan did not find a device in the scan range. Examine the Modbus address, the port settings and the wiring.
- One device does not answer: examine its Modbus address and its wiring. Two devices with the same address cause errors on both.
- Error Frames increase on the Interfaces tab: examine the termination, the cable route and the serial settings.
- Communication stops when a new device is added: the new device has a duplicate Modbus address or a third termination.
- Slow updates on all devices of a port: a device on the port does not answer. Repair or remove that device.