Go Down

Topic: Arduino TTL to RS232 Communication (interfaced w/ stepper control box) (Read 2856 times) previous topic - next topic

hhaygood

Stepper Motor control box that we are trying to connect to:

http://www.anaheimautomation.com/manuals/stepper/L010155%20-%20DPD75601%20Users%20Guide.pdf

Loudhvx

I couldn't get the links to work either.

Based on Nick's quote, the control box acts as a DCE device.  Your computer's port is wired as a DTE device. Thus you cannot use the same cable to talk to both from the Arduino, unless you re-configure the Arduino end.

If you used a null-modem cable to talk to the computer, you need a straight-through cable to talk to the controller, and vice versa.  Or you need to change the Arduino end from DTE to DCE or vice versa.

That's just the tip of the iceberg on settings to check for successful RS232 comm.

I suggest doing what WildBill suggested and communicate with the box using Hyperterminal first to confirm the controller is working as expected.

hhaygood

Quote
I suggest doing what WildBill suggested and communicate with the box using Hyperterminal first to confirm the controller is working as expected.


We have tested the control box/stepper motor setup using labview directly from the PC, and it works. We have not used HyperTerminal to check it, but perhaps that will help.

Quote
If you used a null-modem cable to talk to the computer, you need a straight-through cable to talk to the controller, and vice versa.  Or you need to change the Arduino end from DTE to DCE or vice versa.


I am a little confused. We are trying to run the setup without the use of a computer.. we have only been running the signal through the TTL to RS232 converter to the PC to test if we could convert the serial communication to an RS232 feed (ie convert 0-5V signal to +/-3-12V signal). Are you saying I need to change the Arduino end from DTE to DCE to communicate with the control box regardless? That could be the problem..




Nick Gammon

Quote
Are you saying I need to change the Arduino end from DTE to DCE to communicate with the control box regardless? That could be the problem..


Just make sure you have Rx/Tx wired the right way around is what he is saying.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon

@OP please don't create two threads with the same question in them 2 minutes apart. It is called cross-posting and riles people up.

Threads merged.

Please read up on using code tags.

Read this before posting a programming question
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Loudhvx

What I'm saying is, whatever you are using to talk to the computer (Hyperterminal via serial port) will not work to talk to the stepper control box because the computer and control box have their Rx/Tx pins configured differently.  The computer is wired as DTE, the stepper controller is wired as DCE.  As Nick pointed out, that means Rx/Tx are wired differently, but also hardware flow control lines may also be wired differently as well.  

More info will be needed to know about flow control requirements, but hopefully you can skip all that by using a "No Flow Control" option.  (Maybe that can be set the same way you set Baud, Parity, stop Bits etc.)


If you have the option, I recommend not using hardware or software flow control, and just communicate with "No Flow Control" just for testing purposes, and just give very short commands with a lot of time in between commands so there are no buffer issues etc.   That way you can at least confirm the commands and Rx/Tx are correct.

Wikipedia probably has some details on RS232/TTL communication if you need more info.


Go Up