Reading energy meter with RS485 MODBUS protocol

Hello everyone

I am currently working on a project for which I have to read data from an energy meter through RS485 communication.

Energy meter:
Communication protocol energy meter:

(put 'www' after 'https://', I could not post more than 2 links in my thread)

The board I am using is an Arduino Leonardo board, but it is mounted inside of a PLC enclosure. The PLC is a product from industrial shields, a company that makes Arduino based PLC's for a low price. This PLC allows communication through RS485 when the switch zones are setup correctly. A MAX485 module is used for this.

Arduino PLC:

I am currently trying to read 2 registers from the energy meter. Holding register 4 and 5, those registers contain the active power. I think my wiring is correct and the parameters are also set up correctly. But every time I run my code, I do not get any response from the energy meter. Reading the parameter "result" gives me the error code E2, which means that I did not get any response from my slave.

I have attached the settings for my energy meter, my code and pictures of my connection.

Settings energy meter:
Parity: even
Stop bit: 1
Slave ID: 1
Baud rate: 9600

`#include <ModbusMaster.h>

ModbusMaster node;

uint16_t baudrate = 9600L;


void setup() {

Serial.begin(baudrate, SERIAL_8E1);
node.begin(1, Serial);



void loop() {
uint8_t result;
uint16_t data[2];

result = node.readHoldingRegisters(4, 2);

Serial.println(" ");

if (result == node.ku8MBSuccess)
Serial.print("no succes, error code: ");
Serial.println(result, HEX);




The cable I just an ethernet cable that I cut open and stripped on both sides.

This is my first post on the forum so I hope that I provided enough information. If not, please let me know. If anyone would be able to help me, that would be greatly appreciated!

Thanks in advance.