how to read Holding registers from arduino using RS485 and modbus protocol

Hi
I am a beginner to Arduino for learning purpose I want to createed a Modbus communication using Arduino and RS485 module as in the attached Picture,

I have to read the holding registers in each slave Arduino in this setup
how do I configure the TE line in (violet line in the image) while reading holding registers ?

can anyone help me with a basic algoritham or a sample code ?

diagram.PNG

diagram.PNG

1 Like

In order to read the violet line that needs to be used as an output. the code wii provide whatever information needed.