RS 485 Modbus RTU(Slave) problem with Rotary encoder

Hello,

I have a problem that I can't solve.I use TTL module for RS 485 to communicate with Delta HMI.
I use an Arduino Mega to control a motor with rotary encoder.Everything worked perfectly until I started reading the encoder data, communication between the arduino and Delta HMI stops immediately and I have to restart the Arduino.
Attached encoder and RS485 module wiring diagram:

Do you have any suggestions why it is blocking communication?

Regards

IMO you try to use the USB chip for SPI, not the main controller?
Use the SPI interface from the board header pins instead.

Please understand that some stupid people loved to replace MISO and MOSI by CIPO and COPI names and find the SPI pins at D50 toD53.

SD card reader is connected to the SPI pins. The problem is between the rotary encoder(pin 8(A) and pin 9(B)) and the RS485 TTL module.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.