Commanding RS485 Relay with arduino

Hello everyone,

I need help commanding an 8 channels RS485 Relay this one using arduino.

I want to be able to open or close anyone of the 8 channels with an arduino code.

For the connection, I have a RS485 TTL this one.

My problem is with the coding, I have no idea how to speak with the relay.

I would be really grateful if someone could help me.

I suggest using a Arduino with two hardware serial ports (such as the Arduino MEGA). Doing so, leaves the port for the USB communication available (for programming and serial monitor) while also dedicating another serial port for the RS-485.

I suggest using the smarmengol library as it offers slave and master programming in a single library.

YOU will need to find out what MODBUS commands are required in order to activate the relays. The address is given by the DIP switch, but that does not explain what commands are needed.