Wire NI 9871 Flying Leads to 2-Wire and 4-Wire Serial Devices

Updated Jan 11, 2018

Reported In

Hardware

  • NI-9871

Issue Details

I am using an NI 9871 to connect my 2-wire RS485, 4-wire RS485 and RS422 devices which have only screw terminals or pin headers instead of DB-9 port. However, I don't know the correct pairing of NI 9871 pins and the device pins.

Solution

There are four RJ50 ports on NI 9871 which can be converted to DB-9 ports by the cables included with your kit. You can use a cable with an RJ50 or DB-9 terminal and a flying-lead terminal to get raw leads of a serial port.
The following steps would help you connect these serial ports with flying leads:
  1. Check the pin definitions of your device. For serial communication without flow control as a simple example, your 2-wire RS485 device may have 3 pins to wire (one GND pin and a pair of differential signal pin, Data+/- or A/B), while your 4-wire RS482 device and RS422 devices may have 5 pins (one GND pin and two pairs of differential signal pin, RX+/- and TX+/-).
  2. Check the pin definitions of RJ50 and DB-9 serial ports on NI 9871 in Getting Started Guide.
  3. Wire pins pair base on this table.
    • RS485 2-wire mode
      NI 9871Device
      RX+ and TX+A (Data+)
      RX- and TX-B (Data -)
      GNDGND
    • RS422 (or RS485 4-wire mode)
      NI 9871Device
      RX+TX+
      RX-TX-
      TX+RX+
      TX-RX-
      GNDGND
  4. You should check or change the serial port configuration before test the communication. The Getting Started Guide and this article will be helpful for that.

Additional Information

When working in RS485 2-wire mode, NI 9871 module will not automatically short the RX and TX lines inside, so you must manually short them with leads.

RS422 and 4-wire RS485 protocols are almost same in physical layer, so the wiring is same.

If flow control (or handshaking) is needed, you should wire the RTS+/- and CTS+/- pins as well. The table following shows the pin pairing.
NI 9871Device
RTS+CTS+
RTS-CTS-
CTS+RTS+
CTS-RTS-

 

WAS THIS ARTICLE HELPFUL?

Not Helpful