06-06-2011 11:40 AM
I have read through as many Knowledge Bases as possible and I'm still confused on how to determine which cable to use (null modem or straight through). I will be using 232 and 485 with cRIO, Ethernet, and USB serial devices. I need to be knowledgable enough to select the correct cable and not "troubleshoot" all possibilities to find out which one I need. I generally can determine if my instrument is DTE (almost always) or DCE. How do I determine what my NI device is?
If I understand this correctly I would almost always use null modem cables to talk between my PC and an instrument. However I have found that is not the case. As an example I have a 2-wire 485 device that I will talk to with a USB-485/4 device. It turns out that I require a straight through cable.
06-07-2011 05:53 PM
Hi Doug,
The best way to determine if your NI device is a DTE or a DCE device would be to consult the manual. For instance, I looked at the manual for the CRIO 9075, and on page 15, there is a pinout of the RS-232 serial port. In looking at that pinout, and comparing it to the pinouts for DTE and DCE RS-232 devices, it is a DTE device. Also, this makes sense knowing the conventions of DTE devices since the CRIO controller is essentially a standalone computer, and a PC is a DTE device. I have attached a link here that shows the pinouts for RS-232 DTE and DCE devices:
Whether or not an instrument is DTE or DCE is completely dependent on the wiring scheme of the RS-232 serial port for the device, so it would always be best to check the manual to look at the pinout for the port, see if it specifically says whether it is DTE or DCE, and also see if there is any documentation of it handling the transmit and receive lines on the port in any particular way internally.
As far as the difference for RS-485, it appears there is no standard way of classifying the connector as with RS-232. Instead, it would be best to just look at the pinouts and see which pins you need to connect, and then choose your cabling based on that. I have attached a link to the NI Serial Hardware Specifications and Features Guide below, where on page 10, it notes that indeed the USB-232/2 and USB-232/4 devices are the only ones that have the capability of having a DCE mode. Therefore, the USB-485/4 does not have a DCE mode.
Overall, it seems the best way to determine how a device should be connected would be to consult its manual to see if it specifically says if it is RS-232 DTE or DCE, and if not, check its pinout to make sure you are connecting the transmit and receive lines correctly. I have attached some more documentation on differences between DTE and DCE, which I hope is new documentation you have not already read and might clear up some of the differences.
Thanks, Doug! I hope this helps. Have a great day!
The Difference Between a Null Modem and Straight Through Serial Cable