Hello,
I'm configuring my RFID readers system.
I have 3 Arduinos (slaves), each of them has own RFID reader, and I would like to connect them via Modbus RS485 with my PLC driver Delta DVP 14SS2 (Master).
PLC will contact each Arduino sequentially every second and use only 03 Modbus function to read the register which will store RFID tag number during it's in RFID reader range.
Currently I'm trying to connect only one Arduino (without RFID capability) with my PC through the USB FTDI RS485 converter with QModbus software and I'm having a problems.
For now I'd like to read one Modbus register. When the Arduino is connected to PC via USB cable and I choose in QModbus Serial Port of Arduino it receives correct data from the selected register without any problems (screen nr 1).
After I disconnect the USB cable, try to connect to Arduino via Serial Port of my USB FTDI RS485 converter, send 03 Modbus function read request I'm getting the CRC error 'Slave threw exception "Invalid CRC" or function not implemented" (screen nr 2). In Bus monitor I have two additional bytes. One on the beginning of the answer (00) and the second one on the end, also 00.
What I've already tried:
- I used few libraries but for me works only ModBusRTU and SimpleModbusSlave. Mentioned CRC problem occurs with both libraries.
- Changed Serial Port settings like Parity etc. I always remeber to set it correctly.
- Added the 120 Ohm resistors on the ends of RS485 bus.
Maybe it's the converter problem? Modbus seems to work properly via Serial port of Arduino via USB connection.
RS485_slave.ino (892 Bytes)
SimpleModbusSlaveArduino.ino (4.27 KB)