Sorry, my bad.
Basically, I'm trying to control Oriental Motor stepper motor with ARDUINO. This uses modbus protocol, RS485 communication.
My setup is connected as: ARDUINO Mega -> MAX485 -> cable to Oriental Motor controller. When I tried running it, the controller would spit out rs485 communication error. The timing of these errors agreed with my code setting the MAX485 DE & RE pins to LOW (to change to recieving mode).
To troubleshoot, I connected ARDUINO with my PC as ARDUINO->MAX485->MOXA RS485-USB converter->PC. Serial monitor on my pc shows, that the message I sent from ARDUINO comes trough successfully, but whenever I set the RE & DE pins from HIGH to LOW, another zero byte comes through. This zero byte seems to upset my Oriental Motor controller. Any idea what is the cause of that?