This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Should I Use Null Modem or Straight Through Serial Cables?

Updated Dec 5, 2017

Reported In

Hardware

  • Serial Cable

Driver

  • NI-VISA

Issue Details

I would like to use my computer's built-in serial port to communicate with a serial device, and I have both the null modem and straight through serial cables. What is the difference between the two cables, and which one should I use?

Solution

The null modem cable - sometimes called a crossover cable - should be used when interfacing directly between your computer's serial port and a Data Terminal Equipment (DTE) device.  With null modem cables, the transmitting device's Transmit (TX) signal is routed to the receiving device's Receive (RX) line.  Similarly, the receiving device's transmission line is routed to the communicating device's receiving line.  Here are two common null modem cable routes: 
 
Simple Null Model Cable
 

To enable handshaking between the two devices, the Request to Send (RTS) pin of one device must be connected to the Clear to Send (CTS) pin of the other device. 
 
Null Modem Cable with Handshaking

 
The straight through cable should be used when interfacing with a Data Communications Equipment (DCE) device.  The TX-RX and RTS-CTS pins are not cross-connected in this case, hence the term straight through cable.
 
Simple Straight Through Cable

Additional Information

The built-in serial port on a PC is a DTE device. Modems and printers are examples of DCE devices.  Note that an instrument with serial interface could be either a DTE or a DCE device.  It is best to check the user manual of the instrument to find out the device type.  

To tell if your cable is null modem or straight though, you can search the part number at ni.com, the product description will tell if it is null modem. Alternatively you can use a hand held DMM to test continuity on the individual pins of your serial cable. If every pin is electrically connected to the corresponding pin on the other end, i.e.: pin 1 to pin1, pin 2 to pin 2, etc. then the cable is straight through.

WAS THIS ARTICLE HELPFUL?

Not Helpful