What's new
What's new

Question on RS-232 25 pin connector

Joe Miranda

Titanium
Joined
Oct 19, 2004
Location
Elyria Ohio
I have a '95 vinatage Cincinnati Arrow 500 with an A2100 control. We have been transferring files via floppies. This is becoming problematic for surfacing jobs.

The controller has a 25pin RS232 connector. How do I connect between the pc and the machine?
 
For starters you will need a pc either with an rs232 port ore else use a usb to serial interface converter (rs232). The USB converters are a crap shoot. Some work well and other models are duds. Depends on the application, the PC, and the version of windows and what driver is used.

You will also either to make your own serial cable with a 25pin end and a 9 pin end or buy an adapter. You also will probably have cable gender issues with pin 2 and pin 3 since there was little consistency in defining which type of device was what.

And finally you have the handshake issue. I try to use XON/XOFF as much as possible, it makes things easier. The hardwire handshake signals can sometimes be tricky timing wise if using the USB converter.
 
For starters you will need a pc either with an rs232 port ore else use a usb to serial interface converter (rs232). The USB converters are a crap shoot. Some work well and other models are duds. Depends on the application, the PC, and the version of windows and what driver is used.

You will also either to make your own serial cable with a 25pin end and a 9 pin end or buy an adapter. You also will probably have cable gender issues with pin 2 and pin 3 since there was little consistency in defining which type of device was what.

And finally you have the handshake issue. I try to use XON/XOFF as much as possible, it makes things easier. The hardwire handshake signals can sometimes be tricky timing wise if using the USB converter.

Good description of the issues, but there could be even more. That being how the Cinci controller handles the port. Hopefully, it is configurable. Worse, you may not be able to find that information and it will be necessary. RS 232 has many variations and not all implementations support all the pins on the interface.
 
I have had to make dozens of RS232 cables over the years. It is easy, but never simple. Usually you can find a pin out in the owners manual or from customer service. Many times from there it is a process of trial and error, both with pinouts and making the correct parameters on the machine and on the sending computer. I did a similar vintage Arrow 10 or so years ago, so rest assured it can be done. There are companies that make cables. I tried to use them, but they haven't gotten one right for me yet. I have come to believe that there is no reputable standard for RS232 and all of the machine builders get drunk every Friday afternoon and randomly stick wires into the RS232 connector... so that is generally how I tackle getting one to work. I would offer more concrete guidance, but even after doing a dozen, I need to puzzle it out each time.
 
Essentially there are three ways to wire between the PC and machine: without handshake, partial handshake or full handshake.
The last is the most reliable. I use a DB9-CAT5 and DB25-CAT5 adapters on each end. These allow you to make the connections the way you want. CAT5 cable is cheap and available in many lengths.
With no handshake you have to use Xon/Xoff flow control. If your machine can be set to RTS/CTS then you can use handshaking. Some machines do not need the Ring Indicator connection.
You will have to go into the Device Manager->Ports Com & LPT (on Windoz) to change the port speed, number of data bits, stop bits, parity and handshaking.
Another piece to change is the FIFO control on the PC. PCs throw out data to the port and the port controls the flow through a buffer. It usually does not check whether the machine is ready for more data before sending out the next bit. Under Advanced is the FIFO control. Turn down the setting to zero.
PC-FANUC_RS232_woHS.jpgPC-FANUC_RS232_pHS.jpgPC-FANUC_RS232_fHS.jpg
 
I have had to make dozens of RS232 cables over the years. It is easy, but never simple. Usually you can find a pin out in the owners manual or from customer service. Many times from there it is a process of trial and error, both with pinouts and making the correct parameters on the machine and on the sending computer. I did a similar vintage Arrow 10 or so years ago, so rest assured it can be done. There are companies that make cables. I tried to use them, but they haven't gotten one right for me yet. I have come to believe that there is no reputable standard for RS232 and all of the machine builders get drunk every Friday afternoon and randomly stick wires into the RS232 connector... so that is generally how I tackle getting one to work. I would offer more concrete guidance, but even after doing a dozen, I need to puzzle it out each time.

Excellent description of what is going on.
 
Ok, so first I need to get drunk Friday afternoon then I try to make an adapter. Got it.

You don't need to wait until Friday, but the drinking is mandatory.

Other things that helps is making very clear drawings with color coding. For instance, a scale drawing of the back of the DB25 connector with a diagram that shows what color goes in what socket. Then the same drawing with the DB9. I struggle seeing the very small numbers on the back of the connectors. Then all you need is the appropriate shielded wire and a soldering iron. Watch your overall length. To long and you will have to slow down you baud rate.

The job sucks, but it can be done.


Sent from my iPhone using Tapatalk
 
If you use the DB9/25 to CAT5 adapters you do not have to do any soldering. The wires with pins are connected on the CAT5 side, just push them into the appropriate DB side holes.
 
Ok, so first I need to get drunk Friday afternoon then I try to make an adapter. Got it.

Hello Joe,
It really isn't hard. You need a PC, or Laptop, preferably with a physical Serial Port (not an emulated Serial Port using a USB to Serial adapter). USB to Serial adapters can be problematical and given that this seems to be your first venture into settings up communication with a CNC control, you won't want the hassle. There are some that work better than others, and there are those that just don't work with Win7 and above Operating Systems when installed as 64 bit OS. Accordingly, if the PC, or Laptop only has USB Ports (often the case with Laptops, but Desktop PC's usually have at least one 9 pin Serial Port), and therefore you will have to spend money on either a USB to Serial converter, or a Physical Serial Adapter Card, I would opt for the Real Serial adapter every time.

When using a Software application to communicate between two devices and unless the Software is total rubbish, there is absolutely NO requirement to have to set Date Bit, Stop Bits, Parity, Baud Rate and Handshake Method through the Device Manager. All of this is set through the Comms setting of the Software application. The attached picture shows a typical RS232 protocol setting page of a Software Application used to communicate with another device.

Config1.JPG

With regards to the FIFO setting, changing this is usually only required if the particular UART of the PC can't react quickly enough to a Stop Signal sent by the receiving device, usually when using Xon Xoff Handshaking (normally DC3 - Ascii 19 character).

Software Handshaking will work fine with your Cincinnati Control and following is the pin-out of the cable your will require:

Cable Pin-out for Xon Xoff Handshaking

Machine Side --------------------------- PC Side
DB25 Male Connector --------------- DB9 Female Connector

1 --- Shield Trace ------------------- Not Connected
2 ----------------------------------------- 2
3 ----------------------------------------- 3
4
| Bridged
5

6
|
8 All Bridged
|
20

7 ----------------------------------------- 5

The confusion when purchasing a ready made cable, is that you will be told to just ask for a Null Modem Cable. The problem here is that Null Modem is a generic term and refers to any cable where the TX and TD lines in the cable are swapped. There are basically three types of Null Modem Cables and they relate to Handshaking.

1. None
2. Loop-back Handshaking (Xon Xoff)
3. Hardware Handshaking

You need a Loop-back Handshake Null Modem Cable.

I always make my own cables, as they are easy to make and I'm then sure they are correct.

The Shield Trace referred to in the above schematic is a bare wire that runs the length of the cable and is in close contact with a Shield Wrap that encloses all the wires in the cable. This Trace wire should only be connected to Protective Ground at one end of the cable (Pin 1 of a DB25 Connector - the frame of a DB9 Connector). Unless the two devices are connected to the same Ground Source and both are Grounded well, connecting the Trace wire at both end can result in a Ground Loop.

As you can see from the above cable configuration schematic, the cable is fairly simple to make. I see no reason to complicate matters by introducing adapters when the above cable can be connected directly to the machine control and the PC.

The parameters of the machine relating to RS232 Comms needs to be set and the Software being used on the PC has to have its RS232 protocol setting made compatible with the parameter settings made at the Control. The Cincinnati Control is a little different in the way it handles RS232 Comms. A Fanuc for example will use 7 Data Bits and the same is set at the External Device Software. A Cincinnati control will be set to 8 Data Bits, 1 Stop Bit and No Parity. Yet the PC Software will be set to 7 Data Bits, 1 Stop Bit and Even Parity. This is because the Cincinnati control counts the even parity bit used in Protocol 1 as a data bit.

Refer to your Cincinnati Control Manual on how to set the parameters.

The PC Software should be set as follows:
Handshake Method = Xon Xoff (Software Handshaking)
Data Bits = 7
Stop Bits = 1
Parity Pit = Even
Baud Rate = 4800 (or to whatever the Baud Rate is set in Control Parameters)


Regards,

Bill
 
Hello Joe,
It really isn't hard. You need a PC, or Laptop, preferably with a physical Serial Port (not an emulated Serial Port using a USB to Serial adapter). USB to Serial adapters can be problematical and given that this seems to be your first venture into settings up communication with a CNC control, you won't want the hassle. There are some that work better than others, and there are those that just don't work with Win7 and above Operating Systems when installed as 64 bit OS. Accordingly, if the PC, or Laptop only has USB Ports (often the case with Laptops, but Desktop PC's usually have at least one 9 pin Serial Port), and therefore you will have to spend money on either a USB to Serial converter, or a Physical Serial Adapter Card, I would opt for the Real Serial adapter every time.

When using a Software application to communicate between two devices and unless the Software is total rubbish, there is absolutely NO requirement to have to set Date Bit, Stop Bits, Parity, Baud Rate and Handshake Method through the Device Manager. All of this is set through the Comms setting of the Software application. The attached picture shows a typical RS232 protocol setting page of a Software Application used to communicate with another device.

View attachment 172321

With regards to the FIFO setting, changing this is usually only required if the particular UART of the PC can't react quickly enough to a Stop Signal sent by the receiving device, usually when using Xon Xoff Handshaking (normally DC3 - Ascii 19 character).

Software Handshaking will work fine with your Cincinnati Control and following is the pin-out of the cable your will require:

Cable Pin-out for Xon Xoff Handshaking

Machine Side --------------------------- PC Side
DB25 Male Connector --------------- DB9 Female Connector

1 --- Shield Trace ------------------- Not Connected
2 ----------------------------------------- 2
3 ----------------------------------------- 3
4
| Bridged
5

6
|
8 All Bridged
|
20

7 ----------------------------------------- 5

The confusion when purchasing a ready made cable, is that you will be told to just ask for a Null Modem Cable. The problem here is that Null Modem is a generic term and refers to any cable where the TX and TD lines in the cable are swapped. There are basically three types of Null Modem Cables and they relate to Handshaking.

1. None
2. Loop-back Handshaking (Xon Xoff)
3. Hardware Handshaking

You need a Loop-back Handshake Null Modem Cable.

I always make my own cables, as they are easy to make and I'm then sure they are correct.

The Shield Trace referred to in the above schematic is a bare wire that runs the length of the cable and is in close contact with a Shield Wrap that encloses all the wires in the cable. This Trace wire should only be connected to Protective Ground at one end of the cable (Pin 1 of a DB25 Connector - the frame of a DB9 Connector). Unless the two devices are connected to the same Ground Source and both are Grounded well, connecting the Trace wire at both end can result in a Ground Loop.

As you can see from the above cable configuration schematic, the cable is fairly simple to make. I see no reason to complicate matters by introducing adapters when the above cable can be connected directly to the machine control and the PC.

The parameters of the machine relating to RS232 Comms needs to be set and the Software being used on the PC has to have its RS232 protocol setting made compatible with the parameter settings made at the Control. The Cincinnati Control is a little different in the way it handles RS232 Comms. A Fanuc for example will use 7 Data Bits and the same is set at the External Device Software. A Cincinnati control will be set to 8 Data Bits, 1 Stop Bit and No Parity. Yet the PC Software will be set to 7 Data Bits, 1 Stop Bit and Even Parity. This is because the Cincinnati control counts the even parity bit used in Protocol 1 as a data bit.

Refer to your Cincinnati Control Manual on how to set the parameters.

The PC Software should be set as follows:
Handshake Method = Xon Xoff (Software Handshaking)
Data Bits = 7
Stop Bits = 1
Parity Pit = Even
Baud Rate = 4800 (or to whatever the Baud Rate is set in Control Parameters)


Regards,

Bill


You might have to connect 2 to 3 and 3 to 2 depending on how your control is setup and how the PC port is defined. This is why it gets confusing. It has to do with if the device is DTE or DCE which is a relative definition by the equipment manufacturer.

It is true that the communications software will allow you to set the communications parameters from its menu, but you will still need to set the control side at the control console and know what the control side can tolerate. This is where just trial and error enters in. Also some of the different data protocols require a stop bit and 7 data bits. Others require a stop bit etc. You really can only sort much of this out be trial and error. I like to use a rs232 diagnostic plug that has red and green LEDs to indicate what is happening.
 
You might have to connect 2 to 3 and 3 to 2 depending on how your control is setup and how the PC port is defined. This is why it gets confusing. It has to do with if the device is DTE or DCE which is a relative definition by the equipment manufacturer.
Hello Ziggy2,
You make establishing communication with a Machine Tool Control like some sort of Black Art. The RS232 standard are reasonably rigid and the overwhelming majority of MTB comply. One Fagor control is the only control I've come across where the pin configuration at the control was different with regards to the TD and RD pins. This is not the case with a Cincinnati Control. If the Serial Port is a DB9 at the PC and DB25 at the Control, then the TD RD pin connection will be 2 to 2 and 3 to 3. This will result is a RD to TD and TD to RD when connecting a DB9 to a DB25 connector respectively.


It is true that the communications software will allow you to set the communications parameters from its menu, but you will still need to set the control side at the control console and know what the control side can tolerate. This is where just trial and error enters in. Also some of the different data protocols require a stop bit and 7 data bits. Others require a stop bit etc. You really can only sort much of this out be trial and error. I like to use a rs232 diagnostic plug that has red and green LEDs to indicate what is happening.

When you set the parameters of the control, you set them to a specified configuration (obtained from the Control Manual); at that point you know the protocol set at the control. You then set the PC Software to match. Where is the trial an error in that sequence. For the minimal cost of a Serial Test plug, every CNC Controlled machine owner should have one, but generally not to figure out what Protocol setting to use at each device. The test plug wont tell you whether the correct Data, Stop, Parity Bits, or Baud Rate is set at each device. Pins 2 and 3 will show activity on the Test Plug when the settings are mismatched between the devices.

Regards,

Bill
 
Hello Ziggy2,
You make establishing communication with a Machine Tool Control like some sort of Black Art. The RS232 standard are reasonably rigid and the overwhelming majority of MTB comply. One Fagor control is the only control I've come across where the pin configuration at the control was different with regards to the TD and RD pins. This is not the case with a Cincinnati Control. If the Serial Port is a DB9 at the PC and DB25 at the Control, then the TD RD pin connection will be 2 to 2 and 3 to 3. This will result is a RD to TD and TD to RD when connecting a DB9 to a DB25 connector respectively.




When you set the parameters of the control, you set them to a specified configuration (obtained from the Control Manual); at that point you know the protocol set at the control. You then set the PC Software to match. Where is the trial an error in that sequence. For the minimal cost of a Serial Test plug, every CNC Controlled machine owner should have one, but generally not to figure out what Protocol setting to use at each device. The test plug wont tell you whether the correct Data, Stop, Parity Bits, or Baud Rate is set at each device. Pins 2 and 3 will show activity on the Test Plug when the settings are mismatched between the devices.

Regards,

Bill

As others have expressed here also, it is not a black art, but it also is not usually straight forward either. The Acramatic control might be consistent but not all pcs and especially serial interface cards are always consistent with the standard.

Anyone that is attempting to connect a pc to any machine tool interface by way of RS232 needs to be aware of the possible issues. The RS232 standard is actually defined by the IEEE, a committee. The complication is that we are at revision C since the original standard was adopted and very few hardware manufacturers exactly follow the RS232 standard. Most are close but most also fudge a little for various reasons.

Your suggested cable will work if the pc serial port is exactly as you show it, however if the serial port is not exactly as you show it, it isn't going to work. The OP needs to understand this so that if he does have problems he will know why and how to resolve the issue.

You are correct that a diagnostic plug won't necessarily help solve all of your problems but it does take you along way in seeing signal status, activity, and in general eliminate at least some of the issues. This does remove some variables from the problem. Also it is imperative to not assume that an existing RS232 port on a machine, of unknown history, is guaranteed to be fully functional until it is verified.

I disagree with your statement that the majority of MTB follow the standard. Most follow the standard as far as it suits them. Some of the manufactures specify a 10 bit protocol, some 9 bit, and others 8 bit. To add to the confusion some of these controls require that the PC side have a slightly different variation of the stop bit and word length. Hurco for one, not that I would say that they are a major builder, has several variations of this. A/B has similar variations. Fanuc is quite consistent unless a specialty connector is used on the outside of the cabinet. My point about this is that talking in generalities is usually pretty safe but assuming that specific details are always true will trip you up.

If RS232 were truly simple, we would only need one style of cable that would always work without adapters. The scenario that we have is far from that and the OP would not have even had to ask the question.
 
In my working life I used to have to make up RS232 /V24 cables to interconnect various bits of computer equipment, and the information wasn't always to hand to know exactly what was wanted. I always carried an RS232 break out box - a male and female DB25 with LEDs on each line and patch panel and isolator switches. Interfaker is a brand but there are many. With it you can see what's going on and adjust your patching accordingly. When it's working then make up the final cable.

Now retired but I still have the break out boxes and have used them to set up RS232 links for my hobby CNC machines with Fanuc, Heidenhain and Traub (Mitsubishi) controls to several different computers over the years.
 
As others have expressed here also, it is not a black art, but it also is not usually straight forward either. The Acramatic control might be consistent but not all pcs and especially serial interface cards are always consistent with the standard.

Anyone that is attempting to connect a pc to any machine tool interface by way of RS232 needs to be aware of the possible issues. The RS232 standard is actually defined by the IEEE, a committee. The complication is that we are at revision C since the original standard was adopted and very few hardware manufacturers exactly follow the RS232 standard. Most are close but most also fudge a little for various reasons.

Your suggested cable will work if the pc serial port is exactly as you show it, however if the serial port is not exactly as you show it, it isn't going to work. The OP needs to understand this so that if he does have problems he will know why and how to resolve the issue.

Yes and if my mother was a car I'd have wheels. The fact is, most Serial Ports supplied with PCs and most add on Serial adapters do work as stated in my earlier Posts. I suggested in my first Post to the OP to avoid using a USB to Serial adapter because that could lead to a lot of head scratching for a New Chum. Sure, there are variations between the hardware used between controls and how it works, but the MTB don't make it a secret. All the information required to establish communication between External Device and a Cincinnati, Fanuc, Haas, Okuma and the overwhelming number of other control builders is contained in their manual. Clearly it doesn't have to be an exercise of trial and error. You can make it so if you care to not open the manual.

You are correct that a diagnostic plug won't necessarily help solve all of your problems but it does take you along way in seeing signal status, activity, and in general eliminate at least some of the issues. This does remove some variables from the problem. Also it is imperative to not assume that an existing RS232 port on a machine, of unknown history, is guaranteed to be fully functional until it is verified.

And its for the purpose of diagnosing hardware issues that I suggest that a Serial Test plug should be in all CNC machine tool owners draw.


I disagree with your statement that the majority of MTB follow the standard. Most follow the standard as far as it suits them. Some of the manufactures specify a 10 bit protocol, some 9 bit, and others 8 bit. To add to the confusion some of these controls require that the PC side have a slightly different variation of the stop bit and word length. Hurco for one, not that I would say that they are a major builder, has several variations of this. A/B has similar variations. Fanuc is quite consistent unless a specialty connector is used on the outside of the cabinet. My point about this is that talking in generalities is usually pretty safe but assuming that specific details are always true will trip you up.

Well, we will have to agree to disagree. Following are typical RS232 protocol settings for a Hurco Ultimax. Apart from No Parity, it all looks like pretty greasy standard Kid Stuff to me. But hey, its all in their book so that you don't have to poke around using trial and error.

Common Settings
Name Hurco Ultimax
Baudrate 9600
Data bits 7
Stop bits 1
Parity none
Flow control Xon/Xoff
Xon Char. 17
Xoff char. 19

My comments have not been general. The OP's opening Post made specific reference to a Cincinnati Control and my reply was specific to that control. There is no having to use any special pin configuration regarding the TD and RD pins, as may be the case if one were "talking in generalities" regarding RS232 communication.

If RS232 were truly simple, we would only need one style of cable that would always work without adapters. The scenario that we have is far from that and the OP would not have even had to ask the question.

The OP's opening Post indicated that he was new to connecting a PC to his Cincinnati Control, or at least that's how I comprehended it and I'd suggest that is the reason why he asked the question. By the time he made his second Post he'd been driven to drink by some of the replies.

Regards,

Bill
 
angelw - thanks for the comprehensive reply. I have read it and re-read it and it's still pretty murky in my mind. One thing I am fairly convinced of and that is to not go with a usb to serial adapter. Being unsure of what I am doing and having an issue with something like that would be my undoing.

ziggy - thanks for the cautions. Cautions are good. I assure you they have been duly noted by me.
 








 
Back
Top