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:
- 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+/-).
- Check the pin definitions of RJ50 and DB-9 serial ports on NI 9871 in Getting Started Guide .
- Wire pins pair base on this table.
- RS485 2-wire mode
|RX+ and TX+||A (Data+)|
|RX- and TX-||B (Data -)|
- RS422 (or RS485 4-wire mode)
- 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.
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.