I am trying to send a query to device, but only thing that i get from RS-485 serial is -1 (FFFFFF). I tried to modify your example with Modbus over RS-485. My PLC is a Master and device that i try to communicate with is slave, its address is 1, baudrate is the same for both ends and its 115200 (thats default for my device). I successfuly managed to send through Serial3.write() a message for bootloader to set version for my device. But when i try to send a query and receive response i got nothing but -1.
have you tried to run the Modbus RTU communication with your slave device from PC? It is always good (and recommended) first step – just take a RS485 USB adapter, use some free Modbus RTP Master application and try to run the Modbus communication with this setup. Then you are sure that everything is OK at the Slave side (protocol, address, baudrate, supported services, register number …) and you can try it with PLC.
And from the HW point of view – make sure that the GND is also interconnected.