The Home Machinist!

A site dedicated to enthusiasts of all skill levels and disciplines of the metalworking hobby.
It is currently Sat May 25, 2013 4:59 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: RS232 Connection
PostPosted: Wed Nov 28, 2007 11:40 am 
Offline

Joined: Sun Apr 15, 2007 9:23 am
Posts: 4923
Location: Florida
Hello,

I'm trying to purchase a cable to connect a Dynapath 10 controller to my Desktop computer. The computer is DTE and the controller is DCE. The cable needs to be DB9 female on one end and DB25 male on the other.

The question is......

Do I need a null cable or a straight cable?

Looking for someone that has actually done it as I have been all morning on the phone and the answers all sterted with "most likely" and some say null, some say straight!!!!

Thanks,

Glenn


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 12:41 pm 
Offline

Joined: Sun Oct 16, 2005 7:04 pm
Posts: 236
Location: Sw of the Windy City
When you say null do you mean crossover? When using DTE to DCE you don't need a crossover. DTE talks to DCE, where DTE to DTE doesn't and DCE to DCE doesn't. What you don't know is if the tool supports full RS232 or not. If it doesn't, you will have to pull some leads up to make it work and that is why you are having a hard time finding the correct answer. You may need a gender changer so match pins on each end (that usually is a NUll in my book) if you don't specify what kind you need.
Sorry that I can't say what will work for sure.

Tom C.

_________________
tom_at_srclry_com
Lost somewhere in Michigan!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 12:51 pm 
Offline

Joined: Sun Apr 15, 2007 9:23 am
Posts: 4923
Location: Florida
Hello Tom,

Yes, crossover may be a better description. I was under the impression that DTE to DCE spoke directly and required what I would call a straight cable as in Pin 1 to Pin 1, Pin 2 to Pin2 , Pin 3 to Pin3, etc. until I researched it on the Internet and found an example stating that "connecting DTE to DCE required a straight cable as in Fig 1". Wellllllllll..........Figure one showed pins 2 and 3 crossed!!!! :shock:

That's where it all went bad!

Thanks for the input!!

Glenn


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 9:43 pm 
Offline

Joined: Sun Oct 16, 2005 7:04 pm
Posts: 236
Location: Sw of the Windy City
Glenn,
That is what makes DTE talk to DCE, you have to cross over the transmit and recieve plus some others. If you don't, you try sending to the send line on the other device. If you get a DTE to DCE it will be wired correct to work (that SB a std RS232 cable). That is why if you go DTE to DTE you need a crossover adapter to make it work. It moves 2 to 3 and ties up RTS & CTS and maybe a few others.

Tom C.

_________________
tom_at_srclry_com
Lost somewhere in Michigan!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 10:49 pm 
Offline

Joined: Sun Apr 15, 2007 9:23 am
Posts: 4923
Location: Florida
Hello Tom,

I talked to someone at Dynapath this afternoon and he said it needed to be DTE to DCE with pin 2 to Pin 2 and Pin 3 to Pin 3 :shock: How can that be?

Ive got a new plan :idea:

Apparently there are two common types of cables.......AT Modem and Nullmodem.

Tomorrow I'm ordering one of each and I'll find out which one works. :? I have to order three cables to meet the minimum order so I might as well go for the assortment!

I spoke to three cable manufacturers and Dynapath and I don't think any two of them agree. One cable manufacturer said I need to send them the old cable so that they can wire one up to match! (don't have an old cable)

From what I've turned up, I would agree with you!

Thanks,

Glenn

CNC certainly is a different world.....


Last edited by Glenn Wegman on Thu Nov 29, 2007 5:52 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: RS232
PostPosted: Thu Nov 29, 2007 4:15 am 
Don't make this any more difficult than it is.

You need a straight cable with a 9-25 converter block.

DYNAPATH made it easy by inverting 2 and 3 on the 25 pin connector for you...HOWEVER, keep in mind that at the time the 9 pin connector didn't exist, and on the 9 pin connector 2 and 3 are already inverted...when compared to the 25 pin standard.... :roll:

SO....if you are going from 9 pin on your computer to the 25 on the dynapath, you need a cable that is 2-3, 3-2 and 5-7 (5 on 9 pin is 7 on 25)....which might be tough to find..just wait....

NOW, you need to deal with the communications protocols.

Every RS-232 device has a 'buffer' that allows it to handle a few extra characters more than it needs / can handle for those times when the data is coming in faster than the computer can handle it.

Think of this as a bucket with a hole in the bottom. If you pour water in FASTER than it can run out the bottom, you have to have a way to tell the 'SENDING' computer to stop.

This STOP command can come in 2 forms...

SOFTWARE or HARDWARE

In hardware, you set certain voltages on pins to 0 or 5 volts to allow the data to SEND or STOP. This requires

RTS - request to send
CTS - clear to send

voltages go up and down as the 'bucket' gets full.

In software, you actually send a special character BACK to the sending computer (through the 2-3 cable) to say STOP until I send a GO character. This is often referred to as XON / XOFF or other schemes like (Xmodem, Ymodem, KERMIT - YES KERMIT and a few others). I am pretty sure that Dynapath only supports XON / XOFF....need to look in the manual to be sure.

OK, now for the good news.

If you are dealing with small programs and are not feeding a huge surfacing file to the control so that it is cutting the program as you are feeding it, you can pretty much forget about all this crap as long as you set the BAUD (data transmission rate) low enough....this is because the bucket will never get FULL and the control will never have to say STOP SENDING.

If I remember correctly, with the Dynapath, this is around 4800 baud, so if you send at 2400 baud all you have to do is pry the dynapath's mouth open, at which point it will patiently wait until the data starts.

As you feed the data at 2400 baud, it will store it faster than you are feeding it, so it just keeps swallowing the data as you send it. For small programs the 2400 Baud rate is no biggie...so it takes 20 seconds to send a program rather than 10 seconds...whoopee....

When you are done, your software sends an ASCII character meaning EOF (end of file) and the dynapath closes its mouth and the program is loaded.

I know it all sounds complicated, but it is quite easy, and I have communications software that I have written that runs in Windows if you want a copy..quite brain-dead to use (I wrote it, remember - so it must be simple from the source)....

Since you say you are going 9 computer to 25 dynapath, you need a cable that is straight through (9-9) and a 9-25 pin conversion block...NOT A NULL MODEM BLOCK....just get the straight through 9-25 converter, of the appropriate gender on each end....and it will be correct...leave the converter block in place on the control and connect the cable as needed. DO NOT LEAVE THE CABLE CONNECTED AT ALL TIMES. If you have a nearby lightning strike, you can kiss the RS232 chip in the control (or computer which is cheap) goodbye....

OH, and for those of you that are interested, RS-232 defines only signal form (voltages and timing), but does not restrict cabling or protocols used to control the data...which is why there are so many flavors of it.

Contact me off-line if you need more information and don't want to bore everyone else...especially if you want the software.


Top
  
 
 Post subject:
PostPosted: Thu Nov 29, 2007 5:56 am 
Offline

Joined: Sun Apr 15, 2007 9:23 am
Posts: 4923
Location: Florida
Thanks Bill!


Top
 Profile  
 
 Post subject: Welcome
PostPosted: Thu Nov 29, 2007 12:51 pm 
No problem...used to do it for a living...

NOW, everything has a network card, and people that actually understand RS232 are getting few and far between.


Top
  
 
 Post subject:
PostPosted: Thu Nov 29, 2007 2:26 pm 
Offline

Joined: Sun Apr 15, 2007 9:23 am
Posts: 4923
Location: Florida
So......

If I get a straight conversion cable from DB9 DTE to DB25 DCE which has a pin out indicated on page 2 for DTE to DCE it should work :?:

http://www.bb-elec.com/bb-elec/literature/tech/faq_rs232_connections_work.pdf

Thanks,

Glenn


Top
 Profile  
 
 Post subject: get a SmartCable
PostPosted: Tue Jul 22, 2008 5:03 pm 
If you can find one, a SmartCable will connect any two RS232 devices. Just plug it in, and slide the switch to the position where both LEDs light up.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group