Serial output ASCII commands signal problem

I am currently working on use the arduino R3 with a RS422 sheild to control Mdrive motor. I use the "Serial.write("SL 51200^M")" commands in order to get the motor rotate but it didn't work. The motor accepts ASCII commands.I think the command don't pass the port to the motor but I don't know how to set up the code. Pls help me about it :confused: .

xiaojiji.ino (1.79 KB)

Try Serial, instead of Serial.write.
Is the motor connected to hardware serial (Serial) or to the software serial port (mySerial)?

I've tried it but it doesn't work either. I think the commands just run pass the Arduino board not the rs485 shied but I'm not really sure..

groundFungus:
Try Serial, instead of Serial.write.
Is the motor connected to hardware serial (Serial) or to the software serial port (mySerial)?

My serial .

Serial.write("SL 51200^M");

Isn't that the command to the motor? Shouldn't it go out mySerial?

Can you post a schematic of your wiring?

    XIU==0;

That doesn't look right. Or useful, if it is right.

ufo135792:
I've tried it but it doesn't work either. I think the commands just run pass the Arduino board not the rs485 shied but I'm not really sure..

Your first post said you had a RS-424 shield, This post says you have a RS-485 shield. They are not the same. Which it it and post a link to the board specifications?

Paul