Юрий
Hello. I am trying to connect  HMI to  arduino nano. HMI - master, arduino -slave. I am using max485 to implement the rs485 protocol. HMI is ready to accept a slave with address 1, the arduino plc has been appointed a slave with address 1, but the HMI does not see the slave. In a similar sсheme HMI worked with PB-PLC.
I can’t understand where to look for an error.
Sorry for my english, it's not really my native language.
Quote 0 0
thiagoralves
Where is your Arduino code? If you’re using OpenPLC firmware on the Arduino, it will only work through USB. The RS-485 driver requires an enable pin which is not implemented on OpenPLC arduino firmware
Quote 0 0
Юрий
I using OpenPLC_Uno firmare on the arduino . There is a so lines in the code  : 
#define TXPIN   
//Config Modbus Serial (port, speed, rs485 tx pin)
modbus.config(&Serial, BAUD, TXPIN);
so I suggested that it enable pin for RS485 driver and I connected the MAX 485 module to arduino rx/tx pins ...
Quote 0 0
thiagoralves
I never tested it, so I'm not sure if it works. The OpenPLC firmware for the Arduino was not created for it to be connected directly to the HMI. Instead, it was created for you to connect to the OpenPLC host through Modbus RTU protocol. The problem is that the firmware uses all pins on the Arduino (except for RX/TX), so you need to make sure you removed whatever pin you used on TXPIN so that the firmware don't use it as regular input or output.
Quote 0 0