Refer to the sections below to properly connect your hardware. Identify what serial communication protocol you are using (RS-232 vs. RS-422/485) and the type of serial connector you have.
Note: The pin diagrams provided for this tutorial are for the female connector. For more details on NI serial hardware pinouts, refer to the Serial Quick Reference Guide.
On an RS-232 port, connect the transmit (TXD) signal to the receive (RXD) signal. Refer to the pins below based on your connector type. The connections are indicated in grey.
Pin 3 to 2 (TXD to RXD)
Pin 2 to 3 (TXD to RXD)
*It is not recommended to use the RJ-50 connector by itself to perform a loopback test due to the small separation between pins. If you use a RJ-50 to DB-9 serial cable (Part Number 182845-XX), a loopback test can be performed using the pins for a DB-9 connector.
On an RS-422/485 port, connect the TXD+ signal to RXD+ signal, and the TXD- signal to the RXD- signal. Refer to the pins below based on your connector type. The positive connections are indicated in red and the negative connections are indicated in blue.
Pin 4 to 8
(RXD+ to TXD+)
Pin 5 to 9
(RXD- to TXD-)
Pin 5 to 20
(TXD+ to RXD+)
Pin 7 to 22
For 2-wire configurations, you will need two RS-485 ports to achieve a set up similar to a traditional loopback test.
The positive connections are indicated in red, the negative connections are indicated in blue, and the GND connections are indicated in green.
DB-9 Connector (female)
Port 1 Pins
Port 2 Pins
DB-25 Connector (female)
It is not recommended to use the RJ-50 connector by itself to perform a loopback test due to the small separation between pins. If you use a RJ-50 to DB-9 serial cable (Part Number 182845-XX), a loopback test can be performed using the pins for a DB-9 connector.
Note: You can test communication in MAX VISA Test Panels or LabVIEW examples. Make sure not to have VISA Test Panels and LabVIEW simultaneously open, or VISA will throw an access resource error (error code -1073807246 hex:0xbfff0072).
For both RS-232 and RS-485 (4-wire), test communication with shipping example Simple Serial.vi.
If you are using RS-485 (2-wire), test communication with the shipping example RS-485 Transceiver Control.vi.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.